Prefer to put STDOUT CHECK at the end of the file. (#3073)

Allow interleaving of STDOUT and STDERR check lines. Put STDOUT lines
after the line they're attached to, and STDERR lines before. If no
STDOUT check line is attached to any line, then put them all at the end
of the file instead.

This is intended to better handle the case where stdout contains
unreplaced mentions of line numbers, and also reflects that stdout is
typically a consequence of the test rather than commentary on it, so
placing it after the test seems likely to read better.
This commit is contained in:
Richard Smith authored and GitHub committed 2023-08-08 19:51:52 +00:00
1 parent a359da37c4
commit 212188a922
772 files changed
+3942 -3110

No files matched your search

+2 -1
View File
@@ -4,6 +4,7 @@
//
// ARGS: dump objcode --target_triple=x86_64-unknown-linux-gnu --output_file=%t %s
// AUTOUPDATE
// CHECK:STDOUT: Success: Object file is generated!
fn Main() -> i32 { return 0; }
// CHECK:STDOUT: Success: Object file is generated!