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

Show stdout on failure #45

Merged
merged 2 commits into from
Jul 15, 2024
Merged

Show stdout on failure #45

merged 2 commits into from
Jul 15, 2024

Conversation

nlsandler
Copy link
Owner

A handful of improvement to the tests script's output on failure:

  1. If return code and stdout are both incorrect, print both of them instead of just return code (fixes Print test program output on failure #20)
  2. Use difflib to print difference between expected and actual stdout
  3. For optimization tests, print entire assembly function only if it's below a certain length threshold (default 20 instructions). Printing the whole function is useful if it's quite short (as it is for most Chapter 19 tests) but unwieldy if it's very long (as it is for most chapter 20 tests)
  4. Cleaned up some bad whitespace in optimization test output

@nlsandler nlsandler force-pushed the show-stdout-on-failure branch 2 times, most recently from 3b0f571 to a8fff26 Compare July 15, 2024 20:31
@nlsandler nlsandler force-pushed the show-stdout-on-failure branch from a8fff26 to e983936 Compare July 15, 2024 21:13
@nlsandler nlsandler merged commit c1cf049 into main Jul 15, 2024
93 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Print test program output on failure
1 participant