-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Swap round the compare commands in the test suite.
The '--compare' option to test-driver.py takes two arguments indicating things to diff (either files, or the standard output of the command under test), and diffs them the obvious way round, that is, with input #1 shown on the '-' side of the unified diff syntax and input #2 on the '+' side. When the diff is showing the discrepancy between a program's expected and real output, I think it's generally sensible to show the real output on the '+' side, and the expected output as '-'. That convention matches, for example, what you'd get if you had the true output committed in source control and ran 'git diff' or similar to show how the rewritten version differed. But all the comparisons in tests/CMakeLists.txt were written backwards, so the convention was opposite. And I just scratched my head for 20 minutes over a test failure, because I assumed the convention in the previous paragraph, and was trying to figure out how the source code I was looking at could possibly produce the text on the '+' side of the diff! But it hadn't: it had produced the '-' side instead. Reversed all the comparisons so that they make sense.
- Loading branch information
1 parent
d28ac43
commit b52b3e6
Showing
1 changed file
with
18 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters