Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new check-expect output with large values is hard to read #122

Open
samth opened this issue Nov 25, 2020 · 2 comments
Open

new check-expect output with large values is hard to read #122

samth opened this issue Nov 25, 2020 · 2 comments
Assignees
Labels
test engine topics related to the test engine

Comments

@samth
Copy link
Member

samth commented Nov 25, 2020

Consider this program

#lang htdp/asl

(check-expect (build-list 20 (lambda (x) x))
              (build-list 21 (lambda (x) x)))

It prints:

[samth@huor:~/sw/plt (master) plt] raco test /tmp/d.rkt 
raco test: (submod "/tmp/d.rkt" test)
Ran 1 test.                                                                                                                                                                        
0 tests passed.                                                                                                                                                                    
Check failures:                                                                                                                                                                    
                     ┌──────────────────────────────────────────────────────────┐              ┌─────────────────────────────────────────────────────────────┐                     
        Actual value │ (list 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19) │ differs from │ (list 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20) │, the expected value.
                     └──────────────────────────────────────────────────────────┘              └─────────────────────────────────────────────────────────────┘                     
        in d.rkt, line 3, column 0         

which is not great in a window that wraps, such as almost every terminal.

@mikesperber
Copy link
Member

It's on my radar, but I'm unsure of a good strategy. Just dropping the boxes is probably not going to work, since test-engine's output (and the translations, and, and ...) all assume alignment.

One possible strategy would be to format the values with limited width.

Suggestions welcome!

@samth
Copy link
Member Author

samth commented Nov 28, 2020

When the values are long, just putting them on separate lines and then pretty-printing with limited width would be great.

@shhyou shhyou added the test engine topics related to the test engine label May 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test engine topics related to the test engine
Projects
None yet
Development

No branches or pull requests

3 participants