mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 14:11:04 +01:00
Add a newline after diagnostic output when testing (#4818)
This removes some churn when adding new diagnostic cases to test files (where previous to this change the newly added newline would cause the previous diagnostic CHECKs to be updated including changes to the line number because the CHECK for the blank line meant an extra line between CHECK and source line). A few alternatives discussed here: https://discord.com/channels/655572317891461132/655578254970716160/1329573358475673723 --------- Co-authored-by: Jon Ross-Perkins <jperkins@google.com>
This commit is contained in:
co-authored by
Jon Ross-Perkins
parent
a8b46cf561
commit
e6c1f0630a
+3
-2
@@ -9,13 +9,14 @@
|
||||
// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/function/declaration/fail_missing_implicit_close.carbon
|
||||
|
||||
// Fix and uncomment this to test error handling.
|
||||
// CHECK:STDERR: fail_missing_implicit_close.carbon:[[@LINE+7]]:7: error: opening symbol without a corresponding closing symbol [UnmatchedOpening]
|
||||
// CHECK:STDERR: fail_missing_implicit_close.carbon:[[@LINE+8]]:7: error: opening symbol without a corresponding closing symbol [UnmatchedOpening]
|
||||
// CHECK:STDERR: fn Div[();
|
||||
// CHECK:STDERR: ^
|
||||
// CHECK:STDERR:
|
||||
// CHECK:STDERR: fail_missing_implicit_close.carbon:[[@LINE+3]]:7: error: `fn` declarations must either end with a `;` or have a `{ ... }` block for a definition [ExpectedDeclSemiOrDefinition]
|
||||
// CHECK:STDERR: fail_missing_implicit_close.carbon:[[@LINE+4]]:7: error: `fn` declarations must either end with a `;` or have a `{ ... }` block for a definition [ExpectedDeclSemiOrDefinition]
|
||||
// CHECK:STDERR: fn Div[();
|
||||
// CHECK:STDERR: ^
|
||||
// CHECK:STDERR:
|
||||
fn Div[();
|
||||
|
||||
// CHECK:STDOUT: - filename: fail_missing_implicit_close.carbon
|
||||
|
||||
Reference in New Issue
Block a user