Update basic diagnostic capitalization/punctuation (#4328)

This is a primarily automated change:

- Search & replace for capitalization
-
`(CARBON_DIAGNOSTIC\((?:\n\s+)?\w+,(?:\n\s+)?\s\w+,(?:\n\s+)?\s")([A-Z])`
    - `$1\L$2`
- Search & replace for period
-
`(CARBON_DIAGNOSTIC\((?:\n\s+)?\w+,(?:\n\s+)?\s\w+,(?:\n\s+)?\s"(?:[^)]|\n)+)\.("[,)])`
    - `$1$2`
- Limited search & replace for `ERROR: ` -> `error: ` in streamed things
- Leaving a TODO for command_line because there's more cleanup that can
be done there
- Modify diagnostic_consumer.cpp
    - ERROR -> error
    - WARNING -> warning

---------

Co-authored-by: Richard Smith <richard@metafoo.co.uk>
This commit is contained in:
Jon Ross-Perkins
2024-09-19 21:32:53 +00:00
committed by GitHub
co-authored by Richard Smith
parent 7f6d684b29
commit e7aebbe581
578 changed files with 2166 additions and 2173 deletions
+11 -11
View File
@@ -28,7 +28,7 @@ export Foo.Bar;
package Pkg;
// CHECK:STDERR: fail_expr.carbon:[[@LINE+4]]:8: ERROR: `export` introducer should be followed by a name.
// CHECK:STDERR: fail_expr.carbon:[[@LINE+4]]:8: error: `export` introducer should be followed by a name
// CHECK:STDERR: export ();
// CHECK:STDERR: ^
// CHECK:STDERR:
@@ -38,7 +38,7 @@ export ();
package Pkg;
// CHECK:STDERR: fail_package_in_name.carbon:[[@LINE+4]]:8: ERROR: `export` introducer should be followed by a name.
// CHECK:STDERR: fail_package_in_name.carbon:[[@LINE+4]]:8: error: `export` introducer should be followed by a name
// CHECK:STDERR: export package.Bar;
// CHECK:STDERR: ^~~~~~~
// CHECK:STDERR:
@@ -48,7 +48,7 @@ export package.Bar;
package Pkg;
// CHECK:STDERR: fail_keyword_only:[[@LINE+4]]:1: ERROR: `export` introducer should be followed by a name.
// CHECK:STDERR: fail_keyword_only:[[@LINE+4]]:1: error: `export` introducer should be followed by a name
// CHECK:STDERR: export
// CHECK:STDERR: ^~~~~~
// CHECK:STDERR:
@@ -58,7 +58,7 @@ export
package Pkg;
// CHECK:STDERR: fail_no_name.carbon:[[@LINE+4]]:8: ERROR: `export` introducer should be followed by a name.
// CHECK:STDERR: fail_no_name.carbon:[[@LINE+4]]:8: error: `export` introducer should be followed by a name
// CHECK:STDERR: export ;
// CHECK:STDERR: ^
// CHECK:STDERR:
@@ -69,7 +69,7 @@ export ;
package Pkg;
export Foo
// CHECK:STDERR: fail_no_semi.carbon:[[@LINE+4]]:1: ERROR: `export` declarations must end with a `;`.
// CHECK:STDERR: fail_no_semi.carbon:[[@LINE+4]]:1: error: `export` declarations must end with a `;`
// CHECK:STDERR:
// CHECK:STDERR: ^
// CHECK:STDERR:
@@ -78,7 +78,7 @@ export Foo
package Pkg;
// CHECK:STDERR: fail_incomplete_qual_name.carbon:[[@LINE+4]]:12: ERROR: `.` should be followed by a name.
// CHECK:STDERR: fail_incomplete_qual_name.carbon:[[@LINE+4]]:12: error: `.` should be followed by a name
// CHECK:STDERR: export Foo.;
// CHECK:STDERR: ^
// CHECK:STDERR:
@@ -88,7 +88,7 @@ export Foo.;
package Pkg;
// CHECK:STDERR: fail_incomplete_qual_name2.carbon:[[@LINE+4]]:8: ERROR: `export` introducer should be followed by a name.
// CHECK:STDERR: fail_incomplete_qual_name2.carbon:[[@LINE+4]]:8: error: `export` introducer should be followed by a name
// CHECK:STDERR: export .Bar;
// CHECK:STDERR: ^
// CHECK:STDERR:
@@ -108,10 +108,10 @@ package Pkg;
export Foo;
// CHECK:STDERR: fail_before_import.carbon:[[@LINE+7]]:1: ERROR: `import` declarations must come after the `package` declaration (if present) and before any other entities in the file.
// CHECK:STDERR: fail_before_import.carbon:[[@LINE+7]]:1: error: `import` declarations must come after the `package` declaration (if present) and before any other entities in the file
// CHECK:STDERR: import library "lib";
// CHECK:STDERR: ^~~~~~
// CHECK:STDERR: fail_before_import.carbon:[[@LINE-5]]:1: First declaration is here.
// CHECK:STDERR: fail_before_import.carbon:[[@LINE-5]]:1: first declaration is here
// CHECK:STDERR: export Foo;
// CHECK:STDERR: ^~~~~~
// CHECK:STDERR:
@@ -119,7 +119,7 @@ import library "lib";
// --- fail_in_default_library.carbon
// CHECK:STDERR: fail_in_default_library.carbon:[[@LINE+4]]:1: ERROR: `export` is only allowed in API files.
// CHECK:STDERR: fail_in_default_library.carbon:[[@LINE+4]]:1: error: `export` is only allowed in API files
// CHECK:STDERR: export Foo;
// CHECK:STDERR: ^~~~~~
// CHECK:STDERR:
@@ -129,7 +129,7 @@ export Foo;
impl package Pkg;
// CHECK:STDERR: fail_in_impl.carbon:[[@LINE+3]]:1: ERROR: `export` is only allowed in API files.
// CHECK:STDERR: fail_in_impl.carbon:[[@LINE+3]]:1: error: `export` is only allowed in API files
// CHECK:STDERR: export Foo;
// CHECK:STDERR: ^~~~~~
export Foo;
+5 -5
View File
@@ -12,7 +12,7 @@
package Pkg;
// CHECK:STDERR: fail_package.carbon:[[@LINE+4]]:15: ERROR: `export` cannot be used when importing a package.
// CHECK:STDERR: fail_package.carbon:[[@LINE+4]]:15: error: `export` cannot be used when importing a package
// CHECK:STDERR: export import Bar;
// CHECK:STDERR: ^~~
// CHECK:STDERR:
@@ -38,10 +38,10 @@ export import library "a";
class C;
// CHECK:STDERR: fail_order.carbon:[[@LINE+7]]:1: ERROR: `import` declarations must come after the `package` declaration (if present) and before any other entities in the file.
// CHECK:STDERR: fail_order.carbon:[[@LINE+7]]:1: error: `import` declarations must come after the `package` declaration (if present) and before any other entities in the file
// CHECK:STDERR: export import library "b";
// CHECK:STDERR: ^~~~~~
// CHECK:STDERR: fail_order.carbon:[[@LINE-5]]:1: First declaration is here.
// CHECK:STDERR: fail_order.carbon:[[@LINE-5]]:1: first declaration is here
// CHECK:STDERR: class C;
// CHECK:STDERR: ^~~~~
// CHECK:STDERR:
@@ -49,7 +49,7 @@ export import library "b";
// --- fail_in_default_library.carbon
// CHECK:STDERR: fail_in_default_library.carbon:[[@LINE+4]]:1: ERROR: `export` is only allowed in API files.
// CHECK:STDERR: fail_in_default_library.carbon:[[@LINE+4]]:1: error: `export` is only allowed in API files
// CHECK:STDERR: export import library "lib";
// CHECK:STDERR: ^~~~~~
// CHECK:STDERR:
@@ -59,7 +59,7 @@ export import library "lib";
impl package Pkg;
// CHECK:STDERR: fail_in_impl.carbon:[[@LINE+3]]:1: ERROR: `export` is only allowed in API files.
// CHECK:STDERR: fail_in_impl.carbon:[[@LINE+3]]:1: error: `export` is only allowed in API files
// CHECK:STDERR: export import library "lib";
// CHECK:STDERR: ^~~~~~
export import library "lib";
@@ -10,10 +10,10 @@
fn A();
// CHECK:STDERR: fail_after_decl.carbon:[[@LINE+6]]:1: ERROR: `import` declarations must come after the `package` declaration (if present) and before any other entities in the file.
// CHECK:STDERR: fail_after_decl.carbon:[[@LINE+6]]:1: error: `import` declarations must come after the `package` declaration (if present) and before any other entities in the file
// CHECK:STDERR: import B;
// CHECK:STDERR: ^~~~~~
// CHECK:STDERR: fail_after_decl.carbon:[[@LINE-5]]:1: First declaration is here.
// CHECK:STDERR: fail_after_decl.carbon:[[@LINE-5]]:1: first declaration is here
// CHECK:STDERR: fn A();
// CHECK:STDERR: ^~
import B;
@@ -10,10 +10,10 @@
fn A();
// CHECK:STDERR: fail_after_decl_repeated.carbon:[[@LINE+7]]:1: ERROR: `import` declarations must come after the `package` declaration (if present) and before any other entities in the file.
// CHECK:STDERR: fail_after_decl_repeated.carbon:[[@LINE+7]]:1: error: `import` declarations must come after the `package` declaration (if present) and before any other entities in the file
// CHECK:STDERR: import B;
// CHECK:STDERR: ^~~~~~
// CHECK:STDERR: fail_after_decl_repeated.carbon:[[@LINE-5]]:1: First declaration is here.
// CHECK:STDERR: fail_after_decl_repeated.carbon:[[@LINE-5]]:1: first declaration is here
// CHECK:STDERR: fn A();
// CHECK:STDERR: ^~
// CHECK:STDERR:
@@ -21,10 +21,10 @@ import B;
// Note this is still invalid, but doesn't warn because it's sequential.
import C;
// CHECK:STDERR: fail_after_decl_repeated.carbon:[[@LINE+7]]:1: ERROR: The `package` declaration must be the first non-comment line.
// CHECK:STDERR: fail_after_decl_repeated.carbon:[[@LINE+7]]:1: error: the `package` declaration must be the first non-comment line
// CHECK:STDERR: package D;
// CHECK:STDERR: ^~~~~~~
// CHECK:STDERR: fail_after_decl_repeated.carbon:[[@LINE-16]]:1: First non-comment line is here.
// CHECK:STDERR: fail_after_decl_repeated.carbon:[[@LINE-16]]:1: first non-comment line is here
// CHECK:STDERR: fn A();
// CHECK:STDERR: ^~
// CHECK:STDERR:
@@ -32,10 +32,10 @@ package D;
fn E();
// CHECK:STDERR: fail_after_decl_repeated.carbon:[[@LINE+6]]:1: ERROR: `import` declarations must come after the `package` declaration (if present) and before any other entities in the file.
// CHECK:STDERR: fail_after_decl_repeated.carbon:[[@LINE+6]]:1: error: `import` declarations must come after the `package` declaration (if present) and before any other entities in the file
// CHECK:STDERR: import F;
// CHECK:STDERR: ^~~~~~
// CHECK:STDERR: fail_after_decl_repeated.carbon:[[@LINE-27]]:1: First declaration is here.
// CHECK:STDERR: fail_after_decl_repeated.carbon:[[@LINE-27]]:1: first declaration is here
// CHECK:STDERR: fn A();
// CHECK:STDERR: ^~
import F;
@@ -8,7 +8,7 @@
// TIP: To dump output, run:
// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/packages/import/fail_extra_string.carbon
// CHECK:STDERR: fail_extra_string.carbon:[[@LINE+3]]:26: ERROR: `import` declarations must end with a `;`.
// CHECK:STDERR: fail_extra_string.carbon:[[@LINE+3]]:26: error: `import` declarations must end with a `;`
// CHECK:STDERR: import Foo library "bar" "baz";
// CHECK:STDERR: ^~~~~
import Foo library "bar" "baz";
@@ -8,7 +8,7 @@
// TIP: To dump output, run:
// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/packages/import/fail_library_is_identifier.carbon
// CHECK:STDERR: fail_library_is_identifier.carbon:[[@LINE+3]]:25: ERROR: Expected a string literal to specify the library name.
// CHECK:STDERR: fail_library_is_identifier.carbon:[[@LINE+3]]:25: error: expected a string literal to specify the library name
// CHECK:STDERR: import Geometry library Shapes;
// CHECK:STDERR: ^~~~~~
import Geometry library Shapes;
@@ -8,7 +8,7 @@
// TIP: To dump output, run:
// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/packages/import/fail_name_is_keyword.carbon
// CHECK:STDERR: fail_name_is_keyword.carbon:[[@LINE+3]]:8: ERROR: Expected identifier or `library` after `import`.
// CHECK:STDERR: fail_name_is_keyword.carbon:[[@LINE+3]]:8: error: expected identifier or `library` after `import`
// CHECK:STDERR: import fn;
// CHECK:STDERR: ^~
import fn;
@@ -8,7 +8,7 @@
// TIP: To dump output, run:
// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/packages/import/fail_no_name.carbon
// CHECK:STDERR: fail_no_name.carbon:[[@LINE+3]]:7: ERROR: Expected identifier or `library` after `import`.
// CHECK:STDERR: fail_no_name.carbon:[[@LINE+3]]:7: error: expected identifier or `library` after `import`
// CHECK:STDERR: import;
// CHECK:STDERR: ^
import;
@@ -10,7 +10,7 @@
import Geometry
// CHECK:STDERR: fail_no_semi.carbon:[[@LINE+10]]:21: ERROR: `import` declarations must end with a `;`.
// CHECK:STDERR: fail_no_semi.carbon:[[@LINE+10]]:21: error: `import` declarations must end with a `;`
// CHECK:STDERR: // CHECK:STDOUT: ]
// CHECK:STDERR: ^
// CHECK:STDOUT: - filename: fail_no_semi.carbon
@@ -8,7 +8,7 @@
// TIP: To dump output, run:
// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/packages/import/fail_omit_library_keyword.carbon
// CHECK:STDERR: fail_omit_library_keyword.carbon:[[@LINE+3]]:17: ERROR: Missing `library` keyword.
// CHECK:STDERR: fail_omit_library_keyword.carbon:[[@LINE+3]]:17: error: missing `library` keyword
// CHECK:STDERR: import Geometry "Shapes";
// CHECK:STDERR: ^~~~~~~~
import Geometry "Shapes";
+1 -1
View File
@@ -8,7 +8,7 @@
// TIP: To dump output, run:
// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/packages/import/fail_type.carbon
// CHECK:STDERR: fail_type.carbon:[[@LINE+3]]:17: ERROR: `import` declarations must end with a `;`.
// CHECK:STDERR: fail_type.carbon:[[@LINE+3]]:17: error: `import` declarations must end with a `;`
// CHECK:STDERR: import Geometry api;
// CHECK:STDERR: ^~~
import Geometry api;
@@ -10,7 +10,7 @@
// --- fail_identifier.carbon
// CHECK:STDERR: fail_identifier.carbon:[[@LINE+4]]:9: ERROR: Expected `default` or a string literal to specify the library name.
// CHECK:STDERR: fail_identifier.carbon:[[@LINE+4]]:9: error: expected `default` or a string literal to specify the library name
// CHECK:STDERR: library Shapes;
// CHECK:STDERR: ^~~~~~
// CHECK:STDERR:
@@ -18,7 +18,7 @@ library Shapes;
// --- fail_raw_identifier.carbon
// CHECK:STDERR: fail_raw_identifier.carbon:[[@LINE+4]]:9: ERROR: Expected `default` or a string literal to specify the library name.
// CHECK:STDERR: fail_raw_identifier.carbon:[[@LINE+4]]:9: error: expected `default` or a string literal to specify the library name
// CHECK:STDERR: library r#default;
// CHECK:STDERR: ^~~~~~~
// CHECK:STDERR:
@@ -26,7 +26,7 @@ library r#default;
// --- fail_missing.carbon
// CHECK:STDERR: fail_missing.carbon:[[@LINE+4]]:8: ERROR: Expected `default` or a string literal to specify the library name.
// CHECK:STDERR: fail_missing.carbon:[[@LINE+4]]:8: error: expected `default` or a string literal to specify the library name
// CHECK:STDERR: library;
// CHECK:STDERR: ^
// CHECK:STDERR:
@@ -34,7 +34,7 @@ library;
// --- fail_missing_with_api.carbon
// CHECK:STDERR: fail_missing_with_api.carbon:[[@LINE+4]]:8: ERROR: Expected `default` or a string literal to specify the library name.
// CHECK:STDERR: fail_missing_with_api.carbon:[[@LINE+4]]:8: error: expected `default` or a string literal to specify the library name
// CHECK:STDERR: library;
// CHECK:STDERR: ^
// CHECK:STDERR:
@@ -42,7 +42,7 @@ library;
// --- fail_trailing_impl.carbon
// CHECK:STDERR: fail_trailing_impl.carbon:[[@LINE+4]]:25: ERROR: `library` declarations must end with a `;`.
// CHECK:STDERR: fail_trailing_impl.carbon:[[@LINE+4]]:25: error: `library` declarations must end with a `;`
// CHECK:STDERR: library "trailing_impl" impl
// CHECK:STDERR: ^~~~
// CHECK:STDERR:
@@ -52,7 +52,7 @@ library "[[@TEST_NAME]]" impl
library "[[@TEST_NAME]]"
// CHECK:STDERR: fail_no_semi.carbon:[[@LINE+46]]:21: ERROR: `library` declarations must end with a `;`.
// CHECK:STDERR: fail_no_semi.carbon:[[@LINE+46]]:21: error: `library` declarations must end with a `;`
// CHECK:STDERR: // CHECK:STDOUT: ]
// CHECK:STDERR: ^
// CHECK:STDOUT: - filename: fail_identifier.carbon
@@ -10,10 +10,10 @@
;
// CHECK:STDERR: fail_semi_before.carbon:[[@LINE+6]]:1: ERROR: The `library` declaration must be the first non-comment line.
// CHECK:STDERR: fail_semi_before.carbon:[[@LINE+6]]:1: error: the `library` declaration must be the first non-comment line
// CHECK:STDERR: library "semi_before";
// CHECK:STDERR: ^~~~~~~
// CHECK:STDERR: fail_semi_before.carbon:[[@LINE-5]]:1: First non-comment line is here.
// CHECK:STDERR: fail_semi_before.carbon:[[@LINE-5]]:1: first non-comment line is here
// CHECK:STDERR: ;
// CHECK:STDERR: ^
library "[[@TEST_NAME]]";
@@ -10,10 +10,10 @@
import Geometry;
// CHECK:STDERR: fail_too_late.carbon:[[@LINE+6]]:1: ERROR: The `library` declaration must be the first non-comment line.
// CHECK:STDERR: fail_too_late.carbon:[[@LINE+6]]:1: error: the `library` declaration must be the first non-comment line
// CHECK:STDERR: library "too_late";
// CHECK:STDERR: ^~~~~~~
// CHECK:STDERR: fail_too_late.carbon:[[@LINE-5]]:1: First non-comment line is here.
// CHECK:STDERR: fail_too_late.carbon:[[@LINE-5]]:1: first non-comment line is here
// CHECK:STDERR: import Geometry;
// CHECK:STDERR: ^~~~~~
library "[[@TEST_NAME]]";
@@ -10,10 +10,10 @@
fn A();
// CHECK:STDERR: fail_after_decl.carbon:[[@LINE+6]]:1: ERROR: The `package` declaration must be the first non-comment line.
// CHECK:STDERR: fail_after_decl.carbon:[[@LINE+6]]:1: error: the `package` declaration must be the first non-comment line
// CHECK:STDERR: package B;
// CHECK:STDERR: ^~~~~~~
// CHECK:STDERR: fail_after_decl.carbon:[[@LINE-5]]:1: First non-comment line is here.
// CHECK:STDERR: fail_after_decl.carbon:[[@LINE-5]]:1: first non-comment line is here
// CHECK:STDERR: fn A();
// CHECK:STDERR: ^~
package B;
@@ -10,10 +10,10 @@
import A;
// CHECK:STDERR: fail_after_import.carbon:[[@LINE+6]]:1: ERROR: The `package` declaration must be the first non-comment line.
// CHECK:STDERR: fail_after_import.carbon:[[@LINE+6]]:1: error: the `package` declaration must be the first non-comment line
// CHECK:STDERR: package B;
// CHECK:STDERR: ^~~~~~~
// CHECK:STDERR: fail_after_import.carbon:[[@LINE-5]]:1: First non-comment line is here.
// CHECK:STDERR: fail_after_import.carbon:[[@LINE-5]]:1: first non-comment line is here
// CHECK:STDERR: import A;
// CHECK:STDERR: ^~~~~~
package B;
@@ -9,10 +9,10 @@
// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/packages/package/fail_after_package.carbon
package A;
// CHECK:STDERR: fail_after_package.carbon:[[@LINE+6]]:1: ERROR: The `package` declaration must be the first non-comment line.
// CHECK:STDERR: fail_after_package.carbon:[[@LINE+6]]:1: error: the `package` declaration must be the first non-comment line
// CHECK:STDERR: package B;
// CHECK:STDERR: ^~~~~~~
// CHECK:STDERR: fail_after_package.carbon:[[@LINE-4]]:1: First non-comment line is here.
// CHECK:STDERR: fail_after_package.carbon:[[@LINE-4]]:1: first non-comment line is here
// CHECK:STDERR: package A;
// CHECK:STDERR: ^~~~~~~
package B;
@@ -8,7 +8,7 @@
// TIP: To dump output, run:
// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/packages/package/fail_extra_string.carbon
// CHECK:STDERR: fail_extra_string.carbon:[[@LINE+3]]:27: ERROR: `package` declarations must end with a `;`.
// CHECK:STDERR: fail_extra_string.carbon:[[@LINE+3]]:27: error: `package` declarations must end with a `;`
// CHECK:STDERR: package Foo library "bar" "baz";
// CHECK:STDERR: ^~~~~
package Foo library "bar" "baz";
@@ -8,7 +8,7 @@
// TIP: To dump output, run:
// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/packages/package/fail_library_is_identifier.carbon
// CHECK:STDERR: fail_library_is_identifier.carbon:[[@LINE+3]]:26: ERROR: Expected a string literal to specify the library name.
// CHECK:STDERR: fail_library_is_identifier.carbon:[[@LINE+3]]:26: error: expected a string literal to specify the library name
// CHECK:STDERR: package Geometry library Shapes;
// CHECK:STDERR: ^~~~~~
package Geometry library Shapes;
@@ -8,7 +8,7 @@
// TIP: To dump output, run:
// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/packages/package/fail_library_skips_name.carbon
// CHECK:STDERR: fail_library_skips_name.carbon:[[@LINE+3]]:9: ERROR: Expected identifier after `package`.
// CHECK:STDERR: fail_library_skips_name.carbon:[[@LINE+3]]:9: error: expected identifier after `package`
// CHECK:STDERR: package library "Shapes";
// CHECK:STDERR: ^~~~~~~
package library "Shapes";
@@ -8,7 +8,7 @@
// TIP: To dump output, run:
// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/packages/package/fail_name_is_keyword.carbon
// CHECK:STDERR: fail_name_is_keyword.carbon:[[@LINE+3]]:9: ERROR: Expected identifier after `package`.
// CHECK:STDERR: fail_name_is_keyword.carbon:[[@LINE+3]]:9: error: expected identifier after `package`
// CHECK:STDERR: package fn;
// CHECK:STDERR: ^~
package fn;
@@ -8,7 +8,7 @@
// TIP: To dump output, run:
// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/packages/package/fail_no_name.carbon
// CHECK:STDERR: fail_no_name.carbon:[[@LINE+3]]:8: ERROR: Expected identifier after `package`.
// CHECK:STDERR: fail_no_name.carbon:[[@LINE+3]]:8: error: expected identifier after `package`
// CHECK:STDERR: package;
// CHECK:STDERR: ^
package;
@@ -10,7 +10,7 @@
package Geometry
// CHECK:STDERR: fail_no_semi.carbon:[[@LINE+10]]:21: ERROR: `package` declarations must end with a `;`.
// CHECK:STDERR: fail_no_semi.carbon:[[@LINE+10]]:21: error: `package` declarations must end with a `;`
// CHECK:STDERR: // CHECK:STDOUT: ]
// CHECK:STDERR: ^
// CHECK:STDOUT: - filename: fail_no_semi.carbon
@@ -8,7 +8,7 @@
// TIP: To dump output, run:
// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/packages/package/fail_omit_library_keyword.carbon
// CHECK:STDERR: fail_omit_library_keyword.carbon:[[@LINE+3]]:18: ERROR: Missing `library` keyword.
// CHECK:STDERR: fail_omit_library_keyword.carbon:[[@LINE+3]]:18: error: missing `library` keyword
// CHECK:STDERR: package Geometry "Shapes";
// CHECK:STDERR: ^~~~~~~~
package Geometry "Shapes";
@@ -10,10 +10,10 @@
;
// CHECK:STDERR: fail_semi_before.carbon:[[@LINE+6]]:1: ERROR: The `package` declaration must be the first non-comment line.
// CHECK:STDERR: fail_semi_before.carbon:[[@LINE+6]]:1: error: the `package` declaration must be the first non-comment line
// CHECK:STDERR: package Geometry;
// CHECK:STDERR: ^~~~~~~
// CHECK:STDERR: fail_semi_before.carbon:[[@LINE-5]]:1: First non-comment line is here.
// CHECK:STDERR: fail_semi_before.carbon:[[@LINE-5]]:1: first non-comment line is here
// CHECK:STDERR: ;
// CHECK:STDERR: ^
package Geometry;
@@ -8,7 +8,7 @@
// TIP: To dump output, run:
// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/packages/package/fail_trailing_impl.carbon
// CHECK:STDERR: fail_trailing_impl.carbon:[[@LINE+3]]:18: ERROR: `package` declarations must end with a `;`.
// CHECK:STDERR: fail_trailing_impl.carbon:[[@LINE+3]]:18: error: `package` declarations must end with a `;`
// CHECK:STDERR: package Geometry impl;
// CHECK:STDERR: ^~~~
package Geometry impl;