From e4a04c2936c9ba0a8ac9cf6d0981e4b54a0c9f11 Mon Sep 17 00:00:00 2001 From: Jon Ross-Perkins Date: Fri, 12 May 2023 10:40:22 -0700 Subject: [PATCH] Use new test framework in toolchain to reduce per-test overhead (#2821) This builds on #2814 by adding the test framework to the toolchain. On Linux, this is 7s -> 4s for me. #2811 has more detailed timing for the explorer, which also had more dramatic changes because it's about 3x more tests run in 2x as many ways (6x total). Co-authored-by: Chandler Carruth --- toolchain/diagnostics/diagnostic_emitter.h | 38 +++++++++++------- toolchain/driver/BUILD | 2 - toolchain/driver/driver.cpp | 4 +- .../testdata/semantics_builtin_nodes.carbon} | 1 - .../testdata/semantics_verbose.carbon} | 1 - toolchain/lexer/BUILD | 24 ++++++++++++ toolchain/lexer/lexer_file_test.cpp | 37 ++++++++++++++++++ toolchain/lexer/lit_autoupdate.py | 1 - toolchain/lexer/testdata/BUILD | 27 ------------- toolchain/lexer/testdata/carbon_test.carbon | 1 - toolchain/lexer/testdata/lit.cfg.py | 1 - toolchain/lowering/BUILD | 37 ++++++++++++++++++ toolchain/lowering/lit_autoupdate.py | 1 - toolchain/lowering/lowering_file_test.cpp | 37 ++++++++++++++++++ toolchain/lowering/testdata/BUILD | 39 ------------------- .../lowering/testdata/basics/empty.carbon | 5 +-- .../basics/fail_before_lowering.carbon | 3 +- .../lowering/testdata/basics/zero.carbon | 5 +-- .../function/definition/params_one.carbon | 5 +-- .../function/definition/params_two.carbon | 5 +-- .../function/definition/params_zero.carbon | 5 +-- toolchain/lowering/testdata/lit.cfg.py | 1 - .../lowering/testdata/return/no_value.carbon | 5 +-- .../lowering/testdata/return/value.carbon | 5 +-- toolchain/parser/BUILD | 36 +++++++++++++++++ toolchain/parser/lit_autoupdate.py | 1 - toolchain/parser/parse_tree_file_test.cpp | 37 ++++++++++++++++++ toolchain/parser/testdata/BUILD | 39 ------------------- .../testdata/basics/builtin_types.carbon | 1 - toolchain/parser/testdata/basics/empty.carbon | 1 - .../testdata/basics/empty_declaration.carbon | 1 - .../basics/fail_invalid_designators.carbon | 7 ++-- .../basics/fail_no_intro_with_semi.carbon | 3 +- .../basics/fail_no_intro_without_semi.carbon | 3 +- .../basics/fail_paren_match_regression.carbon | 7 ++-- .../testdata/basics/function_call.carbon | 1 - toolchain/parser/testdata/class/basic.carbon | 1 - .../testdata/class/fn_definitions.carbon | 1 - toolchain/parser/testdata/class/var.carbon | 1 - .../for/fail_colon_instead_of_in.carbon | 3 +- .../testdata/for/fail_missing_in.carbon | 3 +- .../testdata/for/fail_missing_var.carbon | 3 +- toolchain/parser/testdata/for/nested.carbon | 1 - toolchain/parser/testdata/for/simple.carbon | 1 - .../testdata/function/declaration/addr.carbon | 1 - .../function/declaration/basic.carbon | 1 - .../function/declaration/deduced_empty.carbon | 1 - .../declaration/deduced_params.carbon | 1 - .../fail_identifier_instead_of_sig.carbon | 3 +- .../fail_missing_deduced_close.carbon | 7 ++-- .../declaration/fail_missing_name.carbon | 3 +- .../declaration/fail_no_sig_or_semi.carbon | 3 +- .../declaration/fail_only_fn_and_semi.carbon | 3 +- .../fail_repeated_fn_and_semi.carbon | 3 +- ...skip_indented_newline_until_outdent.carbon | 3 +- ...ail_skip_indented_newline_with_semi.carbon | 3 +- ..._skip_indented_newline_without_semi.carbon | 3 +- .../fail_skip_to_newline_without_semi.carbon | 3 +- .../fail_skip_without_semi_to_curly.carbon | 3 +- .../fail_with_identifier_as_param.carbon | 3 +- ...hout_name_and_many_tokens_in_params.carbon | 3 +- .../function/declaration/params.carbon | 1 - .../declaration/with_return_type.carbon | 1 - .../testdata/function/definition/basic.carbon | 1 - .../fail_identifier_in_statements.carbon | 3 +- .../function/definition/with_params.carbon | 1 - .../definition/with_return_type.carbon | 1 - .../generics/deduced_params/empty.carbon | 1 - .../deduced_params/fail_no_parens.carbon | 9 ++--- .../generics/deduced_params/one.carbon | 1 - .../deduced_params/one_suffix_comma.carbon | 1 - .../generics/deduced_params/six.carbon | 1 - .../generics/deduced_params/two.carbon | 1 - .../deduced_params/two_suffix_comma.carbon | 1 - .../generics/generic_params/basic.carbon | 1 - .../generics/generic_params/template.carbon | 1 - .../generic_params/template_addr.carbon | 1 - .../testdata/generics/interface/basic.carbon | 1 - .../generics/interface/declaration.carbon | 1 - .../generics/interface/empty_body.carbon | 1 - .../interface/fail_missing_name.carbon | 3 +- .../interface/fail_missing_open_curly.carbon | 5 +-- .../interface/fail_no_impl_allowed.carbon | 3 +- .../interface/fail_self_param_syntax.carbon | 5 +-- .../generics/interface/non_instance_fn.carbon | 1 - .../generics/interface/self_pointer.carbon | 1 - .../generics/named_constraint/basic.carbon | 1 - .../fail_no_impl_allowed.carbon | 3 +- .../testdata/generics/params/empty.carbon | 1 - .../testdata/generics/params/one.carbon | 1 - .../generics/params/one_suffix_comma.carbon | 1 - .../testdata/generics/params/six.carbon | 1 - .../testdata/generics/params/two.carbon | 1 - .../generics/params/two_suffix_comma.carbon | 1 - toolchain/parser/testdata/if/basic.carbon | 1 - toolchain/parser/testdata/if/else.carbon | 1 - .../testdata/if/fail_else_unbraced.carbon | 9 ++--- .../parser/testdata/if/fail_errors.carbon | 11 +++--- .../parser/testdata/if/fail_unbraced.carbon | 7 ++-- toolchain/parser/testdata/lit.cfg.py | 1 - .../testdata/operators/associative.carbon | 1 - .../fail_infix_uneven_space_after.carbon | 3 +- .../operators/fail_invalid_infix.carbon | 9 ++--- .../operators/fail_precedence_and_or.carbon | 3 +- .../operators/fail_precedence_or_and.carbon | 3 +- .../fail_precedence_star_minus.carbon | 3 +- .../fail_precedence_star_star.carbon | 3 +- .../operators/fail_star_star_no_space.carbon | 3 +- .../testdata/operators/fail_variety.carbon | 9 ++--- .../testdata/operators/fixity_in_call.carbon | 1 - .../operators/fixity_in_params.carbon | 1 - .../testdata/operators/fixity_in_var.carbon | 1 - .../operators/fixity_with_assign.carbon | 1 - .../parser/testdata/operators/infix.carbon | 1 - .../testdata/operators/infix_no_space.carbon | 1 - .../operators/infix_with_paren_after.carbon | 1 - .../operators/infix_with_paren_before.carbon | 1 - .../operators/missing_precedence_not.carbon | 7 ++-- .../parser/testdata/operators/postfix.carbon | 1 - .../testdata/operators/postfix_repeat.carbon | 1 - .../operators/postfix_space_after_op.carbon | 1 - .../parser/testdata/operators/prefix.carbon | 1 - .../testdata/operators/prefix_no_space.carbon | 1 - .../testdata/operators/prefix_repeat.carbon | 1 - .../recover_infix_uneven_space_before.carbon | 3 +- .../operators/recover_postfix_space.carbon | 3 +- .../recover_postfix_space_before_comma.carbon | 3 +- .../recover_postfix_space_in_call.carbon | 3 +- .../recover_postfix_space_surrounding.carbon | 5 +-- .../operators/recover_prefix_space.carbon | 5 +-- ...ver_prefix_uneven_space_with_assign.carbon | 3 +- toolchain/parser/testdata/package/api.carbon | 1 - .../testdata/package/api_library.carbon | 1 - .../testdata/package/fail_extra_string.carbon | 3 +- .../package/fail_library_is_identifier.carbon | 3 +- .../package/fail_library_skips_name.carbon | 3 +- .../package/fail_name_is_keyword.carbon | 3 +- .../testdata/package/fail_no_name.carbon | 3 +- .../testdata/package/fail_no_semi.carbon | 3 +- .../testdata/package/fail_no_type.carbon | 3 +- .../package/fail_omit_library_keyword.carbon | 3 +- toolchain/parser/testdata/package/impl.carbon | 1 - .../testdata/package/impl_library.carbon | 1 - toolchain/parser/testdata/return/basic.carbon | 1 - toolchain/parser/testdata/return/expr.carbon | 1 - .../testdata/return/fail_expr_no_semi.carbon | 3 +- .../testdata/return/fail_no_semi.carbon | 5 +-- .../testdata/struct/fail_comma_only.carbon | 3 +- .../struct/fail_comma_repeat_in_type.carbon | 3 +- .../struct/fail_comma_repeat_in_value.carbon | 3 +- .../testdata/struct/fail_dot_only.carbon | 3 +- .../struct/fail_dot_string_colon.carbon | 3 +- .../struct/fail_dot_string_equals.carbon | 3 +- .../struct/fail_extra_token_in_type.carbon | 3 +- .../struct/fail_extra_token_in_value.carbon | 3 +- .../struct/fail_identifier_colon.carbon | 3 +- .../struct/fail_identifier_equals.carbon | 3 +- .../struct/fail_identifier_only.carbon | 3 +- .../testdata/struct/fail_missing_type.carbon | 3 +- .../testdata/struct/fail_missing_value.carbon | 3 +- .../struct/fail_mix_type_and_value.carbon | 3 +- .../struct/fail_mix_value_and_type.carbon | 3 +- .../struct/fail_mix_with_unknown.carbon | 9 ++--- .../struct/fail_no_colon_or_equals.carbon | 3 +- .../struct/fail_type_no_designator.carbon | 3 +- .../parser/testdata/struct/no_entries.carbon | 1 - .../testdata/struct/one_entry_no_comma.carbon | 1 - .../struct/one_entry_with_comma.carbon | 1 - .../parser/testdata/struct/two_entries.carbon | 1 - toolchain/parser/testdata/tuple/nested.carbon | 1 - .../parser/testdata/tuple/two_entries.carbon | 1 - .../parser/testdata/var/fail_bad_name.carbon | 3 +- .../parser/testdata/var/fail_empty.carbon | 3 +- toolchain/parser/testdata/var/var.carbon | 1 - toolchain/parser/testdata/while/basic.carbon | 1 - .../parser/testdata/while/fail_no_semi.carbon | 5 +-- .../testdata/while/fail_unbraced.carbon | 3 +- toolchain/semantics/BUILD | 37 ++++++++++++++++++ toolchain/semantics/lit_autoupdate.py | 1 - toolchain/semantics/semantics_file_test.cpp | 37 ++++++++++++++++++ toolchain/semantics/testdata/BUILD | 39 ------------------- .../testdata/basics/builtin_types.carbon | 1 - .../semantics/testdata/basics/empty.carbon | 1 - .../testdata/basics/empty_decl.carbon | 1 - .../testdata/basics/fail_name_lookup.carbon | 3 +- .../designators/fail_unsupported.carbon | 3 +- .../function/call/empty_struct.carbon | 1 - .../function/call/fail_param_count.carbon | 25 ++++++------ .../function/call/fail_param_type.carbon | 5 +-- .../call/fail_return_type_mismatch.carbon | 3 +- .../testdata/function/call/i32.carbon | 1 - .../function/call/more_param_ir.carbon | 1 - .../testdata/function/call/params_one.carbon | 1 - .../function/call/params_one_comma.carbon | 1 - .../testdata/function/call/params_two.carbon | 1 - .../function/call/params_two_comma.carbon | 1 - .../testdata/function/call/params_zero.carbon | 1 - .../fail_param_name_conflict.carbon | 5 +-- .../testdata/function/definition/order.carbon | 1 - .../function/definition/params_one.carbon | 1 - .../definition/params_one_comma.carbon | 1 - .../function/definition/params_two.carbon | 1 - .../definition/params_two_comma.carbon | 1 - .../function/definition/params_zero.carbon | 1 - .../definition/same_param_name.carbon | 1 - toolchain/semantics/testdata/lit.cfg.py | 1 - .../testdata/operators/binary_op.carbon | 1 - .../operators/fail_type_mismatch.carbon | 3 +- .../operators/fail_type_mismatch_once.carbon | 3 +- .../testdata/return/fail_type_mismatch.carbon | 3 +- .../return/fail_value_disallowed.carbon | 5 +-- .../testdata/return/fail_value_missing.carbon | 3 +- .../semantics/testdata/return/no_value.carbon | 1 - .../semantics/testdata/return/struct.carbon | 1 - .../semantics/testdata/return/value.carbon | 1 - .../semantics/testdata/struct/empty.carbon | 1 - .../testdata/struct/fail_assign_empty.carbon | 3 +- .../struct/fail_assign_to_empty.carbon | 3 +- .../struct/fail_field_name_mismatch.carbon | 3 +- .../struct/fail_field_type_mismatch.carbon | 3 +- .../struct/fail_member_access_type.carbon | 3 +- .../struct/fail_non_member_access.carbon | 3 +- .../struct/fail_too_few_values.carbon | 3 +- .../testdata/struct/fail_type_assign.carbon | 3 +- .../testdata/struct/fail_value_as_type.carbon | 3 +- .../testdata/struct/member_access.carbon | 1 - .../testdata/struct/one_entry.carbon | 1 - .../testdata/struct/two_entries.carbon | 1 - toolchain/semantics/testdata/var/decl.carbon | 1 - .../testdata/var/decl_with_init.carbon | 1 - .../testdata/var/fail_duplicate_decl.carbon | 5 +-- .../var/fail_init_type_mismatch.carbon | 3 +- .../testdata/var/fail_init_with_self.carbon | 3 +- .../var/fail_lookup_outside_scope.carbon | 3 +- .../var/fail_storage_is_literal.carbon | 3 +- .../semantics/testdata/var/global_decl.carbon | 1 - .../testdata/var/global_decl_with_init.carbon | 1 - .../testdata/var/global_lookup.carbon | 1 - .../var/global_lookup_in_scope.carbon | 1 - .../semantics/testdata/var/lookup.carbon | 1 - 240 files changed, 476 insertions(+), 555 deletions(-) rename toolchain/{semantics/testdata/basics/builtin_nodes.carbon => driver/testdata/semantics_builtin_nodes.carbon} (99%) rename toolchain/{semantics/testdata/basics/verbose.carbon => driver/testdata/semantics_verbose.carbon} (97%) create mode 100644 toolchain/lexer/lexer_file_test.cpp delete mode 100644 toolchain/lexer/testdata/BUILD delete mode 120000 toolchain/lexer/testdata/lit.cfg.py create mode 100644 toolchain/lowering/lowering_file_test.cpp delete mode 100644 toolchain/lowering/testdata/BUILD delete mode 120000 toolchain/lowering/testdata/lit.cfg.py create mode 100644 toolchain/parser/parse_tree_file_test.cpp delete mode 100644 toolchain/parser/testdata/BUILD delete mode 120000 toolchain/parser/testdata/lit.cfg.py create mode 100644 toolchain/semantics/semantics_file_test.cpp delete mode 100644 toolchain/semantics/testdata/BUILD delete mode 120000 toolchain/semantics/testdata/lit.cfg.py diff --git a/toolchain/diagnostics/diagnostic_emitter.h b/toolchain/diagnostics/diagnostic_emitter.h index 2a1f2299c34b..a47f3bdd7d45 100644 --- a/toolchain/diagnostics/diagnostic_emitter.h +++ b/toolchain/diagnostics/diagnostic_emitter.h @@ -296,22 +296,30 @@ class DiagnosticEmitter { DiagnosticConsumer* consumer_; }; +class StreamDiagnosticConsumer : public DiagnosticConsumer { + public: + explicit StreamDiagnosticConsumer(llvm::raw_ostream& stream) + : stream_(&stream) {} + + auto HandleDiagnostic(Diagnostic diagnostic) -> void override { + Print(diagnostic.message); + for (const auto& note : diagnostic.notes) { + Print(note); + } + } + auto Print(const DiagnosticMessage& message) -> void { + *stream_ << message.location.file_name << ":" + << message.location.line_number << ":" + << message.location.column_number << ": " + << message.format_fn(message) << "\n"; + } + + private: + llvm::raw_ostream* stream_; +}; + inline auto ConsoleDiagnosticConsumer() -> DiagnosticConsumer& { - class Consumer : public DiagnosticConsumer { - auto HandleDiagnostic(Diagnostic diagnostic) -> void override { - Print(diagnostic.message); - for (const auto& note : diagnostic.notes) { - Print(note); - } - } - auto Print(const DiagnosticMessage& message) -> void { - llvm::errs() << message.location.file_name << ":" - << message.location.line_number << ":" - << message.location.column_number << ": " - << message.format_fn(message) << "\n"; - } - }; - static auto* consumer = new Consumer; + static auto* consumer = new StreamDiagnosticConsumer(llvm::errs()); return *consumer; } diff --git a/toolchain/driver/BUILD b/toolchain/driver/BUILD index 00d0924ad80a..fce89fb4bd1f 100644 --- a/toolchain/driver/BUILD +++ b/toolchain/driver/BUILD @@ -7,8 +7,6 @@ load("//bazel/fuzzing:rules.bzl", "cc_fuzz_test") package(default_visibility = ["//visibility:public"]) -exports_files(["lit.cfg.py"]) - cc_library( name = "driver", srcs = ["driver.cpp"], diff --git a/toolchain/driver/driver.cpp b/toolchain/driver/driver.cpp index 3a6e59842973..66dfcb2573ca 100644 --- a/toolchain/driver/driver.cpp +++ b/toolchain/driver/driver.cpp @@ -13,6 +13,7 @@ #include "llvm/Support/Error.h" #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/Format.h" +#include "toolchain/diagnostics/diagnostic_emitter.h" #include "toolchain/diagnostics/sorting_diagnostic_consumer.h" #include "toolchain/lexer/tokenized_buffer.h" #include "toolchain/lowering/lower_to_llvm.h" @@ -40,7 +41,8 @@ auto GetSubcommand(llvm::StringRef name) -> Subcommand { } // namespace auto Driver::RunFullCommand(llvm::ArrayRef args) -> bool { - DiagnosticConsumer* consumer = &ConsoleDiagnosticConsumer(); + StreamDiagnosticConsumer stream_consumer(error_stream_); + DiagnosticConsumer* consumer = &stream_consumer; std::unique_ptr sorting_consumer; // TODO: Figure out a command-line support library, this is temporary. if (!args.empty() && args[0] == "-v") { diff --git a/toolchain/semantics/testdata/basics/builtin_nodes.carbon b/toolchain/driver/testdata/semantics_builtin_nodes.carbon similarity index 99% rename from toolchain/semantics/testdata/basics/builtin_nodes.carbon rename to toolchain/driver/testdata/semantics_builtin_nodes.carbon index b55ff2042351..e00d352f5799 100644 --- a/toolchain/semantics/testdata/basics/builtin_nodes.carbon +++ b/toolchain/driver/testdata/semantics_builtin_nodes.carbon @@ -2,7 +2,6 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // -// NOAUTOUPDATE // RUN: %{carbon} dump semantics-ir --include_builtins %s | \ // RUN: %{FileCheck-strict} // CHECK:STDOUT: cross_reference_irs_size: 1 diff --git a/toolchain/semantics/testdata/basics/verbose.carbon b/toolchain/driver/testdata/semantics_verbose.carbon similarity index 97% rename from toolchain/semantics/testdata/basics/verbose.carbon rename to toolchain/driver/testdata/semantics_verbose.carbon index 13dd078e5804..6dcce0cf8a30 100644 --- a/toolchain/semantics/testdata/basics/verbose.carbon +++ b/toolchain/driver/testdata/semantics_verbose.carbon @@ -2,7 +2,6 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // -// NOAUTOUPDATE // RUN: %{carbon} -v dump semantics-ir %s | %{FileCheck-allow-unmatched} // // Only checks a couple statements in order to minimize manual update churn. diff --git a/toolchain/lexer/BUILD b/toolchain/lexer/BUILD index 6d03d70670d4..0c23f7a7a75e 100644 --- a/toolchain/lexer/BUILD +++ b/toolchain/lexer/BUILD @@ -3,6 +3,8 @@ # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception load("//bazel/fuzzing:rules.bzl", "cc_fuzz_test") +load("//bazel/sh_run:rules.bzl", "glob_sh_run") +load("//testing/file_test:rules.bzl", "file_test") package(default_visibility = ["//visibility:public"]) @@ -228,3 +230,25 @@ cc_fuzz_test( "@llvm-project//llvm:Support", ], ) + +file_test( + name = "lexer_file_test", + srcs = ["lexer_file_test.cpp"], + tests = glob(["testdata/**/*.carbon"]), + deps = [ + "//testing/file_test:file_test_base", + "//toolchain/driver", + "@com_google_googletest//:gtest", + "@llvm-project//llvm:Support", + ], +) + +glob_sh_run( + args = [ + "$(location //toolchain/driver:carbon)", + "dump", + "tokens", + ], + data = ["//toolchain/driver:carbon"], + file_exts = ["carbon"], +) diff --git a/toolchain/lexer/lexer_file_test.cpp b/toolchain/lexer/lexer_file_test.cpp new file mode 100644 index 000000000000..a9c0222c83d0 --- /dev/null +++ b/toolchain/lexer/lexer_file_test.cpp @@ -0,0 +1,37 @@ +// Part of the Carbon Language project, under the Apache License v2.0 with LLVM +// Exceptions. See /LICENSE for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +#include +#include + +#include + +#include "llvm/ADT/StringRef.h" +#include "llvm/Support/raw_ostream.h" +#include "testing/file_test/file_test_base.h" +#include "toolchain/driver/driver.h" + +namespace Carbon::Testing { +namespace { + +class LexerFileTest : public FileTestBase { + public: + explicit LexerFileTest(llvm::StringRef path) : FileTestBase(path) {} + + auto RunOverFile(llvm::raw_ostream& stdout, llvm::raw_ostream& stderr) + -> bool override { + Driver driver(stdout, stderr); + return driver.RunFullCommand({"dump", "tokens", path()}); + } +}; + +} // namespace + +auto RegisterFileTests(const std::vector& paths) -> void { + LexerFileTest::RegisterTests( + "LexerFileTest", paths, + [](llvm::StringRef path) { return new LexerFileTest(path); }); +} + +} // namespace Carbon::Testing diff --git a/toolchain/lexer/lit_autoupdate.py b/toolchain/lexer/lit_autoupdate.py index a7b053d3ba85..b026d94afa3a 100755 --- a/toolchain/lexer/lit_autoupdate.py +++ b/toolchain/lexer/lit_autoupdate.py @@ -36,7 +36,6 @@ def main() -> None: "--line_number_delta_prefix={{ *}}", "--line_number_pattern=" r"(?P line: )(?P *\d+)(?P,)", - "--lit_run=%{carbon-run-tokens}", "--testdata=toolchain/lexer/testdata", ] + sys.argv[1:] os.execv(actual_py, args) diff --git a/toolchain/lexer/testdata/BUILD b/toolchain/lexer/testdata/BUILD deleted file mode 100644 index b74419e86561..000000000000 --- a/toolchain/lexer/testdata/BUILD +++ /dev/null @@ -1,27 +0,0 @@ -# Part of the Carbon Language project, under the Apache License v2.0 with LLVM -# Exceptions. See /LICENSE for license information. -# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - -load("//bazel/sh_run:rules.bzl", "glob_sh_run") -load("//bazel/testing:lit.bzl", "glob_lit_tests") - -glob_lit_tests( - data = [ - "//bazel/testing:merge_output", - "//toolchain/driver:carbon", - "@llvm-project//llvm:FileCheck", - "@llvm-project//llvm:not", - ], - driver = "lit.cfg.py", - test_file_exts = ["carbon"], -) - -glob_sh_run( - args = [ - "$(location //toolchain/driver:carbon)", - "dump", - "tokens", - ], - data = ["//toolchain/driver:carbon"], - file_exts = ["carbon"], -) diff --git a/toolchain/lexer/testdata/carbon_test.carbon b/toolchain/lexer/testdata/carbon_test.carbon index ac11c46ece6b..1572a308decd 100644 --- a/toolchain/lexer/testdata/carbon_test.carbon +++ b/toolchain/lexer/testdata/carbon_test.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-tokens} // CHECK:STDOUT: [ // CHECK:STDOUT: { index: 0, kind: 'Fn', line: {{ *}}[[@LINE+7]], column: 1, indent: 1, spelling: 'fn', has_trailing_space: true }, diff --git a/toolchain/lexer/testdata/lit.cfg.py b/toolchain/lexer/testdata/lit.cfg.py deleted file mode 120000 index c323f8a5e8da..000000000000 --- a/toolchain/lexer/testdata/lit.cfg.py +++ /dev/null @@ -1 +0,0 @@ -../../../bazel/testing/lit.cfg.py \ No newline at end of file diff --git a/toolchain/lowering/BUILD b/toolchain/lowering/BUILD index feb011966ad6..141ae59592a3 100644 --- a/toolchain/lowering/BUILD +++ b/toolchain/lowering/BUILD @@ -2,6 +2,9 @@ # Exceptions. See /LICENSE for license information. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +load("//bazel/sh_run:rules.bzl", "glob_sh_run") +load("//testing/file_test:rules.bzl", "file_test") + package(default_visibility = ["//visibility:public"]) cc_library( @@ -29,3 +32,37 @@ cc_library( "@llvm-project//llvm:Support", ], ) + +file_test( + name = "lowering_file_test", + srcs = ["lowering_file_test.cpp"], + tests = glob(["testdata/**/*.carbon"]), + deps = [ + "//testing/file_test:file_test_base", + "//toolchain/driver", + "@com_google_googletest//:gtest", + "@llvm-project//llvm:Support", + ], +) + +glob_sh_run( + args = [ + "$(location //toolchain/driver:carbon)", + "dump", + "llvm-ir", + ], + data = ["//toolchain/driver:carbon"], + file_exts = ["carbon"], +) + +glob_sh_run( + args = [ + "$(location //toolchain/driver:carbon)", + "-v", + "dump", + "llvm-ir", + ], + data = ["//toolchain/driver:carbon"], + file_exts = ["carbon"], + run_ext = "verbose", +) diff --git a/toolchain/lowering/lit_autoupdate.py b/toolchain/lowering/lit_autoupdate.py index 2fa0fb1cdde1..b6cc10c9e8d3 100755 --- a/toolchain/lowering/lit_autoupdate.py +++ b/toolchain/lowering/lit_autoupdate.py @@ -26,7 +26,6 @@ def main() -> None: "--tool=carbon", "--autoupdate_arg=dump", "--autoupdate_arg=llvm-ir", - "--lit_run=%{carbon-run-lowering}", "--testdata=toolchain/lowering/testdata", ] + sys.argv[1:] os.execv(actual_py, args) diff --git a/toolchain/lowering/lowering_file_test.cpp b/toolchain/lowering/lowering_file_test.cpp new file mode 100644 index 000000000000..6114cfd545ad --- /dev/null +++ b/toolchain/lowering/lowering_file_test.cpp @@ -0,0 +1,37 @@ +// Part of the Carbon Language project, under the Apache License v2.0 with LLVM +// Exceptions. See /LICENSE for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +#include +#include + +#include + +#include "llvm/ADT/StringRef.h" +#include "llvm/Support/raw_ostream.h" +#include "testing/file_test/file_test_base.h" +#include "toolchain/driver/driver.h" + +namespace Carbon::Testing { +namespace { + +class LoweringFileTest : public FileTestBase { + public: + explicit LoweringFileTest(llvm::StringRef path) : FileTestBase(path) {} + + auto RunOverFile(llvm::raw_ostream& stdout, llvm::raw_ostream& stderr) + -> bool override { + Driver driver(stdout, stderr); + return driver.RunFullCommand({"dump", "llvm-ir", path()}); + } +}; + +} // namespace + +auto RegisterFileTests(const std::vector& paths) -> void { + LoweringFileTest::RegisterTests( + "LoweringFileTest", paths, + [](llvm::StringRef path) { return new LoweringFileTest(path); }); +} + +} // namespace Carbon::Testing diff --git a/toolchain/lowering/testdata/BUILD b/toolchain/lowering/testdata/BUILD deleted file mode 100644 index 1325621af24a..000000000000 --- a/toolchain/lowering/testdata/BUILD +++ /dev/null @@ -1,39 +0,0 @@ -# Part of the Carbon Language project, under the Apache License v2.0 with LLVM -# Exceptions. See /LICENSE for license information. -# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - -load("//bazel/sh_run:rules.bzl", "glob_sh_run") -load("//bazel/testing:lit.bzl", "glob_lit_tests") - -glob_lit_tests( - data = [ - "//bazel/testing:merge_output", - "//toolchain/driver:carbon", - "@llvm-project//llvm:FileCheck", - "@llvm-project//llvm:not", - ], - driver = "lit.cfg.py", - test_file_exts = ["carbon"], -) - -glob_sh_run( - args = [ - "$(location //toolchain/driver:carbon)", - "dump", - "llvm-ir", - ], - data = ["//toolchain/driver:carbon"], - file_exts = ["carbon"], -) - -glob_sh_run( - args = [ - "$(location //toolchain/driver:carbon)", - "-v", - "dump", - "llvm-ir", - ], - data = ["//toolchain/driver:carbon"], - file_exts = ["carbon"], - run_ext = "verbose", -) diff --git a/toolchain/lowering/testdata/basics/empty.carbon b/toolchain/lowering/testdata/basics/empty.carbon index aa9213f02054..2e594955c003 100644 --- a/toolchain/lowering/testdata/basics/empty.carbon +++ b/toolchain/lowering/testdata/basics/empty.carbon @@ -3,6 +3,5 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-lowering} -// CHECK:STDOUT: ; ModuleID = '{{.*}}/toolchain/lowering/testdata/basics/empty.carbon' -// CHECK:STDOUT: source_filename = "{{.*}}/toolchain/lowering/testdata/basics/empty.carbon" +// CHECK:STDOUT: ; ModuleID = 'toolchain/lowering/testdata/basics/empty.carbon' +// CHECK:STDOUT: source_filename = "toolchain/lowering/testdata/basics/empty.carbon" diff --git a/toolchain/lowering/testdata/basics/fail_before_lowering.carbon b/toolchain/lowering/testdata/basics/fail_before_lowering.carbon index 3cba2a64235b..6adaaf683e53 100644 --- a/toolchain/lowering/testdata/basics/fail_before_lowering.carbon +++ b/toolchain/lowering/testdata/basics/fail_before_lowering.carbon @@ -4,7 +4,6 @@ // // This validates that earlier errors prevent lowering, without crashing. // AUTOUPDATE -// RUN: %{not} %{carbon-run-lowering} -// CHECK:STDERR: {{.*}}/toolchain/lowering/testdata/basics/fail_before_lowering.carbon:[[@LINE+1]]:1: Unrecognized declaration introducer. +// CHECK:STDERR: toolchain/lowering/testdata/basics/fail_before_lowering.carbon:[[@LINE+1]]:1: Unrecognized declaration introducer. a; diff --git a/toolchain/lowering/testdata/basics/zero.carbon b/toolchain/lowering/testdata/basics/zero.carbon index 186f64c6d6bf..9f0081a4498f 100644 --- a/toolchain/lowering/testdata/basics/zero.carbon +++ b/toolchain/lowering/testdata/basics/zero.carbon @@ -3,9 +3,8 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-lowering} -// CHECK:STDOUT: ; ModuleID = '{{.*}}/toolchain/lowering/testdata/basics/zero.carbon' -// CHECK:STDOUT: source_filename = "{{.*}}/toolchain/lowering/testdata/basics/zero.carbon" +// CHECK:STDOUT: ; ModuleID = 'toolchain/lowering/testdata/basics/zero.carbon' +// CHECK:STDOUT: source_filename = "toolchain/lowering/testdata/basics/zero.carbon" // CHECK:STDOUT: // CHECK:STDOUT: define i32 @Main() { // CHECK:STDOUT: entry: diff --git a/toolchain/lowering/testdata/function/definition/params_one.carbon b/toolchain/lowering/testdata/function/definition/params_one.carbon index 106a70f7ed4c..74848b730295 100644 --- a/toolchain/lowering/testdata/function/definition/params_one.carbon +++ b/toolchain/lowering/testdata/function/definition/params_one.carbon @@ -3,9 +3,8 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-lowering} -// CHECK:STDOUT: ; ModuleID = '{{.*}}/toolchain/lowering/testdata/function/definition/params_one.carbon' -// CHECK:STDOUT: source_filename = "{{.*}}/toolchain/lowering/testdata/function/definition/params_one.carbon" +// CHECK:STDOUT: ; ModuleID = 'toolchain/lowering/testdata/function/definition/params_one.carbon' +// CHECK:STDOUT: source_filename = "toolchain/lowering/testdata/function/definition/params_one.carbon" // CHECK:STDOUT: // CHECK:STDOUT: define void @Foo(i32 %a) { // CHECK:STDOUT: entry: diff --git a/toolchain/lowering/testdata/function/definition/params_two.carbon b/toolchain/lowering/testdata/function/definition/params_two.carbon index 3af7b7e1e430..9b137b9c8dcf 100644 --- a/toolchain/lowering/testdata/function/definition/params_two.carbon +++ b/toolchain/lowering/testdata/function/definition/params_two.carbon @@ -3,9 +3,8 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-lowering} -// CHECK:STDOUT: ; ModuleID = '{{.*}}/toolchain/lowering/testdata/function/definition/params_two.carbon' -// CHECK:STDOUT: source_filename = "{{.*}}/toolchain/lowering/testdata/function/definition/params_two.carbon" +// CHECK:STDOUT: ; ModuleID = 'toolchain/lowering/testdata/function/definition/params_two.carbon' +// CHECK:STDOUT: source_filename = "toolchain/lowering/testdata/function/definition/params_two.carbon" // CHECK:STDOUT: // CHECK:STDOUT: define void @Foo(i32 %a, i32 %b) { // CHECK:STDOUT: entry: diff --git a/toolchain/lowering/testdata/function/definition/params_zero.carbon b/toolchain/lowering/testdata/function/definition/params_zero.carbon index 3de6972bac59..938e08f2e037 100644 --- a/toolchain/lowering/testdata/function/definition/params_zero.carbon +++ b/toolchain/lowering/testdata/function/definition/params_zero.carbon @@ -3,9 +3,8 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-lowering} -// CHECK:STDOUT: ; ModuleID = '{{.*}}/toolchain/lowering/testdata/function/definition/params_zero.carbon' -// CHECK:STDOUT: source_filename = "{{.*}}/toolchain/lowering/testdata/function/definition/params_zero.carbon" +// CHECK:STDOUT: ; ModuleID = 'toolchain/lowering/testdata/function/definition/params_zero.carbon' +// CHECK:STDOUT: source_filename = "toolchain/lowering/testdata/function/definition/params_zero.carbon" // CHECK:STDOUT: // CHECK:STDOUT: define void @Foo() { // CHECK:STDOUT: entry: diff --git a/toolchain/lowering/testdata/lit.cfg.py b/toolchain/lowering/testdata/lit.cfg.py deleted file mode 120000 index c323f8a5e8da..000000000000 --- a/toolchain/lowering/testdata/lit.cfg.py +++ /dev/null @@ -1 +0,0 @@ -../../../bazel/testing/lit.cfg.py \ No newline at end of file diff --git a/toolchain/lowering/testdata/return/no_value.carbon b/toolchain/lowering/testdata/return/no_value.carbon index fff9cb9e4e50..8070351b945f 100644 --- a/toolchain/lowering/testdata/return/no_value.carbon +++ b/toolchain/lowering/testdata/return/no_value.carbon @@ -3,9 +3,8 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-lowering} -// CHECK:STDOUT: ; ModuleID = '{{.*}}/toolchain/lowering/testdata/return/no_value.carbon' -// CHECK:STDOUT: source_filename = "{{.*}}/toolchain/lowering/testdata/return/no_value.carbon" +// CHECK:STDOUT: ; ModuleID = 'toolchain/lowering/testdata/return/no_value.carbon' +// CHECK:STDOUT: source_filename = "toolchain/lowering/testdata/return/no_value.carbon" // CHECK:STDOUT: // CHECK:STDOUT: define void @Main() { // CHECK:STDOUT: entry: diff --git a/toolchain/lowering/testdata/return/value.carbon b/toolchain/lowering/testdata/return/value.carbon index a2ce60b9c91a..acf9ee2cf2c9 100644 --- a/toolchain/lowering/testdata/return/value.carbon +++ b/toolchain/lowering/testdata/return/value.carbon @@ -3,9 +3,8 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-lowering} -// CHECK:STDOUT: ; ModuleID = '{{.*}}/toolchain/lowering/testdata/return/value.carbon' -// CHECK:STDOUT: source_filename = "{{.*}}/toolchain/lowering/testdata/return/value.carbon" +// CHECK:STDOUT: ; ModuleID = 'toolchain/lowering/testdata/return/value.carbon' +// CHECK:STDOUT: source_filename = "toolchain/lowering/testdata/return/value.carbon" // CHECK:STDOUT: // CHECK:STDOUT: define i32 @Main() { // CHECK:STDOUT: entry: diff --git a/toolchain/parser/BUILD b/toolchain/parser/BUILD index 3f7b73d2c74a..e863f87bee7a 100644 --- a/toolchain/parser/BUILD +++ b/toolchain/parser/BUILD @@ -3,6 +3,8 @@ # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception load("//bazel/fuzzing:rules.bzl", "cc_fuzz_test") +load("//bazel/sh_run:rules.bzl", "glob_sh_run") +load("//testing/file_test:rules.bzl", "file_test") package(default_visibility = ["//visibility:public"]) @@ -109,3 +111,37 @@ cc_test( "@com_google_googletest//:gtest", ], ) + +file_test( + name = "parse_tree_file_test", + srcs = ["parse_tree_file_test.cpp"], + tests = glob(["testdata/**/*.carbon"]), + deps = [ + "//testing/file_test:file_test_base", + "//toolchain/driver", + "@com_google_googletest//:gtest", + "@llvm-project//llvm:Support", + ], +) + +glob_sh_run( + args = [ + "$(location //toolchain/driver:carbon)", + "dump", + "parse-tree", + ], + data = ["//toolchain/driver:carbon"], + file_exts = ["carbon"], +) + +glob_sh_run( + args = [ + "$(location //toolchain/driver:carbon)", + "-v", + "dump", + "parse-tree", + ], + data = ["//toolchain/driver:carbon"], + file_exts = ["carbon"], + run_ext = "verbose", +) diff --git a/toolchain/parser/lit_autoupdate.py b/toolchain/parser/lit_autoupdate.py index dfe05bf427e8..1d116451fdec 100755 --- a/toolchain/parser/lit_autoupdate.py +++ b/toolchain/parser/lit_autoupdate.py @@ -26,7 +26,6 @@ def main() -> None: "--tool=carbon", "--autoupdate_arg=dump", "--autoupdate_arg=parse-tree", - "--lit_run=%{carbon-run-parser}", "--testdata=toolchain/parser/testdata", ] + sys.argv[1:] os.execv(actual_py, args) diff --git a/toolchain/parser/parse_tree_file_test.cpp b/toolchain/parser/parse_tree_file_test.cpp new file mode 100644 index 000000000000..6a7b5bead424 --- /dev/null +++ b/toolchain/parser/parse_tree_file_test.cpp @@ -0,0 +1,37 @@ +// Part of the Carbon Language project, under the Apache License v2.0 with LLVM +// Exceptions. See /LICENSE for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +#include +#include + +#include + +#include "llvm/ADT/StringRef.h" +#include "llvm/Support/raw_ostream.h" +#include "testing/file_test/file_test_base.h" +#include "toolchain/driver/driver.h" + +namespace Carbon::Testing { +namespace { + +class ParserFileTest : public FileTestBase { + public: + explicit ParserFileTest(llvm::StringRef path) : FileTestBase(path) {} + + auto RunOverFile(llvm::raw_ostream& stdout, llvm::raw_ostream& stderr) + -> bool override { + Driver driver(stdout, stderr); + return driver.RunFullCommand({"dump", "parse-tree", path()}); + } +}; + +} // namespace + +auto RegisterFileTests(const std::vector& paths) -> void { + ParserFileTest::RegisterTests( + "ParserFileTest", paths, + [](llvm::StringRef path) { return new ParserFileTest(path); }); +} + +} // namespace Carbon::Testing diff --git a/toolchain/parser/testdata/BUILD b/toolchain/parser/testdata/BUILD deleted file mode 100644 index 39a9a50c86e0..000000000000 --- a/toolchain/parser/testdata/BUILD +++ /dev/null @@ -1,39 +0,0 @@ -# Part of the Carbon Language project, under the Apache License v2.0 with LLVM -# Exceptions. See /LICENSE for license information. -# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - -load("//bazel/sh_run:rules.bzl", "glob_sh_run") -load("//bazel/testing:lit.bzl", "glob_lit_tests") - -glob_lit_tests( - data = [ - "//bazel/testing:merge_output", - "//toolchain/driver:carbon", - "@llvm-project//llvm:FileCheck", - "@llvm-project//llvm:not", - ], - driver = "lit.cfg.py", - test_file_exts = ["carbon"], -) - -glob_sh_run( - args = [ - "$(location //toolchain/driver:carbon)", - "dump", - "parse-tree", - ], - data = ["//toolchain/driver:carbon"], - file_exts = ["carbon"], -) - -glob_sh_run( - args = [ - "$(location //toolchain/driver:carbon)", - "-v", - "dump", - "parse-tree", - ], - data = ["//toolchain/driver:carbon"], - file_exts = ["carbon"], - run_ext = "verbose", -) diff --git a/toolchain/parser/testdata/basics/builtin_types.carbon b/toolchain/parser/testdata/basics/builtin_types.carbon index 8b0134976ab4..5a001da66e68 100644 --- a/toolchain/parser/testdata/basics/builtin_types.carbon +++ b/toolchain/parser/testdata/basics/builtin_types.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'test_i32'}, diff --git a/toolchain/parser/testdata/basics/empty.carbon b/toolchain/parser/testdata/basics/empty.carbon index e7f134d208a9..05d24d2b0ad1 100644 --- a/toolchain/parser/testdata/basics/empty.carbon +++ b/toolchain/parser/testdata/basics/empty.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] diff --git a/toolchain/parser/testdata/basics/empty_declaration.carbon b/toolchain/parser/testdata/basics/empty_declaration.carbon index d02bc916abad..d09f6c3fda27 100644 --- a/toolchain/parser/testdata/basics/empty_declaration.carbon +++ b/toolchain/parser/testdata/basics/empty_declaration.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'EmptyDeclaration', text: ';'}, // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, diff --git a/toolchain/parser/testdata/basics/fail_invalid_designators.carbon b/toolchain/parser/testdata/basics/fail_invalid_designators.carbon index 34d403c12a71..3b94970ff0fa 100644 --- a/toolchain/parser/testdata/basics/fail_invalid_designators.carbon +++ b/toolchain/parser/testdata/basics/fail_invalid_designators.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'F'}, @@ -28,10 +27,10 @@ // NOTE: Move to its own directory when more tests are added. fn F() { - // CHECK:STDERR: {{.*}}/toolchain/parser/testdata/basics/fail_invalid_designators.carbon:[[@LINE+1]]:5: Expected identifier after `.`. + // CHECK:STDERR: toolchain/parser/testdata/basics/fail_invalid_designators.carbon:[[@LINE+1]]:5: Expected identifier after `.`. a.; - // CHECK:STDERR: {{.*}}/toolchain/parser/testdata/basics/fail_invalid_designators.carbon:[[@LINE+1]]:5: Expected identifier after `.`. + // CHECK:STDERR: toolchain/parser/testdata/basics/fail_invalid_designators.carbon:[[@LINE+1]]:5: Expected identifier after `.`. a.fn; - // CHECK:STDERR: {{.*}}/toolchain/parser/testdata/basics/fail_invalid_designators.carbon:[[@LINE+1]]:5: Expected identifier after `.`. + // CHECK:STDERR: toolchain/parser/testdata/basics/fail_invalid_designators.carbon:[[@LINE+1]]:5: Expected identifier after `.`. a.42; } diff --git a/toolchain/parser/testdata/basics/fail_no_intro_with_semi.carbon b/toolchain/parser/testdata/basics/fail_no_intro_with_semi.carbon index 0c839a308e95..8f36f4ec14a5 100644 --- a/toolchain/parser/testdata/basics/fail_no_intro_with_semi.carbon +++ b/toolchain/parser/testdata/basics/fail_no_intro_with_semi.carbon @@ -3,11 +3,10 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'EmptyDeclaration', text: ';', has_error: yes}, // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] -// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/basics/fail_no_intro_with_semi.carbon:[[@LINE+1]]:1: Unrecognized declaration introducer. +// CHECK:STDERR: toolchain/parser/testdata/basics/fail_no_intro_with_semi.carbon:[[@LINE+1]]:1: Unrecognized declaration introducer. foo; diff --git a/toolchain/parser/testdata/basics/fail_no_intro_without_semi.carbon b/toolchain/parser/testdata/basics/fail_no_intro_without_semi.carbon index 90be2682faef..f1f2041f3cd5 100644 --- a/toolchain/parser/testdata/basics/fail_no_intro_without_semi.carbon +++ b/toolchain/parser/testdata/basics/fail_no_intro_without_semi.carbon @@ -3,11 +3,10 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'EmptyDeclaration', text: 'foo', has_error: yes}, // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] -// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/basics/fail_no_intro_without_semi.carbon:[[@LINE+1]]:1: Unrecognized declaration introducer. +// CHECK:STDERR: toolchain/parser/testdata/basics/fail_no_intro_without_semi.carbon:[[@LINE+1]]:1: Unrecognized declaration introducer. foo bar baz diff --git a/toolchain/parser/testdata/basics/fail_paren_match_regression.carbon b/toolchain/parser/testdata/basics/fail_paren_match_regression.carbon index 8bd683f87e00..393cb37bf8f0 100644 --- a/toolchain/parser/testdata/basics/fail_paren_match_regression.carbon +++ b/toolchain/parser/testdata/basics/fail_paren_match_regression.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: '=', has_error: yes}, @@ -17,7 +16,7 @@ // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] -// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/basics/fail_paren_match_regression.carbon:[[@LINE+3]]:5: Expected pattern in `var` declaration. -// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/basics/fail_paren_match_regression.carbon:[[@LINE+2]]:12: Expected `,` or `)`. -// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/basics/fail_paren_match_regression.carbon:[[@LINE+1]]:15: Expected `;` after expression. +// CHECK:STDERR: toolchain/parser/testdata/basics/fail_paren_match_regression.carbon:[[@LINE+3]]:5: Expected pattern in `var` declaration. +// CHECK:STDERR: toolchain/parser/testdata/basics/fail_paren_match_regression.carbon:[[@LINE+2]]:12: Expected `,` or `)`. +// CHECK:STDERR: toolchain/parser/testdata/basics/fail_paren_match_regression.carbon:[[@LINE+1]]:15: Expected `;` after expression. var = (foo {}) diff --git a/toolchain/parser/testdata/basics/function_call.carbon b/toolchain/parser/testdata/basics/function_call.carbon index 5923998894a3..044d71b26ec0 100644 --- a/toolchain/parser/testdata/basics/function_call.carbon +++ b/toolchain/parser/testdata/basics/function_call.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'F'}, diff --git a/toolchain/parser/testdata/class/basic.carbon b/toolchain/parser/testdata/class/basic.carbon index e1c1723b7e0a..143d825cbf5a 100644 --- a/toolchain/parser/testdata/class/basic.carbon +++ b/toolchain/parser/testdata/class/basic.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'ClassIntroducer', text: 'class'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'Foo'}, diff --git a/toolchain/parser/testdata/class/fn_definitions.carbon b/toolchain/parser/testdata/class/fn_definitions.carbon index 39f3b686bcc7..cfba0c14e61a 100644 --- a/toolchain/parser/testdata/class/fn_definitions.carbon +++ b/toolchain/parser/testdata/class/fn_definitions.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'ClassIntroducer', text: 'class'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'Foo'}, diff --git a/toolchain/parser/testdata/class/var.carbon b/toolchain/parser/testdata/class/var.carbon index dcbdf7ac8c91..20132df60ac2 100644 --- a/toolchain/parser/testdata/class/var.carbon +++ b/toolchain/parser/testdata/class/var.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'ClassIntroducer', text: 'class'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'Foo'}, diff --git a/toolchain/parser/testdata/for/fail_colon_instead_of_in.carbon b/toolchain/parser/testdata/for/fail_colon_instead_of_in.carbon index bac336b3f49f..b3267f1dd1a9 100644 --- a/toolchain/parser/testdata/for/fail_colon_instead_of_in.carbon +++ b/toolchain/parser/testdata/for/fail_colon_instead_of_in.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'foo'}, @@ -31,7 +30,7 @@ // CHECK:STDOUT: ] fn foo() { - // CHECK:STDERR: {{.*}}/toolchain/parser/testdata/for/fail_colon_instead_of_in.carbon:[[@LINE+1]]:19: `:` should be replaced by `in`. + // CHECK:STDERR: toolchain/parser/testdata/for/fail_colon_instead_of_in.carbon:[[@LINE+1]]:19: `:` should be replaced by `in`. for (var x: i32 : y) { Print(x); } diff --git a/toolchain/parser/testdata/for/fail_missing_in.carbon b/toolchain/parser/testdata/for/fail_missing_in.carbon index e54ae4db7bb3..df12479eac60 100644 --- a/toolchain/parser/testdata/for/fail_missing_in.carbon +++ b/toolchain/parser/testdata/for/fail_missing_in.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'foo'}, @@ -31,7 +30,7 @@ // CHECK:STDOUT: ] fn foo() { - // CHECK:STDERR: {{.*}}/toolchain/parser/testdata/for/fail_missing_in.carbon:[[@LINE+1]]:19: Expected `in` after loop `var` declaration. + // CHECK:STDERR: toolchain/parser/testdata/for/fail_missing_in.carbon:[[@LINE+1]]:19: Expected `in` after loop `var` declaration. for (var x: i32 y) { Print(x); } diff --git a/toolchain/parser/testdata/for/fail_missing_var.carbon b/toolchain/parser/testdata/for/fail_missing_var.carbon index ac79359728ad..8fdee45daa0b 100644 --- a/toolchain/parser/testdata/for/fail_missing_var.carbon +++ b/toolchain/parser/testdata/for/fail_missing_var.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'foo'}, @@ -26,7 +25,7 @@ // CHECK:STDOUT: ] fn foo() { - // CHECK:STDERR: {{.*}}/toolchain/parser/testdata/for/fail_missing_var.carbon:[[@LINE+1]]:8: Expected `var` declaration. + // CHECK:STDERR: toolchain/parser/testdata/for/fail_missing_var.carbon:[[@LINE+1]]:8: Expected `var` declaration. for (x: i32 in y) { Print(x); } diff --git a/toolchain/parser/testdata/for/nested.carbon b/toolchain/parser/testdata/for/nested.carbon index 782a44ffb6ce..7b3e1e64fc1a 100644 --- a/toolchain/parser/testdata/for/nested.carbon +++ b/toolchain/parser/testdata/for/nested.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'foo'}, diff --git a/toolchain/parser/testdata/for/simple.carbon b/toolchain/parser/testdata/for/simple.carbon index 5ed56b3cc663..185e972a9e7c 100644 --- a/toolchain/parser/testdata/for/simple.carbon +++ b/toolchain/parser/testdata/for/simple.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'foo'}, diff --git a/toolchain/parser/testdata/function/declaration/addr.carbon b/toolchain/parser/testdata/function/declaration/addr.carbon index 8ca84ed9fcd6..70feb41d505a 100644 --- a/toolchain/parser/testdata/function/declaration/addr.carbon +++ b/toolchain/parser/testdata/function/declaration/addr.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'foo'}, diff --git a/toolchain/parser/testdata/function/declaration/basic.carbon b/toolchain/parser/testdata/function/declaration/basic.carbon index 2a45c474ee0e..add7d387c34b 100644 --- a/toolchain/parser/testdata/function/declaration/basic.carbon +++ b/toolchain/parser/testdata/function/declaration/basic.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'F'}, diff --git a/toolchain/parser/testdata/function/declaration/deduced_empty.carbon b/toolchain/parser/testdata/function/declaration/deduced_empty.carbon index 91b161775a6d..491e4a9741f8 100644 --- a/toolchain/parser/testdata/function/declaration/deduced_empty.carbon +++ b/toolchain/parser/testdata/function/declaration/deduced_empty.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'foo'}, diff --git a/toolchain/parser/testdata/function/declaration/deduced_params.carbon b/toolchain/parser/testdata/function/declaration/deduced_params.carbon index df9726332fb1..a95ca6309fab 100644 --- a/toolchain/parser/testdata/function/declaration/deduced_params.carbon +++ b/toolchain/parser/testdata/function/declaration/deduced_params.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'foo'}, diff --git a/toolchain/parser/testdata/function/declaration/fail_identifier_instead_of_sig.carbon b/toolchain/parser/testdata/function/declaration/fail_identifier_instead_of_sig.carbon index 9d8a737e384f..99b273b0c5b4 100644 --- a/toolchain/parser/testdata/function/declaration/fail_identifier_instead_of_sig.carbon +++ b/toolchain/parser/testdata/function/declaration/fail_identifier_instead_of_sig.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'foo'}, @@ -11,5 +10,5 @@ // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] -// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/function/declaration/fail_identifier_instead_of_sig.carbon:[[@LINE+1]]:8: `fn` requires a `(` for parameters. +// CHECK:STDERR: toolchain/parser/testdata/function/declaration/fail_identifier_instead_of_sig.carbon:[[@LINE+1]]:8: `fn` requires a `(` for parameters. fn foo bar; diff --git a/toolchain/parser/testdata/function/declaration/fail_missing_deduced_close.carbon b/toolchain/parser/testdata/function/declaration/fail_missing_deduced_close.carbon index 9b8ad08822d0..5b2dfae3a74e 100644 --- a/toolchain/parser/testdata/function/declaration/fail_missing_deduced_close.carbon +++ b/toolchain/parser/testdata/function/declaration/fail_missing_deduced_close.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'Div'}, @@ -17,7 +16,7 @@ // CHECK:STDOUT: ] // Fix and uncomment this to test error handling. -// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/function/declaration/fail_missing_deduced_close.carbon:[[@LINE+2]]:7: Closing symbol does not match most recent opening symbol. -// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/function/declaration/fail_missing_deduced_close.carbon:[[@LINE+1]]:8: Expected parameter declaration. +// CHECK:STDERR: toolchain/parser/testdata/function/declaration/fail_missing_deduced_close.carbon:[[@LINE+2]]:7: Closing symbol does not match most recent opening symbol. +// CHECK:STDERR: toolchain/parser/testdata/function/declaration/fail_missing_deduced_close.carbon:[[@LINE+1]]:8: Expected parameter declaration. fn Div[(); -// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/function/declaration/fail_missing_deduced_close.carbon:[[@LINE+0]]:181: A `(` for parameters is required after deduced parameters. +// CHECK:STDERR: toolchain/parser/testdata/function/declaration/fail_missing_deduced_close.carbon:[[@LINE+0]]:174: A `(` for parameters is required after deduced parameters. diff --git a/toolchain/parser/testdata/function/declaration/fail_missing_name.carbon b/toolchain/parser/testdata/function/declaration/fail_missing_name.carbon index 63b4acb8f3c6..7a5c95ba3de8 100644 --- a/toolchain/parser/testdata/function/declaration/fail_missing_name.carbon +++ b/toolchain/parser/testdata/function/declaration/fail_missing_name.carbon @@ -3,12 +3,11 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'FunctionDeclaration', text: ';', has_error: yes, subtree_size: 2}, // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] -// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/function/declaration/fail_missing_name.carbon:[[@LINE+1]]:4: `fn` introducer should be followed by a name. +// CHECK:STDERR: toolchain/parser/testdata/function/declaration/fail_missing_name.carbon:[[@LINE+1]]:4: `fn` introducer should be followed by a name. fn (); diff --git a/toolchain/parser/testdata/function/declaration/fail_no_sig_or_semi.carbon b/toolchain/parser/testdata/function/declaration/fail_no_sig_or_semi.carbon index 42ef84ce45a6..ad0fc20ddf0f 100644 --- a/toolchain/parser/testdata/function/declaration/fail_no_sig_or_semi.carbon +++ b/toolchain/parser/testdata/function/declaration/fail_no_sig_or_semi.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'foo'}, @@ -11,5 +10,5 @@ // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] -// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/function/declaration/fail_no_sig_or_semi.carbon:[[@LINE+1]]:7: `fn` requires a `(` for parameters. +// CHECK:STDERR: toolchain/parser/testdata/function/declaration/fail_no_sig_or_semi.carbon:[[@LINE+1]]:7: `fn` requires a `(` for parameters. fn foo diff --git a/toolchain/parser/testdata/function/declaration/fail_only_fn_and_semi.carbon b/toolchain/parser/testdata/function/declaration/fail_only_fn_and_semi.carbon index 8fef102a185e..589592765a4c 100644 --- a/toolchain/parser/testdata/function/declaration/fail_only_fn_and_semi.carbon +++ b/toolchain/parser/testdata/function/declaration/fail_only_fn_and_semi.carbon @@ -3,12 +3,11 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'FunctionDeclaration', text: ';', has_error: yes, subtree_size: 2}, // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] -// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/function/declaration/fail_only_fn_and_semi.carbon:[[@LINE+1]]:3: `fn` introducer should be followed by a name. +// CHECK:STDERR: toolchain/parser/testdata/function/declaration/fail_only_fn_and_semi.carbon:[[@LINE+1]]:3: `fn` introducer should be followed by a name. fn; diff --git a/toolchain/parser/testdata/function/declaration/fail_repeated_fn_and_semi.carbon b/toolchain/parser/testdata/function/declaration/fail_repeated_fn_and_semi.carbon index 980c19bcfa28..aee502fca0eb 100644 --- a/toolchain/parser/testdata/function/declaration/fail_repeated_fn_and_semi.carbon +++ b/toolchain/parser/testdata/function/declaration/fail_repeated_fn_and_semi.carbon @@ -3,12 +3,11 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'FunctionDeclaration', text: ';', has_error: yes, subtree_size: 2}, // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] -// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/function/declaration/fail_repeated_fn_and_semi.carbon:[[@LINE+1]]:4: `fn` introducer should be followed by a name. +// CHECK:STDERR: toolchain/parser/testdata/function/declaration/fail_repeated_fn_and_semi.carbon:[[@LINE+1]]:4: `fn` introducer should be followed by a name. fn fn; diff --git a/toolchain/parser/testdata/function/declaration/fail_skip_indented_newline_until_outdent.carbon b/toolchain/parser/testdata/function/declaration/fail_skip_indented_newline_until_outdent.carbon index 8daaf1f63d18..524740f22fbb 100644 --- a/toolchain/parser/testdata/function/declaration/fail_skip_indented_newline_until_outdent.carbon +++ b/toolchain/parser/testdata/function/declaration/fail_skip_indented_newline_until_outdent.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'FunctionDeclaration', text: 'fn', has_error: yes, subtree_size: 2}, @@ -15,7 +14,7 @@ // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] - // CHECK:STDERR: {{.*}}/toolchain/parser/testdata/function/declaration/fail_skip_indented_newline_until_outdent.carbon:[[@LINE+1]]:6: `fn` introducer should be followed by a name. + // CHECK:STDERR: toolchain/parser/testdata/function/declaration/fail_skip_indented_newline_until_outdent.carbon:[[@LINE+1]]:6: `fn` introducer should be followed by a name. fn (x, y, z) diff --git a/toolchain/parser/testdata/function/declaration/fail_skip_indented_newline_with_semi.carbon b/toolchain/parser/testdata/function/declaration/fail_skip_indented_newline_with_semi.carbon index dd60e4e80588..6e364daa9a22 100644 --- a/toolchain/parser/testdata/function/declaration/fail_skip_indented_newline_with_semi.carbon +++ b/toolchain/parser/testdata/function/declaration/fail_skip_indented_newline_with_semi.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'FunctionDeclaration', text: ';', has_error: yes, subtree_size: 2}, @@ -15,7 +14,7 @@ // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] -// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/function/declaration/fail_skip_indented_newline_with_semi.carbon:[[@LINE+1]]:4: `fn` introducer should be followed by a name. +// CHECK:STDERR: toolchain/parser/testdata/function/declaration/fail_skip_indented_newline_with_semi.carbon:[[@LINE+1]]:4: `fn` introducer should be followed by a name. fn (x, y, z); diff --git a/toolchain/parser/testdata/function/declaration/fail_skip_indented_newline_without_semi.carbon b/toolchain/parser/testdata/function/declaration/fail_skip_indented_newline_without_semi.carbon index 8acf7cb3a310..5cfaefedcccf 100644 --- a/toolchain/parser/testdata/function/declaration/fail_skip_indented_newline_without_semi.carbon +++ b/toolchain/parser/testdata/function/declaration/fail_skip_indented_newline_without_semi.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'FunctionDeclaration', text: 'fn', has_error: yes, subtree_size: 2}, @@ -15,7 +14,7 @@ // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] -// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/function/declaration/fail_skip_indented_newline_without_semi.carbon:[[@LINE+1]]:4: `fn` introducer should be followed by a name. +// CHECK:STDERR: toolchain/parser/testdata/function/declaration/fail_skip_indented_newline_without_semi.carbon:[[@LINE+1]]:4: `fn` introducer should be followed by a name. fn (x, y, z) diff --git a/toolchain/parser/testdata/function/declaration/fail_skip_to_newline_without_semi.carbon b/toolchain/parser/testdata/function/declaration/fail_skip_to_newline_without_semi.carbon index f0695b501abe..3e9ee853e2bd 100644 --- a/toolchain/parser/testdata/function/declaration/fail_skip_to_newline_without_semi.carbon +++ b/toolchain/parser/testdata/function/declaration/fail_skip_to_newline_without_semi.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'FunctionDeclaration', text: 'fn', has_error: yes, subtree_size: 2}, @@ -15,6 +14,6 @@ // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] -// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/function/declaration/fail_skip_to_newline_without_semi.carbon:[[@LINE+1]]:4: `fn` introducer should be followed by a name. +// CHECK:STDERR: toolchain/parser/testdata/function/declaration/fail_skip_to_newline_without_semi.carbon:[[@LINE+1]]:4: `fn` introducer should be followed by a name. fn () fn F(); diff --git a/toolchain/parser/testdata/function/declaration/fail_skip_without_semi_to_curly.carbon b/toolchain/parser/testdata/function/declaration/fail_skip_without_semi_to_curly.carbon index f758f7ab9e6a..4768473ca7dd 100644 --- a/toolchain/parser/testdata/function/declaration/fail_skip_without_semi_to_curly.carbon +++ b/toolchain/parser/testdata/function/declaration/fail_skip_without_semi_to_curly.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'EmptyDeclaration', text: 'struct', has_error: yes}, // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, @@ -14,6 +13,6 @@ // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] -// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/function/declaration/fail_skip_without_semi_to_curly.carbon:[[@LINE+1]]:1: Unrecognized declaration introducer. +// CHECK:STDERR: toolchain/parser/testdata/function/declaration/fail_skip_without_semi_to_curly.carbon:[[@LINE+1]]:1: Unrecognized declaration introducer. struct X { fn () } fn F(); diff --git a/toolchain/parser/testdata/function/declaration/fail_with_identifier_as_param.carbon b/toolchain/parser/testdata/function/declaration/fail_with_identifier_as_param.carbon index 3fcd7cba89ee..cff7b9b889cb 100644 --- a/toolchain/parser/testdata/function/declaration/fail_with_identifier_as_param.carbon +++ b/toolchain/parser/testdata/function/declaration/fail_with_identifier_as_param.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'foo'}, @@ -16,5 +15,5 @@ // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] -// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/function/declaration/fail_with_identifier_as_param.carbon:[[@LINE+1]]:11: Expected parameter declaration. +// CHECK:STDERR: toolchain/parser/testdata/function/declaration/fail_with_identifier_as_param.carbon:[[@LINE+1]]:11: Expected parameter declaration. fn foo(bar); diff --git a/toolchain/parser/testdata/function/declaration/fail_without_name_and_many_tokens_in_params.carbon b/toolchain/parser/testdata/function/declaration/fail_without_name_and_many_tokens_in_params.carbon index cf3792815103..3ed38586e280 100644 --- a/toolchain/parser/testdata/function/declaration/fail_without_name_and_many_tokens_in_params.carbon +++ b/toolchain/parser/testdata/function/declaration/fail_without_name_and_many_tokens_in_params.carbon @@ -3,12 +3,11 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'FunctionDeclaration', text: ';', has_error: yes, subtree_size: 2}, // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] -// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/function/declaration/fail_without_name_and_many_tokens_in_params.carbon:[[@LINE+1]]:4: `fn` introducer should be followed by a name. +// CHECK:STDERR: toolchain/parser/testdata/function/declaration/fail_without_name_and_many_tokens_in_params.carbon:[[@LINE+1]]:4: `fn` introducer should be followed by a name. fn (a tokens c d e f g h i j k l m n o p q r s t u v w x y z); diff --git a/toolchain/parser/testdata/function/declaration/params.carbon b/toolchain/parser/testdata/function/declaration/params.carbon index 7cc94041f075..34d24f65620c 100644 --- a/toolchain/parser/testdata/function/declaration/params.carbon +++ b/toolchain/parser/testdata/function/declaration/params.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'foo'}, diff --git a/toolchain/parser/testdata/function/declaration/with_return_type.carbon b/toolchain/parser/testdata/function/declaration/with_return_type.carbon index 0943d3978176..352b6a4231a6 100644 --- a/toolchain/parser/testdata/function/declaration/with_return_type.carbon +++ b/toolchain/parser/testdata/function/declaration/with_return_type.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'foo'}, diff --git a/toolchain/parser/testdata/function/definition/basic.carbon b/toolchain/parser/testdata/function/definition/basic.carbon index ebf083b04abb..4bb28995c751 100644 --- a/toolchain/parser/testdata/function/definition/basic.carbon +++ b/toolchain/parser/testdata/function/definition/basic.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'F'}, diff --git a/toolchain/parser/testdata/function/definition/fail_identifier_in_statements.carbon b/toolchain/parser/testdata/function/definition/fail_identifier_in_statements.carbon index fa0ac977fdaf..40c1594917d0 100644 --- a/toolchain/parser/testdata/function/definition/fail_identifier_in_statements.carbon +++ b/toolchain/parser/testdata/function/definition/fail_identifier_in_statements.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'F'}, @@ -19,5 +18,5 @@ fn F() { // Note: this might become valid depending on the expression syntax. This test // shouldn't be taken as a sign it should remain invalid. bar -// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/function/definition/fail_identifier_in_statements.carbon:[[@LINE+1]]:1: Expected `;` after expression. +// CHECK:STDERR: toolchain/parser/testdata/function/definition/fail_identifier_in_statements.carbon:[[@LINE+1]]:1: Expected `;` after expression. } diff --git a/toolchain/parser/testdata/function/definition/with_params.carbon b/toolchain/parser/testdata/function/definition/with_params.carbon index 564242da729a..be27a6204623 100644 --- a/toolchain/parser/testdata/function/definition/with_params.carbon +++ b/toolchain/parser/testdata/function/definition/with_params.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'foo'}, diff --git a/toolchain/parser/testdata/function/definition/with_return_type.carbon b/toolchain/parser/testdata/function/definition/with_return_type.carbon index d847e45d2b10..256c18ec0a6f 100644 --- a/toolchain/parser/testdata/function/definition/with_return_type.carbon +++ b/toolchain/parser/testdata/function/definition/with_return_type.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'foo'}, diff --git a/toolchain/parser/testdata/generics/deduced_params/empty.carbon b/toolchain/parser/testdata/generics/deduced_params/empty.carbon index 177b8827d650..1d9ff3a1e520 100644 --- a/toolchain/parser/testdata/generics/deduced_params/empty.carbon +++ b/toolchain/parser/testdata/generics/deduced_params/empty.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'ClassIntroducer', text: 'class'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'Foo'}, diff --git a/toolchain/parser/testdata/generics/deduced_params/fail_no_parens.carbon b/toolchain/parser/testdata/generics/deduced_params/fail_no_parens.carbon index 7534ec55039a..b6a776ba7738 100644 --- a/toolchain/parser/testdata/generics/deduced_params/fail_no_parens.carbon +++ b/toolchain/parser/testdata/generics/deduced_params/fail_no_parens.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'ClassIntroducer', text: 'class'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'Foo'}, @@ -34,14 +33,14 @@ // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] -// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/generics/deduced_params/fail_no_parens.carbon:[[@LINE+1]]:12: A `(` for parameters is required after deduced parameters. +// CHECK:STDERR: toolchain/parser/testdata/generics/deduced_params/fail_no_parens.carbon:[[@LINE+1]]:12: A `(` for parameters is required after deduced parameters. class Foo[]; -// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/generics/deduced_params/fail_no_parens.carbon:[[@LINE+1]]:18: A `(` for parameters is required after deduced parameters. +// CHECK:STDERR: toolchain/parser/testdata/generics/deduced_params/fail_no_parens.carbon:[[@LINE+1]]:18: A `(` for parameters is required after deduced parameters. class Foo[a: i32]; -// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/generics/deduced_params/fail_no_parens.carbon:[[@LINE+1]]:17: A `(` for parameters is required after deduced parameters. +// CHECK:STDERR: toolchain/parser/testdata/generics/deduced_params/fail_no_parens.carbon:[[@LINE+1]]:17: A `(` for parameters is required after deduced parameters. interface Bar[] {} -// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/generics/deduced_params/fail_no_parens.carbon:[[@LINE+1]]:23: A `(` for parameters is required after deduced parameters. +// CHECK:STDERR: toolchain/parser/testdata/generics/deduced_params/fail_no_parens.carbon:[[@LINE+1]]:23: A `(` for parameters is required after deduced parameters. interface Bar[a: i32] {} diff --git a/toolchain/parser/testdata/generics/deduced_params/one.carbon b/toolchain/parser/testdata/generics/deduced_params/one.carbon index 653efc807618..0f008ce7983b 100644 --- a/toolchain/parser/testdata/generics/deduced_params/one.carbon +++ b/toolchain/parser/testdata/generics/deduced_params/one.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'ClassIntroducer', text: 'class'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'Foo'}, diff --git a/toolchain/parser/testdata/generics/deduced_params/one_suffix_comma.carbon b/toolchain/parser/testdata/generics/deduced_params/one_suffix_comma.carbon index 5f4951cca627..5b251340be2e 100644 --- a/toolchain/parser/testdata/generics/deduced_params/one_suffix_comma.carbon +++ b/toolchain/parser/testdata/generics/deduced_params/one_suffix_comma.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'ClassIntroducer', text: 'class'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'Foo'}, diff --git a/toolchain/parser/testdata/generics/deduced_params/six.carbon b/toolchain/parser/testdata/generics/deduced_params/six.carbon index 0c555efc8000..7234218fb60d 100644 --- a/toolchain/parser/testdata/generics/deduced_params/six.carbon +++ b/toolchain/parser/testdata/generics/deduced_params/six.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'ClassIntroducer', text: 'class'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'Foo'}, diff --git a/toolchain/parser/testdata/generics/deduced_params/two.carbon b/toolchain/parser/testdata/generics/deduced_params/two.carbon index beaf9b21343f..d02c5c12e66e 100644 --- a/toolchain/parser/testdata/generics/deduced_params/two.carbon +++ b/toolchain/parser/testdata/generics/deduced_params/two.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'ClassIntroducer', text: 'class'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'Foo'}, diff --git a/toolchain/parser/testdata/generics/deduced_params/two_suffix_comma.carbon b/toolchain/parser/testdata/generics/deduced_params/two_suffix_comma.carbon index f70c0daf9648..474ff259ac15 100644 --- a/toolchain/parser/testdata/generics/deduced_params/two_suffix_comma.carbon +++ b/toolchain/parser/testdata/generics/deduced_params/two_suffix_comma.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'ClassIntroducer', text: 'class'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'Foo'}, diff --git a/toolchain/parser/testdata/generics/generic_params/basic.carbon b/toolchain/parser/testdata/generics/generic_params/basic.carbon index 6fb96eec546b..e75c76a87a08 100644 --- a/toolchain/parser/testdata/generics/generic_params/basic.carbon +++ b/toolchain/parser/testdata/generics/generic_params/basic.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'foo'}, diff --git a/toolchain/parser/testdata/generics/generic_params/template.carbon b/toolchain/parser/testdata/generics/generic_params/template.carbon index de233330b7f2..3c40534a4b60 100644 --- a/toolchain/parser/testdata/generics/generic_params/template.carbon +++ b/toolchain/parser/testdata/generics/generic_params/template.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'foo'}, diff --git a/toolchain/parser/testdata/generics/generic_params/template_addr.carbon b/toolchain/parser/testdata/generics/generic_params/template_addr.carbon index bdf5258a4eaa..9daa7038ac00 100644 --- a/toolchain/parser/testdata/generics/generic_params/template_addr.carbon +++ b/toolchain/parser/testdata/generics/generic_params/template_addr.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'foo'}, diff --git a/toolchain/parser/testdata/generics/interface/basic.carbon b/toolchain/parser/testdata/generics/interface/basic.carbon index 2e8a947e76f9..e829bf0bf378 100644 --- a/toolchain/parser/testdata/generics/interface/basic.carbon +++ b/toolchain/parser/testdata/generics/interface/basic.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'InterfaceIntroducer', text: 'interface'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'Foo'}, diff --git a/toolchain/parser/testdata/generics/interface/declaration.carbon b/toolchain/parser/testdata/generics/interface/declaration.carbon index f8f405f2f672..2e18fe6c8a58 100644 --- a/toolchain/parser/testdata/generics/interface/declaration.carbon +++ b/toolchain/parser/testdata/generics/interface/declaration.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'InterfaceIntroducer', text: 'interface'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'Foo'}, diff --git a/toolchain/parser/testdata/generics/interface/empty_body.carbon b/toolchain/parser/testdata/generics/interface/empty_body.carbon index 4a5871af403e..9a4cfebafcdb 100644 --- a/toolchain/parser/testdata/generics/interface/empty_body.carbon +++ b/toolchain/parser/testdata/generics/interface/empty_body.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'InterfaceIntroducer', text: 'interface'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'Foo'}, diff --git a/toolchain/parser/testdata/generics/interface/fail_missing_name.carbon b/toolchain/parser/testdata/generics/interface/fail_missing_name.carbon index f1d680181b4e..26189e15fb4d 100644 --- a/toolchain/parser/testdata/generics/interface/fail_missing_name.carbon +++ b/toolchain/parser/testdata/generics/interface/fail_missing_name.carbon @@ -3,13 +3,12 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'InterfaceIntroducer', text: 'interface'}, // CHECK:STDOUT: {kind: 'InterfaceDeclaration', text: 'interface', has_error: yes, subtree_size: 2}, // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] -// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/generics/interface/fail_missing_name.carbon:[[@LINE+1]]:11: `interface` introducer should be followed by a name. +// CHECK:STDERR: toolchain/parser/testdata/generics/interface/fail_missing_name.carbon:[[@LINE+1]]:11: `interface` introducer should be followed by a name. interface { } diff --git a/toolchain/parser/testdata/generics/interface/fail_missing_open_curly.carbon b/toolchain/parser/testdata/generics/interface/fail_missing_open_curly.carbon index 5014248967d3..730d64c84eb1 100644 --- a/toolchain/parser/testdata/generics/interface/fail_missing_open_curly.carbon +++ b/toolchain/parser/testdata/generics/interface/fail_missing_open_curly.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'InterfaceIntroducer', text: 'interface'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'Bar'}, @@ -14,8 +13,8 @@ // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] -// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/generics/interface/fail_missing_open_curly.carbon:[[@LINE+1]]:15: `interface` should either end with a `;` for a declaration or have a `{ ... }` block for a definition. +// CHECK:STDERR: toolchain/parser/testdata/generics/interface/fail_missing_open_curly.carbon:[[@LINE+1]]:15: `interface` should either end with a `;` for a declaration or have a `{ ... }` block for a definition. interface Bar Baz {} -// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/generics/interface/fail_missing_open_curly.carbon:[[@LINE+1]]:14: `interface` should either end with a `;` for a declaration or have a `{ ... }` block for a definition. +// CHECK:STDERR: toolchain/parser/testdata/generics/interface/fail_missing_open_curly.carbon:[[@LINE+1]]:14: `interface` should either end with a `;` for a declaration or have a `{ ... }` block for a definition. interface Foo diff --git a/toolchain/parser/testdata/generics/interface/fail_no_impl_allowed.carbon b/toolchain/parser/testdata/generics/interface/fail_no_impl_allowed.carbon index 4e4996ff301f..fa4b8960a055 100644 --- a/toolchain/parser/testdata/generics/interface/fail_no_impl_allowed.carbon +++ b/toolchain/parser/testdata/generics/interface/fail_no_impl_allowed.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'InterfaceIntroducer', text: 'interface'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'Foo'}, @@ -28,7 +27,7 @@ // CHECK:STDOUT: ] interface Foo { - // CHECK:STDERR: {{.*}}/toolchain/parser/testdata/generics/interface/fail_no_impl_allowed.carbon:[[@LINE+1]]:39: Method implementations are not allowed in interfaces. + // CHECK:STDERR: toolchain/parser/testdata/generics/interface/fail_no_impl_allowed.carbon:[[@LINE+1]]:39: Method implementations are not allowed in interfaces. fn Add[self: Self](b: Self) -> Self { print("You can't do that."); } diff --git a/toolchain/parser/testdata/generics/interface/fail_self_param_syntax.carbon b/toolchain/parser/testdata/generics/interface/fail_self_param_syntax.carbon index 0acbcf47dadc..adcce72bc124 100644 --- a/toolchain/parser/testdata/generics/interface/fail_self_param_syntax.carbon +++ b/toolchain/parser/testdata/generics/interface/fail_self_param_syntax.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'InterfaceIntroducer', text: 'interface'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'Foo'}, @@ -43,9 +42,9 @@ // CHECK:STDOUT: ] interface Foo { - // CHECK:STDERR: {{.*}}/toolchain/parser/testdata/generics/interface/fail_self_param_syntax.carbon:[[@LINE+1]]:13: Expected parameter declaration. + // CHECK:STDERR: toolchain/parser/testdata/generics/interface/fail_self_param_syntax.carbon:[[@LINE+1]]:13: Expected parameter declaration. fn Sub[me Self](b: Self) -> Self; - // CHECK:STDERR: {{.*}}/toolchain/parser/testdata/generics/interface/fail_self_param_syntax.carbon:[[@LINE+1]]:10: Expected parameter declaration. + // CHECK:STDERR: toolchain/parser/testdata/generics/interface/fail_self_param_syntax.carbon:[[@LINE+1]]:10: Expected parameter declaration. fn Mul[Self](b: Self) -> Self; } diff --git a/toolchain/parser/testdata/generics/interface/non_instance_fn.carbon b/toolchain/parser/testdata/generics/interface/non_instance_fn.carbon index c57898853958..3408985eb6ce 100644 --- a/toolchain/parser/testdata/generics/interface/non_instance_fn.carbon +++ b/toolchain/parser/testdata/generics/interface/non_instance_fn.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'InterfaceIntroducer', text: 'interface'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'Foo'}, diff --git a/toolchain/parser/testdata/generics/interface/self_pointer.carbon b/toolchain/parser/testdata/generics/interface/self_pointer.carbon index e1c6b882fd44..94322f7a9545 100644 --- a/toolchain/parser/testdata/generics/interface/self_pointer.carbon +++ b/toolchain/parser/testdata/generics/interface/self_pointer.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'InterfaceIntroducer', text: 'interface'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'Foo'}, diff --git a/toolchain/parser/testdata/generics/named_constraint/basic.carbon b/toolchain/parser/testdata/generics/named_constraint/basic.carbon index 86db57d0b356..1a179bf6ffbf 100644 --- a/toolchain/parser/testdata/generics/named_constraint/basic.carbon +++ b/toolchain/parser/testdata/generics/named_constraint/basic.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'NamedConstraintIntroducer', text: 'constraint'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'Foo'}, diff --git a/toolchain/parser/testdata/generics/named_constraint/fail_no_impl_allowed.carbon b/toolchain/parser/testdata/generics/named_constraint/fail_no_impl_allowed.carbon index 0cfc7f5a0f70..83173b0332a9 100644 --- a/toolchain/parser/testdata/generics/named_constraint/fail_no_impl_allowed.carbon +++ b/toolchain/parser/testdata/generics/named_constraint/fail_no_impl_allowed.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'NamedConstraintIntroducer', text: 'constraint'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'Foo'}, @@ -28,6 +27,6 @@ // CHECK:STDOUT: ] constraint Foo { - // CHECK:STDERR: {{.*}}/toolchain/parser/testdata/generics/named_constraint/fail_no_impl_allowed.carbon:[[@LINE+1]]:39: Method implementations are not allowed in interfaces. + // CHECK:STDERR: toolchain/parser/testdata/generics/named_constraint/fail_no_impl_allowed.carbon:[[@LINE+1]]:39: Method implementations are not allowed in interfaces. fn Add[self: Self](b: Self) -> Self {} } diff --git a/toolchain/parser/testdata/generics/params/empty.carbon b/toolchain/parser/testdata/generics/params/empty.carbon index 28fac6a361a2..bf6e903d0653 100644 --- a/toolchain/parser/testdata/generics/params/empty.carbon +++ b/toolchain/parser/testdata/generics/params/empty.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'ClassIntroducer', text: 'class'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'Foo'}, diff --git a/toolchain/parser/testdata/generics/params/one.carbon b/toolchain/parser/testdata/generics/params/one.carbon index df707855567f..ddd722182c62 100644 --- a/toolchain/parser/testdata/generics/params/one.carbon +++ b/toolchain/parser/testdata/generics/params/one.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'ClassIntroducer', text: 'class'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'Foo'}, diff --git a/toolchain/parser/testdata/generics/params/one_suffix_comma.carbon b/toolchain/parser/testdata/generics/params/one_suffix_comma.carbon index 4673ea28bfde..90cc9a00b669 100644 --- a/toolchain/parser/testdata/generics/params/one_suffix_comma.carbon +++ b/toolchain/parser/testdata/generics/params/one_suffix_comma.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'ClassIntroducer', text: 'class'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'Foo'}, diff --git a/toolchain/parser/testdata/generics/params/six.carbon b/toolchain/parser/testdata/generics/params/six.carbon index e2741420cafc..4da99a018f43 100644 --- a/toolchain/parser/testdata/generics/params/six.carbon +++ b/toolchain/parser/testdata/generics/params/six.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'ClassIntroducer', text: 'class'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'Foo'}, diff --git a/toolchain/parser/testdata/generics/params/two.carbon b/toolchain/parser/testdata/generics/params/two.carbon index 35f020bf5f5c..b3fbf0a79aee 100644 --- a/toolchain/parser/testdata/generics/params/two.carbon +++ b/toolchain/parser/testdata/generics/params/two.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'ClassIntroducer', text: 'class'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'Foo'}, diff --git a/toolchain/parser/testdata/generics/params/two_suffix_comma.carbon b/toolchain/parser/testdata/generics/params/two_suffix_comma.carbon index db229bd65030..cfc608bc7ad5 100644 --- a/toolchain/parser/testdata/generics/params/two_suffix_comma.carbon +++ b/toolchain/parser/testdata/generics/params/two_suffix_comma.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'ClassIntroducer', text: 'class'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'Foo'}, diff --git a/toolchain/parser/testdata/if/basic.carbon b/toolchain/parser/testdata/if/basic.carbon index 840e7fd663f7..332f651b5525 100644 --- a/toolchain/parser/testdata/if/basic.carbon +++ b/toolchain/parser/testdata/if/basic.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'F'}, diff --git a/toolchain/parser/testdata/if/else.carbon b/toolchain/parser/testdata/if/else.carbon index 4025e02c17e0..0223a1b45277 100644 --- a/toolchain/parser/testdata/if/else.carbon +++ b/toolchain/parser/testdata/if/else.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'F'}, diff --git a/toolchain/parser/testdata/if/fail_else_unbraced.carbon b/toolchain/parser/testdata/if/fail_else_unbraced.carbon index 412d75a46047..c2c649636272 100644 --- a/toolchain/parser/testdata/if/fail_else_unbraced.carbon +++ b/toolchain/parser/testdata/if/fail_else_unbraced.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'F'}, @@ -62,15 +61,15 @@ fn F() { if (a) - // CHECK:STDERR: {{.*}}/toolchain/parser/testdata/if/fail_else_unbraced.carbon:[[@LINE+1]]:5: Expected braced code block. + // CHECK:STDERR: toolchain/parser/testdata/if/fail_else_unbraced.carbon:[[@LINE+1]]:5: Expected braced code block. if (b) - // CHECK:STDERR: {{.*}}/toolchain/parser/testdata/if/fail_else_unbraced.carbon:[[@LINE+1]]:7: Expected braced code block. + // CHECK:STDERR: toolchain/parser/testdata/if/fail_else_unbraced.carbon:[[@LINE+1]]:7: Expected braced code block. c; else - // CHECK:STDERR: {{.*}}/toolchain/parser/testdata/if/fail_else_unbraced.carbon:[[@LINE+1]]:7: Expected braced code block. + // CHECK:STDERR: toolchain/parser/testdata/if/fail_else_unbraced.carbon:[[@LINE+1]]:7: Expected braced code block. d; else - // CHECK:STDERR: {{.*}}/toolchain/parser/testdata/if/fail_else_unbraced.carbon:[[@LINE+1]]:5: Expected braced code block. + // CHECK:STDERR: toolchain/parser/testdata/if/fail_else_unbraced.carbon:[[@LINE+1]]:5: Expected braced code block. e; if (x) { f; } else if (x) { g; } diff --git a/toolchain/parser/testdata/if/fail_errors.carbon b/toolchain/parser/testdata/if/fail_errors.carbon index 1c797ad2c328..189d31db01a0 100644 --- a/toolchain/parser/testdata/if/fail_errors.carbon +++ b/toolchain/parser/testdata/if/fail_errors.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'F'}, @@ -40,13 +39,13 @@ // CHECK:STDOUT: ] fn F() { - // CHECK:STDERR: {{.*}}/toolchain/parser/testdata/if/fail_errors.carbon:[[@LINE+1]]:6: Expected `(` after `if`. + // CHECK:STDERR: toolchain/parser/testdata/if/fail_errors.carbon:[[@LINE+1]]:6: Expected `(` after `if`. if a {} - // CHECK:STDERR: {{.*}}/toolchain/parser/testdata/if/fail_errors.carbon:[[@LINE+1]]:7: Expected expression. + // CHECK:STDERR: toolchain/parser/testdata/if/fail_errors.carbon:[[@LINE+1]]:7: Expected expression. if () {} - // CHECK:STDERR: {{.*}}/toolchain/parser/testdata/if/fail_errors.carbon:[[@LINE+1]]:9: Unexpected tokens before `)`. + // CHECK:STDERR: toolchain/parser/testdata/if/fail_errors.carbon:[[@LINE+1]]:9: Unexpected tokens before `)`. if (b c) {} if (d) -// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/if/fail_errors.carbon:[[@LINE+2]]:1: Expected braced code block. -// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/if/fail_errors.carbon:[[@LINE+1]]:1: Expected expression. +// CHECK:STDERR: toolchain/parser/testdata/if/fail_errors.carbon:[[@LINE+2]]:1: Expected braced code block. +// CHECK:STDERR: toolchain/parser/testdata/if/fail_errors.carbon:[[@LINE+1]]:1: Expected expression. } diff --git a/toolchain/parser/testdata/if/fail_unbraced.carbon b/toolchain/parser/testdata/if/fail_unbraced.carbon index 97dee8b9e5da..d3c8ffc0d7d7 100644 --- a/toolchain/parser/testdata/if/fail_unbraced.carbon +++ b/toolchain/parser/testdata/if/fail_unbraced.carbon @@ -4,7 +4,6 @@ // // TODO: This should have an error. // AUTOUPDATE -// RUN: %{not} %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'F'}, @@ -37,10 +36,10 @@ fn F() { if (a) - // CHECK:STDERR: {{.*}}/toolchain/parser/testdata/if/fail_unbraced.carbon:[[@LINE+1]]:5: Expected braced code block. + // CHECK:STDERR: toolchain/parser/testdata/if/fail_unbraced.carbon:[[@LINE+1]]:5: Expected braced code block. if (b) - // CHECK:STDERR: {{.*}}/toolchain/parser/testdata/if/fail_unbraced.carbon:[[@LINE+1]]:7: Expected braced code block. + // CHECK:STDERR: toolchain/parser/testdata/if/fail_unbraced.carbon:[[@LINE+1]]:7: Expected braced code block. if (c) - // CHECK:STDERR: {{.*}}/toolchain/parser/testdata/if/fail_unbraced.carbon:[[@LINE+1]]:9: Expected braced code block. + // CHECK:STDERR: toolchain/parser/testdata/if/fail_unbraced.carbon:[[@LINE+1]]:9: Expected braced code block. d; } diff --git a/toolchain/parser/testdata/lit.cfg.py b/toolchain/parser/testdata/lit.cfg.py deleted file mode 120000 index c323f8a5e8da..000000000000 --- a/toolchain/parser/testdata/lit.cfg.py +++ /dev/null @@ -1 +0,0 @@ -../../../bazel/testing/lit.cfg.py \ No newline at end of file diff --git a/toolchain/parser/testdata/operators/associative.carbon b/toolchain/parser/testdata/operators/associative.carbon index e5b31a29fd06..ff44d4e5ef79 100644 --- a/toolchain/parser/testdata/operators/associative.carbon +++ b/toolchain/parser/testdata/operators/associative.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'F'}, diff --git a/toolchain/parser/testdata/operators/fail_infix_uneven_space_after.carbon b/toolchain/parser/testdata/operators/fail_infix_uneven_space_after.carbon index ef68ea0f473f..09ef8b4a89c2 100644 --- a/toolchain/parser/testdata/operators/fail_infix_uneven_space_after.carbon +++ b/toolchain/parser/testdata/operators/fail_infix_uneven_space_after.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'n'}, @@ -18,5 +17,5 @@ // TODO: We could figure out that this first Failed example is infix // with one-token lookahead. -// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/operators/fail_infix_uneven_space_after.carbon:[[@LINE+1]]:16: Expected `;` after expression. +// CHECK:STDERR: toolchain/parser/testdata/operators/fail_infix_uneven_space_after.carbon:[[@LINE+1]]:16: Expected `;` after expression. var n: i8 = n* n; diff --git a/toolchain/parser/testdata/operators/fail_invalid_infix.carbon b/toolchain/parser/testdata/operators/fail_invalid_infix.carbon index 918b0af27ada..5f9fbdacdcc0 100644 --- a/toolchain/parser/testdata/operators/fail_invalid_infix.carbon +++ b/toolchain/parser/testdata/operators/fail_invalid_infix.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'a'}, @@ -35,10 +34,10 @@ // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] -// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/operators/fail_invalid_infix.carbon:[[@LINE+1]]:19: Expected expression. +// CHECK:STDERR: toolchain/parser/testdata/operators/fail_invalid_infix.carbon:[[@LINE+1]]:19: Expected expression. var a: i32 = n == ; -// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/operators/fail_invalid_infix.carbon:[[@LINE+1]]:14: Expected expression. +// CHECK:STDERR: toolchain/parser/testdata/operators/fail_invalid_infix.carbon:[[@LINE+1]]:14: Expected expression. var b: i32 = == n; -// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/operators/fail_invalid_infix.carbon:[[@LINE+2]]:14: Expected expression. -// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/operators/fail_invalid_infix.carbon:[[@LINE+1]]:17: Expected expression. +// CHECK:STDERR: toolchain/parser/testdata/operators/fail_invalid_infix.carbon:[[@LINE+2]]:14: Expected expression. +// CHECK:STDERR: toolchain/parser/testdata/operators/fail_invalid_infix.carbon:[[@LINE+1]]:17: Expected expression. var c: i32 = == ; diff --git a/toolchain/parser/testdata/operators/fail_precedence_and_or.carbon b/toolchain/parser/testdata/operators/fail_precedence_and_or.carbon index 4bd3dc66054d..cebeb7aa57d7 100644 --- a/toolchain/parser/testdata/operators/fail_precedence_and_or.carbon +++ b/toolchain/parser/testdata/operators/fail_precedence_and_or.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'F'}, @@ -21,6 +20,6 @@ // CHECK:STDOUT: ] fn F() { - // CHECK:STDERR: {{.*}}/toolchain/parser/testdata/operators/fail_precedence_and_or.carbon:[[@LINE+1]]:11: Parentheses are required to disambiguate operator precedence. + // CHECK:STDERR: toolchain/parser/testdata/operators/fail_precedence_and_or.carbon:[[@LINE+1]]:11: Parentheses are required to disambiguate operator precedence. a and b or c; } diff --git a/toolchain/parser/testdata/operators/fail_precedence_or_and.carbon b/toolchain/parser/testdata/operators/fail_precedence_or_and.carbon index 494e24896304..02b9fba4325d 100644 --- a/toolchain/parser/testdata/operators/fail_precedence_or_and.carbon +++ b/toolchain/parser/testdata/operators/fail_precedence_or_and.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'F'}, @@ -21,6 +20,6 @@ // CHECK:STDOUT: ] fn F() { - // CHECK:STDERR: {{.*}}/toolchain/parser/testdata/operators/fail_precedence_or_and.carbon:[[@LINE+1]]:10: Parentheses are required to disambiguate operator precedence. + // CHECK:STDERR: toolchain/parser/testdata/operators/fail_precedence_or_and.carbon:[[@LINE+1]]:10: Parentheses are required to disambiguate operator precedence. a or b and c; } diff --git a/toolchain/parser/testdata/operators/fail_precedence_star_minus.carbon b/toolchain/parser/testdata/operators/fail_precedence_star_minus.carbon index 687a26593a1e..01f983a60b1c 100644 --- a/toolchain/parser/testdata/operators/fail_precedence_star_minus.carbon +++ b/toolchain/parser/testdata/operators/fail_precedence_star_minus.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'n'}, @@ -18,5 +17,5 @@ // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] -// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/operators/fail_precedence_star_minus.carbon:[[@LINE+1]]:16: Parentheses are required to disambiguate operator precedence. +// CHECK:STDERR: toolchain/parser/testdata/operators/fail_precedence_star_minus.carbon:[[@LINE+1]]:16: Parentheses are required to disambiguate operator precedence. var n: i8 = n* -n; diff --git a/toolchain/parser/testdata/operators/fail_precedence_star_star.carbon b/toolchain/parser/testdata/operators/fail_precedence_star_star.carbon index b47200927ba4..5f9fdf9ef043 100644 --- a/toolchain/parser/testdata/operators/fail_precedence_star_star.carbon +++ b/toolchain/parser/testdata/operators/fail_precedence_star_star.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'n'}, @@ -18,5 +17,5 @@ // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] -// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/operators/fail_precedence_star_star.carbon:[[@LINE+1]]:16: Parentheses are required to disambiguate operator precedence. +// CHECK:STDERR: toolchain/parser/testdata/operators/fail_precedence_star_star.carbon:[[@LINE+1]]:16: Parentheses are required to disambiguate operator precedence. var n: i8 = n* *p; diff --git a/toolchain/parser/testdata/operators/fail_star_star_no_space.carbon b/toolchain/parser/testdata/operators/fail_star_star_no_space.carbon index c17042dac4f5..b3b86eec072d 100644 --- a/toolchain/parser/testdata/operators/fail_star_star_no_space.carbon +++ b/toolchain/parser/testdata/operators/fail_star_star_no_space.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'n'}, @@ -21,5 +20,5 @@ // before we notice the missing whitespace around the second `*`. // It'd be better to (somehow) form n*(*p) and reject due to the missing // whitespace around the first `*`. -// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/operators/fail_star_star_no_space.carbon:[[@LINE+1]]:16: Expected `;` after expression. +// CHECK:STDERR: toolchain/parser/testdata/operators/fail_star_star_no_space.carbon:[[@LINE+1]]:16: Expected `;` after expression. var n: i8 = n**p; diff --git a/toolchain/parser/testdata/operators/fail_variety.carbon b/toolchain/parser/testdata/operators/fail_variety.carbon index 5b6ea6e92a21..82d8ac55876a 100644 --- a/toolchain/parser/testdata/operators/fail_variety.carbon +++ b/toolchain/parser/testdata/operators/fail_variety.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'F'}, @@ -36,9 +35,9 @@ // CHECK:STDOUT: ] fn F() { - // CHECK:STDERR: {{.*}}/toolchain/parser/testdata/operators/fail_variety.carbon:[[@LINE+4]]:29: Parentheses are required to disambiguate operator precedence. - // CHECK:STDERR: {{.*}}/toolchain/parser/testdata/operators/fail_variety.carbon:[[@LINE+3]]:34: Parentheses are required to disambiguate operator precedence. - // CHECK:STDERR: {{.*}}/toolchain/parser/testdata/operators/fail_variety.carbon:[[@LINE+2]]:38: Parentheses are required to disambiguate operator precedence. - // CHECK:STDERR: {{.*}}/toolchain/parser/testdata/operators/fail_variety.carbon:[[@LINE+1]]:40: Parentheses are required to disambiguate operator precedence. + // CHECK:STDERR: toolchain/parser/testdata/operators/fail_variety.carbon:[[@LINE+4]]:29: Parentheses are required to disambiguate operator precedence. + // CHECK:STDERR: toolchain/parser/testdata/operators/fail_variety.carbon:[[@LINE+3]]:34: Parentheses are required to disambiguate operator precedence. + // CHECK:STDERR: toolchain/parser/testdata/operators/fail_variety.carbon:[[@LINE+2]]:38: Parentheses are required to disambiguate operator precedence. + // CHECK:STDERR: toolchain/parser/testdata/operators/fail_variety.carbon:[[@LINE+1]]:40: Parentheses are required to disambiguate operator precedence. n = a * b + c * d = d * d << e & f - not g; } diff --git a/toolchain/parser/testdata/operators/fixity_in_call.carbon b/toolchain/parser/testdata/operators/fixity_in_call.carbon index 996514da2f98..5804f20d45c9 100644 --- a/toolchain/parser/testdata/operators/fixity_in_call.carbon +++ b/toolchain/parser/testdata/operators/fixity_in_call.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'F'}, diff --git a/toolchain/parser/testdata/operators/fixity_in_params.carbon b/toolchain/parser/testdata/operators/fixity_in_params.carbon index 80814d1ecc8b..6762a7740bb2 100644 --- a/toolchain/parser/testdata/operators/fixity_in_params.carbon +++ b/toolchain/parser/testdata/operators/fixity_in_params.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'F'}, diff --git a/toolchain/parser/testdata/operators/fixity_in_var.carbon b/toolchain/parser/testdata/operators/fixity_in_var.carbon index b54ea4b85b9b..b15d233ed6e7 100644 --- a/toolchain/parser/testdata/operators/fixity_in_var.carbon +++ b/toolchain/parser/testdata/operators/fixity_in_var.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'F'}, diff --git a/toolchain/parser/testdata/operators/fixity_with_assign.carbon b/toolchain/parser/testdata/operators/fixity_with_assign.carbon index 23a858965264..1fed453a97c2 100644 --- a/toolchain/parser/testdata/operators/fixity_with_assign.carbon +++ b/toolchain/parser/testdata/operators/fixity_with_assign.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'F'}, diff --git a/toolchain/parser/testdata/operators/infix.carbon b/toolchain/parser/testdata/operators/infix.carbon index c7c5a17cfe0a..ab320d2a9a17 100644 --- a/toolchain/parser/testdata/operators/infix.carbon +++ b/toolchain/parser/testdata/operators/infix.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'n'}, diff --git a/toolchain/parser/testdata/operators/infix_no_space.carbon b/toolchain/parser/testdata/operators/infix_no_space.carbon index cbc897f3791a..5677bd53665b 100644 --- a/toolchain/parser/testdata/operators/infix_no_space.carbon +++ b/toolchain/parser/testdata/operators/infix_no_space.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'n'}, diff --git a/toolchain/parser/testdata/operators/infix_with_paren_after.carbon b/toolchain/parser/testdata/operators/infix_with_paren_after.carbon index dd38fd7a7240..c6934558fd72 100644 --- a/toolchain/parser/testdata/operators/infix_with_paren_after.carbon +++ b/toolchain/parser/testdata/operators/infix_with_paren_after.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'n'}, diff --git a/toolchain/parser/testdata/operators/infix_with_paren_before.carbon b/toolchain/parser/testdata/operators/infix_with_paren_before.carbon index 9b6eb4cdc996..a47b3e12d9e6 100644 --- a/toolchain/parser/testdata/operators/infix_with_paren_before.carbon +++ b/toolchain/parser/testdata/operators/infix_with_paren_before.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'n'}, diff --git a/toolchain/parser/testdata/operators/missing_precedence_not.carbon b/toolchain/parser/testdata/operators/missing_precedence_not.carbon index 1bfaaa617477..419d3dd922e8 100644 --- a/toolchain/parser/testdata/operators/missing_precedence_not.carbon +++ b/toolchain/parser/testdata/operators/missing_precedence_not.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'F'}, @@ -24,8 +23,8 @@ // CHECK:STDOUT: ] fn F() { - // CHECK:STDERR: {{.*}}/toolchain/parser/testdata/operators/missing_precedence_not.carbon:[[@LINE+3]]:3: Whitespace is required before this unary operator. - // CHECK:STDERR: {{.*}}/toolchain/parser/testdata/operators/missing_precedence_not.carbon:[[@LINE+2]]:13: Whitespace is required before this unary operator. - // CHECK:STDERR: {{.*}}/toolchain/parser/testdata/operators/missing_precedence_not.carbon:[[@LINE+1]]:23: Whitespace is required before this unary operator. + // CHECK:STDERR: toolchain/parser/testdata/operators/missing_precedence_not.carbon:[[@LINE+3]]:3: Whitespace is required before this unary operator. + // CHECK:STDERR: toolchain/parser/testdata/operators/missing_precedence_not.carbon:[[@LINE+2]]:13: Whitespace is required before this unary operator. + // CHECK:STDERR: toolchain/parser/testdata/operators/missing_precedence_not.carbon:[[@LINE+1]]:23: Whitespace is required before this unary operator. not a and not b and not c; } diff --git a/toolchain/parser/testdata/operators/postfix.carbon b/toolchain/parser/testdata/operators/postfix.carbon index 5e8c58d1ac9c..79fed10462ba 100644 --- a/toolchain/parser/testdata/operators/postfix.carbon +++ b/toolchain/parser/testdata/operators/postfix.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'v'}, diff --git a/toolchain/parser/testdata/operators/postfix_repeat.carbon b/toolchain/parser/testdata/operators/postfix_repeat.carbon index 32e182a9586c..127eb69e1c5b 100644 --- a/toolchain/parser/testdata/operators/postfix_repeat.carbon +++ b/toolchain/parser/testdata/operators/postfix_repeat.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'F'}, diff --git a/toolchain/parser/testdata/operators/postfix_space_after_op.carbon b/toolchain/parser/testdata/operators/postfix_space_after_op.carbon index 4e797f2d5b79..0b18ceb8aea5 100644 --- a/toolchain/parser/testdata/operators/postfix_space_after_op.carbon +++ b/toolchain/parser/testdata/operators/postfix_space_after_op.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'v'}, diff --git a/toolchain/parser/testdata/operators/prefix.carbon b/toolchain/parser/testdata/operators/prefix.carbon index b70d5ad839c6..f263a3d2af7e 100644 --- a/toolchain/parser/testdata/operators/prefix.carbon +++ b/toolchain/parser/testdata/operators/prefix.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'n'}, diff --git a/toolchain/parser/testdata/operators/prefix_no_space.carbon b/toolchain/parser/testdata/operators/prefix_no_space.carbon index d6a0eaf754b2..de0a62f1fb20 100644 --- a/toolchain/parser/testdata/operators/prefix_no_space.carbon +++ b/toolchain/parser/testdata/operators/prefix_no_space.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'n'}, diff --git a/toolchain/parser/testdata/operators/prefix_repeat.carbon b/toolchain/parser/testdata/operators/prefix_repeat.carbon index bd17ff448795..b9423409bc98 100644 --- a/toolchain/parser/testdata/operators/prefix_repeat.carbon +++ b/toolchain/parser/testdata/operators/prefix_repeat.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'F'}, diff --git a/toolchain/parser/testdata/operators/recover_infix_uneven_space_before.carbon b/toolchain/parser/testdata/operators/recover_infix_uneven_space_before.carbon index f722eac57004..32847992b3e4 100644 --- a/toolchain/parser/testdata/operators/recover_infix_uneven_space_before.carbon +++ b/toolchain/parser/testdata/operators/recover_infix_uneven_space_before.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'n'}, @@ -17,5 +16,5 @@ // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] -// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/operators/recover_infix_uneven_space_before.carbon:[[@LINE+1]]:15: Whitespace missing after binary operator. +// CHECK:STDERR: toolchain/parser/testdata/operators/recover_infix_uneven_space_before.carbon:[[@LINE+1]]:15: Whitespace missing after binary operator. var n: i8 = n *n; diff --git a/toolchain/parser/testdata/operators/recover_postfix_space.carbon b/toolchain/parser/testdata/operators/recover_postfix_space.carbon index 93accd196347..912847979807 100644 --- a/toolchain/parser/testdata/operators/recover_postfix_space.carbon +++ b/toolchain/parser/testdata/operators/recover_postfix_space.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'v'}, @@ -16,5 +15,5 @@ // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] -// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/operators/recover_postfix_space.carbon:[[@LINE+1]]:18: Whitespace is not allowed before this unary operator. +// CHECK:STDERR: toolchain/parser/testdata/operators/recover_postfix_space.carbon:[[@LINE+1]]:18: Whitespace is not allowed before this unary operator. var v: type = i8 *; diff --git a/toolchain/parser/testdata/operators/recover_postfix_space_before_comma.carbon b/toolchain/parser/testdata/operators/recover_postfix_space_before_comma.carbon index 33b0c175beda..05c38942875d 100644 --- a/toolchain/parser/testdata/operators/recover_postfix_space_before_comma.carbon +++ b/toolchain/parser/testdata/operators/recover_postfix_space_before_comma.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'n'}, @@ -21,5 +20,5 @@ // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] -// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/operators/recover_postfix_space_before_comma.carbon:[[@LINE+1]]:18: Whitespace is not allowed before this unary operator. +// CHECK:STDERR: toolchain/parser/testdata/operators/recover_postfix_space_before_comma.carbon:[[@LINE+1]]:18: Whitespace is not allowed before this unary operator. var n: i8 = F(i8 *, 0); diff --git a/toolchain/parser/testdata/operators/recover_postfix_space_in_call.carbon b/toolchain/parser/testdata/operators/recover_postfix_space_in_call.carbon index f4fae68553cd..1f32efe32501 100644 --- a/toolchain/parser/testdata/operators/recover_postfix_space_in_call.carbon +++ b/toolchain/parser/testdata/operators/recover_postfix_space_in_call.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'n'}, @@ -19,5 +18,5 @@ // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] -// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/operators/recover_postfix_space_in_call.carbon:[[@LINE+1]]:18: Whitespace is not allowed before this unary operator. +// CHECK:STDERR: toolchain/parser/testdata/operators/recover_postfix_space_in_call.carbon:[[@LINE+1]]:18: Whitespace is not allowed before this unary operator. var n: i8 = F(i8 *); diff --git a/toolchain/parser/testdata/operators/recover_postfix_space_surrounding.carbon b/toolchain/parser/testdata/operators/recover_postfix_space_surrounding.carbon index a3b535fdd9af..76edbb6ef484 100644 --- a/toolchain/parser/testdata/operators/recover_postfix_space_surrounding.carbon +++ b/toolchain/parser/testdata/operators/recover_postfix_space_surrounding.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'v'}, @@ -16,6 +15,6 @@ // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] -// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/operators/recover_postfix_space_surrounding.carbon:[[@LINE+2]]:18: Whitespace is not allowed before this unary operator. -// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/operators/recover_postfix_space_surrounding.carbon:[[@LINE+1]]:18: Whitespace is required after this unary operator. +// CHECK:STDERR: toolchain/parser/testdata/operators/recover_postfix_space_surrounding.carbon:[[@LINE+2]]:18: Whitespace is not allowed before this unary operator. +// CHECK:STDERR: toolchain/parser/testdata/operators/recover_postfix_space_surrounding.carbon:[[@LINE+1]]:18: Whitespace is required after this unary operator. var v: type = i8 * ; diff --git a/toolchain/parser/testdata/operators/recover_prefix_space.carbon b/toolchain/parser/testdata/operators/recover_prefix_space.carbon index 68748c1a712a..fa5aac534fae 100644 --- a/toolchain/parser/testdata/operators/recover_prefix_space.carbon +++ b/toolchain/parser/testdata/operators/recover_prefix_space.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'n'}, @@ -16,6 +15,6 @@ // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] -// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/operators/recover_prefix_space.carbon:[[@LINE+2]]:13: Whitespace is not allowed after this unary operator. -// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/operators/recover_prefix_space.carbon:[[@LINE+1]]:13: Whitespace is required before this unary operator. +// CHECK:STDERR: toolchain/parser/testdata/operators/recover_prefix_space.carbon:[[@LINE+2]]:13: Whitespace is not allowed after this unary operator. +// CHECK:STDERR: toolchain/parser/testdata/operators/recover_prefix_space.carbon:[[@LINE+1]]:13: Whitespace is required before this unary operator. var n: i8 = - n; diff --git a/toolchain/parser/testdata/operators/recover_prefix_uneven_space_with_assign.carbon b/toolchain/parser/testdata/operators/recover_prefix_uneven_space_with_assign.carbon index 11707abd72a4..6aa2d8a850cc 100644 --- a/toolchain/parser/testdata/operators/recover_prefix_uneven_space_with_assign.carbon +++ b/toolchain/parser/testdata/operators/recover_prefix_uneven_space_with_assign.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'n'}, @@ -16,5 +15,5 @@ // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] -// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/operators/recover_prefix_uneven_space_with_assign.carbon:[[@LINE+1]]:12: Whitespace is not allowed after this unary operator. +// CHECK:STDERR: toolchain/parser/testdata/operators/recover_prefix_uneven_space_with_assign.carbon:[[@LINE+1]]:12: Whitespace is not allowed after this unary operator. var n: i8 =- n; diff --git a/toolchain/parser/testdata/package/api.carbon b/toolchain/parser/testdata/package/api.carbon index 8869573a912a..878a9da91a15 100644 --- a/toolchain/parser/testdata/package/api.carbon +++ b/toolchain/parser/testdata/package/api.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'PackageIntroducer', text: 'package'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'Geometry'}, diff --git a/toolchain/parser/testdata/package/api_library.carbon b/toolchain/parser/testdata/package/api_library.carbon index 12e10caf4e81..effb97a10618 100644 --- a/toolchain/parser/testdata/package/api_library.carbon +++ b/toolchain/parser/testdata/package/api_library.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'PackageIntroducer', text: 'package'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'Geometry'}, diff --git a/toolchain/parser/testdata/package/fail_extra_string.carbon b/toolchain/parser/testdata/package/fail_extra_string.carbon index 604aabd518a1..113851d12dc8 100644 --- a/toolchain/parser/testdata/package/fail_extra_string.carbon +++ b/toolchain/parser/testdata/package/fail_extra_string.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'PackageIntroducer', text: 'package'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'Foo'}, @@ -13,5 +12,5 @@ // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] -// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/package/fail_extra_string.carbon:[[@LINE+1]]:27: Expected a `api` or `impl`. +// CHECK:STDERR: toolchain/parser/testdata/package/fail_extra_string.carbon:[[@LINE+1]]:27: Expected a `api` or `impl`. package Foo library "bar" "baz"; diff --git a/toolchain/parser/testdata/package/fail_library_is_identifier.carbon b/toolchain/parser/testdata/package/fail_library_is_identifier.carbon index b6f7ec4a683d..3b2bbd59043b 100644 --- a/toolchain/parser/testdata/package/fail_library_is_identifier.carbon +++ b/toolchain/parser/testdata/package/fail_library_is_identifier.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'PackageIntroducer', text: 'package'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'Geometry'}, @@ -11,5 +10,5 @@ // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] -// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/package/fail_library_is_identifier.carbon:[[@LINE+1]]:26: Expected a string literal to specify the library name. +// CHECK:STDERR: toolchain/parser/testdata/package/fail_library_is_identifier.carbon:[[@LINE+1]]:26: Expected a string literal to specify the library name. package Geometry library Shapes api; diff --git a/toolchain/parser/testdata/package/fail_library_skips_name.carbon b/toolchain/parser/testdata/package/fail_library_skips_name.carbon index e2d78291d914..e1febd2167e3 100644 --- a/toolchain/parser/testdata/package/fail_library_skips_name.carbon +++ b/toolchain/parser/testdata/package/fail_library_skips_name.carbon @@ -3,12 +3,11 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'PackageIntroducer', text: 'package'}, // CHECK:STDOUT: {kind: 'PackageDirective', text: ';', has_error: yes, subtree_size: 2}, // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] -// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/package/fail_library_skips_name.carbon:[[@LINE+1]]:9: Expected identifier after `package`. +// CHECK:STDERR: toolchain/parser/testdata/package/fail_library_skips_name.carbon:[[@LINE+1]]:9: Expected identifier after `package`. package library "Shapes" api; diff --git a/toolchain/parser/testdata/package/fail_name_is_keyword.carbon b/toolchain/parser/testdata/package/fail_name_is_keyword.carbon index 39a678e2ccb7..459a58b88952 100644 --- a/toolchain/parser/testdata/package/fail_name_is_keyword.carbon +++ b/toolchain/parser/testdata/package/fail_name_is_keyword.carbon @@ -3,12 +3,11 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'PackageIntroducer', text: 'package'}, // CHECK:STDOUT: {kind: 'PackageDirective', text: ';', has_error: yes, subtree_size: 2}, // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] -// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/package/fail_name_is_keyword.carbon:[[@LINE+1]]:9: Expected identifier after `package`. +// CHECK:STDERR: toolchain/parser/testdata/package/fail_name_is_keyword.carbon:[[@LINE+1]]:9: Expected identifier after `package`. package fn; diff --git a/toolchain/parser/testdata/package/fail_no_name.carbon b/toolchain/parser/testdata/package/fail_no_name.carbon index 8a54c4f293b0..5125aeb8abe9 100644 --- a/toolchain/parser/testdata/package/fail_no_name.carbon +++ b/toolchain/parser/testdata/package/fail_no_name.carbon @@ -3,12 +3,11 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'PackageIntroducer', text: 'package'}, // CHECK:STDOUT: {kind: 'PackageDirective', text: ';', has_error: yes, subtree_size: 2}, // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] -// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/package/fail_no_name.carbon:[[@LINE+1]]:8: Expected identifier after `package`. +// CHECK:STDERR: toolchain/parser/testdata/package/fail_no_name.carbon:[[@LINE+1]]:8: Expected identifier after `package`. package; diff --git a/toolchain/parser/testdata/package/fail_no_semi.carbon b/toolchain/parser/testdata/package/fail_no_semi.carbon index ceaa48908297..d85b4313cff6 100644 --- a/toolchain/parser/testdata/package/fail_no_semi.carbon +++ b/toolchain/parser/testdata/package/fail_no_semi.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'PackageIntroducer', text: 'package'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'Geometry'}, @@ -12,5 +11,5 @@ // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] -// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/package/fail_no_semi.carbon:[[@LINE+1]]:21: Expected `;` to end package directive. +// CHECK:STDERR: toolchain/parser/testdata/package/fail_no_semi.carbon:[[@LINE+1]]:21: Expected `;` to end package directive. package Geometry api diff --git a/toolchain/parser/testdata/package/fail_no_type.carbon b/toolchain/parser/testdata/package/fail_no_type.carbon index 42c89f1c8c27..2f16954118f7 100644 --- a/toolchain/parser/testdata/package/fail_no_type.carbon +++ b/toolchain/parser/testdata/package/fail_no_type.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'PackageIntroducer', text: 'package'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'Geometry'}, @@ -11,5 +10,5 @@ // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] -// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/package/fail_no_type.carbon:[[@LINE+1]]:17: Expected a `api` or `impl`. +// CHECK:STDERR: toolchain/parser/testdata/package/fail_no_type.carbon:[[@LINE+1]]:17: Expected a `api` or `impl`. package Geometry; diff --git a/toolchain/parser/testdata/package/fail_omit_library_keyword.carbon b/toolchain/parser/testdata/package/fail_omit_library_keyword.carbon index 760d1b908706..cd8d94b992e4 100644 --- a/toolchain/parser/testdata/package/fail_omit_library_keyword.carbon +++ b/toolchain/parser/testdata/package/fail_omit_library_keyword.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'PackageIntroducer', text: 'package'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'Geometry'}, @@ -11,5 +10,5 @@ // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] -// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/package/fail_omit_library_keyword.carbon:[[@LINE+1]]:18: Missing `library` keyword. +// CHECK:STDERR: toolchain/parser/testdata/package/fail_omit_library_keyword.carbon:[[@LINE+1]]:18: Missing `library` keyword. package Geometry "Shapes" api; diff --git a/toolchain/parser/testdata/package/impl.carbon b/toolchain/parser/testdata/package/impl.carbon index 6786ec31a737..6cefd7bd4a3b 100644 --- a/toolchain/parser/testdata/package/impl.carbon +++ b/toolchain/parser/testdata/package/impl.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'PackageIntroducer', text: 'package'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'Geometry'}, diff --git a/toolchain/parser/testdata/package/impl_library.carbon b/toolchain/parser/testdata/package/impl_library.carbon index 5efaf45bed27..f4fa3f4e9aca 100644 --- a/toolchain/parser/testdata/package/impl_library.carbon +++ b/toolchain/parser/testdata/package/impl_library.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'PackageIntroducer', text: 'package'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'Geometry'}, diff --git a/toolchain/parser/testdata/return/basic.carbon b/toolchain/parser/testdata/return/basic.carbon index 9ae5f87adbfc..6b51d3d2c912 100644 --- a/toolchain/parser/testdata/return/basic.carbon +++ b/toolchain/parser/testdata/return/basic.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'F'}, diff --git a/toolchain/parser/testdata/return/expr.carbon b/toolchain/parser/testdata/return/expr.carbon index 86abb9678433..ccbd2bff741a 100644 --- a/toolchain/parser/testdata/return/expr.carbon +++ b/toolchain/parser/testdata/return/expr.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'F'}, diff --git a/toolchain/parser/testdata/return/fail_expr_no_semi.carbon b/toolchain/parser/testdata/return/fail_expr_no_semi.carbon index 3d303f246b31..3d42eeed71f4 100644 --- a/toolchain/parser/testdata/return/fail_expr_no_semi.carbon +++ b/toolchain/parser/testdata/return/fail_expr_no_semi.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'F'}, @@ -19,5 +18,5 @@ fn F() { return x -// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/return/fail_expr_no_semi.carbon:[[@LINE+1]]:1: Expected `;` after `return`. +// CHECK:STDERR: toolchain/parser/testdata/return/fail_expr_no_semi.carbon:[[@LINE+1]]:1: Expected `;` after `return`. } diff --git a/toolchain/parser/testdata/return/fail_no_semi.carbon b/toolchain/parser/testdata/return/fail_no_semi.carbon index e79b6b56b51f..54457d0e7e3d 100644 --- a/toolchain/parser/testdata/return/fail_no_semi.carbon +++ b/toolchain/parser/testdata/return/fail_no_semi.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'F'}, @@ -19,6 +18,6 @@ fn F() { return -// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/return/fail_no_semi.carbon:[[@LINE+2]]:1: Expected expression. -// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/return/fail_no_semi.carbon:[[@LINE+1]]:1: Expected `;` after `return`. +// CHECK:STDERR: toolchain/parser/testdata/return/fail_no_semi.carbon:[[@LINE+2]]:1: Expected expression. +// CHECK:STDERR: toolchain/parser/testdata/return/fail_no_semi.carbon:[[@LINE+1]]:1: Expected `;` after `return`. } diff --git a/toolchain/parser/testdata/struct/fail_comma_only.carbon b/toolchain/parser/testdata/struct/fail_comma_only.carbon index bfbb0115def5..006e12e9f242 100644 --- a/toolchain/parser/testdata/struct/fail_comma_only.carbon +++ b/toolchain/parser/testdata/struct/fail_comma_only.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'x'}, @@ -19,5 +18,5 @@ // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] -// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/struct/fail_comma_only.carbon:[[@LINE+1]]:9: Expected `.field: field_type` or `.field = value`. +// CHECK:STDERR: toolchain/parser/testdata/struct/fail_comma_only.carbon:[[@LINE+1]]:9: Expected `.field: field_type` or `.field = value`. var x: {,} = {}; diff --git a/toolchain/parser/testdata/struct/fail_comma_repeat_in_type.carbon b/toolchain/parser/testdata/struct/fail_comma_repeat_in_type.carbon index 213bd95b4c1c..d8f1dd70f97b 100644 --- a/toolchain/parser/testdata/struct/fail_comma_repeat_in_type.carbon +++ b/toolchain/parser/testdata/struct/fail_comma_repeat_in_type.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'x'}, @@ -24,5 +23,5 @@ // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] -// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/struct/fail_comma_repeat_in_type.carbon:[[@LINE+1]]:17: Expected `.field: field_type`. +// CHECK:STDERR: toolchain/parser/testdata/struct/fail_comma_repeat_in_type.carbon:[[@LINE+1]]:17: Expected `.field: field_type`. var x: {.a: i32,,} = {}; diff --git a/toolchain/parser/testdata/struct/fail_comma_repeat_in_value.carbon b/toolchain/parser/testdata/struct/fail_comma_repeat_in_value.carbon index 4de5fc08239d..cbce89274aad 100644 --- a/toolchain/parser/testdata/struct/fail_comma_repeat_in_value.carbon +++ b/toolchain/parser/testdata/struct/fail_comma_repeat_in_value.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'x'}, @@ -24,5 +23,5 @@ // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] -// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/struct/fail_comma_repeat_in_value.carbon:[[@LINE+1]]:16: Expected `.field = value`. +// CHECK:STDERR: toolchain/parser/testdata/struct/fail_comma_repeat_in_value.carbon:[[@LINE+1]]:16: Expected `.field = value`. var x: {.a = 0,,} = {}; diff --git a/toolchain/parser/testdata/struct/fail_dot_only.carbon b/toolchain/parser/testdata/struct/fail_dot_only.carbon index 2a1300b7d402..97cef75d6777 100644 --- a/toolchain/parser/testdata/struct/fail_dot_only.carbon +++ b/toolchain/parser/testdata/struct/fail_dot_only.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'x'}, @@ -20,5 +19,5 @@ // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] -// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/struct/fail_dot_only.carbon:[[@LINE+1]]:10: Expected identifier after `.`. +// CHECK:STDERR: toolchain/parser/testdata/struct/fail_dot_only.carbon:[[@LINE+1]]:10: Expected identifier after `.`. var x: {.} = {}; diff --git a/toolchain/parser/testdata/struct/fail_dot_string_colon.carbon b/toolchain/parser/testdata/struct/fail_dot_string_colon.carbon index cd3a7e7d890d..092b27d461df 100644 --- a/toolchain/parser/testdata/struct/fail_dot_string_colon.carbon +++ b/toolchain/parser/testdata/struct/fail_dot_string_colon.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'x'}, @@ -26,5 +25,5 @@ // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] -// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/struct/fail_dot_string_colon.carbon:[[@LINE+1]]:10: Expected identifier after `.`. +// CHECK:STDERR: toolchain/parser/testdata/struct/fail_dot_string_colon.carbon:[[@LINE+1]]:10: Expected identifier after `.`. var x: {."hello": i32, .y: i32} = {}; diff --git a/toolchain/parser/testdata/struct/fail_dot_string_equals.carbon b/toolchain/parser/testdata/struct/fail_dot_string_equals.carbon index e511116b9ea5..3bd4e84b11cb 100644 --- a/toolchain/parser/testdata/struct/fail_dot_string_equals.carbon +++ b/toolchain/parser/testdata/struct/fail_dot_string_equals.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'x'}, @@ -26,5 +25,5 @@ // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] -// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/struct/fail_dot_string_equals.carbon:[[@LINE+1]]:10: Expected identifier after `.`. +// CHECK:STDERR: toolchain/parser/testdata/struct/fail_dot_string_equals.carbon:[[@LINE+1]]:10: Expected identifier after `.`. var x: {."hello" = 0, .y = 4} = {}; diff --git a/toolchain/parser/testdata/struct/fail_extra_token_in_type.carbon b/toolchain/parser/testdata/struct/fail_extra_token_in_type.carbon index 6e79f65d6cc6..8ff218db9827 100644 --- a/toolchain/parser/testdata/struct/fail_extra_token_in_type.carbon +++ b/toolchain/parser/testdata/struct/fail_extra_token_in_type.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'x'}, @@ -25,5 +24,5 @@ // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] -// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/struct/fail_extra_token_in_type.carbon:[[@LINE+1]]:17: Expected `,` or `}`. +// CHECK:STDERR: toolchain/parser/testdata/struct/fail_extra_token_in_type.carbon:[[@LINE+1]]:17: Expected `,` or `}`. var x: {.a: i32 banana} = {.a = 0}; diff --git a/toolchain/parser/testdata/struct/fail_extra_token_in_value.carbon b/toolchain/parser/testdata/struct/fail_extra_token_in_value.carbon index 901f0f1cf612..a450d48309e2 100644 --- a/toolchain/parser/testdata/struct/fail_extra_token_in_value.carbon +++ b/toolchain/parser/testdata/struct/fail_extra_token_in_value.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'x'}, @@ -25,5 +24,5 @@ // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] -// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/struct/fail_extra_token_in_value.carbon:[[@LINE+1]]:28: Expected `,` or `}`. +// CHECK:STDERR: toolchain/parser/testdata/struct/fail_extra_token_in_value.carbon:[[@LINE+1]]:28: Expected `,` or `}`. var x: {.a: i32} = {.a = 0 banana}; diff --git a/toolchain/parser/testdata/struct/fail_identifier_colon.carbon b/toolchain/parser/testdata/struct/fail_identifier_colon.carbon index 3bf338b9b8f8..ba9ae32b292a 100644 --- a/toolchain/parser/testdata/struct/fail_identifier_colon.carbon +++ b/toolchain/parser/testdata/struct/fail_identifier_colon.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'x'}, @@ -18,5 +17,5 @@ // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] -// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/struct/fail_identifier_colon.carbon:[[@LINE+1]]:9: Expected `.field: field_type` or `.field = value`. +// CHECK:STDERR: toolchain/parser/testdata/struct/fail_identifier_colon.carbon:[[@LINE+1]]:9: Expected `.field: field_type` or `.field = value`. var x: {a:} = {}; diff --git a/toolchain/parser/testdata/struct/fail_identifier_equals.carbon b/toolchain/parser/testdata/struct/fail_identifier_equals.carbon index 0a593a89e7a6..aa7aa30b1ca7 100644 --- a/toolchain/parser/testdata/struct/fail_identifier_equals.carbon +++ b/toolchain/parser/testdata/struct/fail_identifier_equals.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'x'}, @@ -18,5 +17,5 @@ // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] -// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/struct/fail_identifier_equals.carbon:[[@LINE+1]]:9: Expected `.field: field_type` or `.field = value`. +// CHECK:STDERR: toolchain/parser/testdata/struct/fail_identifier_equals.carbon:[[@LINE+1]]:9: Expected `.field: field_type` or `.field = value`. var x: {a=} = {}; diff --git a/toolchain/parser/testdata/struct/fail_identifier_only.carbon b/toolchain/parser/testdata/struct/fail_identifier_only.carbon index 12275ff05590..4e08bc83d8ff 100644 --- a/toolchain/parser/testdata/struct/fail_identifier_only.carbon +++ b/toolchain/parser/testdata/struct/fail_identifier_only.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'x'}, @@ -18,5 +17,5 @@ // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] -// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/struct/fail_identifier_only.carbon:[[@LINE+1]]:9: Expected `.field: field_type` or `.field = value`. +// CHECK:STDERR: toolchain/parser/testdata/struct/fail_identifier_only.carbon:[[@LINE+1]]:9: Expected `.field: field_type` or `.field = value`. var x: {a} = {}; diff --git a/toolchain/parser/testdata/struct/fail_missing_type.carbon b/toolchain/parser/testdata/struct/fail_missing_type.carbon index f13c22fc0bc3..8273e0934553 100644 --- a/toolchain/parser/testdata/struct/fail_missing_type.carbon +++ b/toolchain/parser/testdata/struct/fail_missing_type.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'x'}, @@ -21,5 +20,5 @@ // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] -// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/struct/fail_missing_type.carbon:[[@LINE+1]]:12: Expected expression. +// CHECK:STDERR: toolchain/parser/testdata/struct/fail_missing_type.carbon:[[@LINE+1]]:12: Expected expression. var x: {.a:} = {}; diff --git a/toolchain/parser/testdata/struct/fail_missing_value.carbon b/toolchain/parser/testdata/struct/fail_missing_value.carbon index e7874cb78f1b..f2856bf7f90b 100644 --- a/toolchain/parser/testdata/struct/fail_missing_value.carbon +++ b/toolchain/parser/testdata/struct/fail_missing_value.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'x'}, @@ -21,5 +20,5 @@ // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] -// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/struct/fail_missing_value.carbon:[[@LINE+1]]:12: Expected expression. +// CHECK:STDERR: toolchain/parser/testdata/struct/fail_missing_value.carbon:[[@LINE+1]]:12: Expected expression. var x: {.a=} = {}; diff --git a/toolchain/parser/testdata/struct/fail_mix_type_and_value.carbon b/toolchain/parser/testdata/struct/fail_mix_type_and_value.carbon index 9efa1497b80f..d67915f417cb 100644 --- a/toolchain/parser/testdata/struct/fail_mix_type_and_value.carbon +++ b/toolchain/parser/testdata/struct/fail_mix_type_and_value.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'x'}, @@ -25,5 +24,5 @@ // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] -// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/struct/fail_mix_type_and_value.carbon:[[@LINE+1]]:21: Expected `.field: field_type`. +// CHECK:STDERR: toolchain/parser/testdata/struct/fail_mix_type_and_value.carbon:[[@LINE+1]]:21: Expected `.field: field_type`. var x: {.a: i32, .b = 0} = {}; diff --git a/toolchain/parser/testdata/struct/fail_mix_value_and_type.carbon b/toolchain/parser/testdata/struct/fail_mix_value_and_type.carbon index 3e7ada9d4a8a..8ba22a09bd76 100644 --- a/toolchain/parser/testdata/struct/fail_mix_value_and_type.carbon +++ b/toolchain/parser/testdata/struct/fail_mix_value_and_type.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'x'}, @@ -23,5 +22,5 @@ // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] -// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/struct/fail_mix_value_and_type.carbon:[[@LINE+1]]:17: Expected `.field = value`. +// CHECK:STDERR: toolchain/parser/testdata/struct/fail_mix_value_and_type.carbon:[[@LINE+1]]:17: Expected `.field = value`. var x: {.a = 0, b: i32} = {}; diff --git a/toolchain/parser/testdata/struct/fail_mix_with_unknown.carbon b/toolchain/parser/testdata/struct/fail_mix_with_unknown.carbon index 125d664f87a5..2383e2075943 100644 --- a/toolchain/parser/testdata/struct/fail_mix_with_unknown.carbon +++ b/toolchain/parser/testdata/struct/fail_mix_with_unknown.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'x'}, @@ -48,10 +47,10 @@ // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] -// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/struct/fail_mix_with_unknown.carbon:[[@LINE+2]]:25: Expected `.field = value`. -// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/struct/fail_mix_with_unknown.carbon:[[@LINE+1]]:29: Expected `.field = value`. +// CHECK:STDERR: toolchain/parser/testdata/struct/fail_mix_with_unknown.carbon:[[@LINE+2]]:25: Expected `.field = value`. +// CHECK:STDERR: toolchain/parser/testdata/struct/fail_mix_with_unknown.carbon:[[@LINE+1]]:29: Expected `.field = value`. var x: i32 = {.a = 1, .b, .c: i32}; -// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/struct/fail_mix_with_unknown.carbon:[[@LINE+2]]:26: Expected `.field: field_type`. -// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/struct/fail_mix_with_unknown.carbon:[[@LINE+1]]:31: Expected `.field: field_type`. +// CHECK:STDERR: toolchain/parser/testdata/struct/fail_mix_with_unknown.carbon:[[@LINE+2]]:26: Expected `.field: field_type`. +// CHECK:STDERR: toolchain/parser/testdata/struct/fail_mix_with_unknown.carbon:[[@LINE+1]]:31: Expected `.field: field_type`. var x: i32 = {.a: i32, .b, .c = 1}; diff --git a/toolchain/parser/testdata/struct/fail_no_colon_or_equals.carbon b/toolchain/parser/testdata/struct/fail_no_colon_or_equals.carbon index 070a7fb5aefc..8935dba73067 100644 --- a/toolchain/parser/testdata/struct/fail_no_colon_or_equals.carbon +++ b/toolchain/parser/testdata/struct/fail_no_colon_or_equals.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'x'}, @@ -20,5 +19,5 @@ // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] -// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/struct/fail_no_colon_or_equals.carbon:[[@LINE+1]]:11: Expected `.field: field_type` or `.field = value`. +// CHECK:STDERR: toolchain/parser/testdata/struct/fail_no_colon_or_equals.carbon:[[@LINE+1]]:11: Expected `.field: field_type` or `.field = value`. var x: {.a} = {}; diff --git a/toolchain/parser/testdata/struct/fail_type_no_designator.carbon b/toolchain/parser/testdata/struct/fail_type_no_designator.carbon index d1085fa888f0..ce95a10fea13 100644 --- a/toolchain/parser/testdata/struct/fail_type_no_designator.carbon +++ b/toolchain/parser/testdata/struct/fail_type_no_designator.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'x'}, @@ -18,5 +17,5 @@ // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] -// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/struct/fail_type_no_designator.carbon:[[@LINE+1]]:9: Expected `.field: field_type` or `.field = value`. +// CHECK:STDERR: toolchain/parser/testdata/struct/fail_type_no_designator.carbon:[[@LINE+1]]:9: Expected `.field: field_type` or `.field = value`. var x: {i32} = {}; diff --git a/toolchain/parser/testdata/struct/no_entries.carbon b/toolchain/parser/testdata/struct/no_entries.carbon index c95dd1cae535..5847e456a7b5 100644 --- a/toolchain/parser/testdata/struct/no_entries.carbon +++ b/toolchain/parser/testdata/struct/no_entries.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'y'}, diff --git a/toolchain/parser/testdata/struct/one_entry_no_comma.carbon b/toolchain/parser/testdata/struct/one_entry_no_comma.carbon index 6afd717fdb2d..02a73f6e1577 100644 --- a/toolchain/parser/testdata/struct/one_entry_no_comma.carbon +++ b/toolchain/parser/testdata/struct/one_entry_no_comma.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'z'}, diff --git a/toolchain/parser/testdata/struct/one_entry_with_comma.carbon b/toolchain/parser/testdata/struct/one_entry_with_comma.carbon index d42b20718031..d59a5880296f 100644 --- a/toolchain/parser/testdata/struct/one_entry_with_comma.carbon +++ b/toolchain/parser/testdata/struct/one_entry_with_comma.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'z'}, diff --git a/toolchain/parser/testdata/struct/two_entries.carbon b/toolchain/parser/testdata/struct/two_entries.carbon index 02867b71172e..64dcf863fdf3 100644 --- a/toolchain/parser/testdata/struct/two_entries.carbon +++ b/toolchain/parser/testdata/struct/two_entries.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'x'}, diff --git a/toolchain/parser/testdata/tuple/nested.carbon b/toolchain/parser/testdata/tuple/nested.carbon index 5f55602164d5..15fdbd4e4376 100644 --- a/toolchain/parser/testdata/tuple/nested.carbon +++ b/toolchain/parser/testdata/tuple/nested.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'y'}, diff --git a/toolchain/parser/testdata/tuple/two_entries.carbon b/toolchain/parser/testdata/tuple/two_entries.carbon index 7c3fdbd77973..aef4367b7e3f 100644 --- a/toolchain/parser/testdata/tuple/two_entries.carbon +++ b/toolchain/parser/testdata/tuple/two_entries.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'x'}, diff --git a/toolchain/parser/testdata/var/fail_bad_name.carbon b/toolchain/parser/testdata/var/fail_bad_name.carbon index f1b59db3f57e..b19112dbc9f4 100644 --- a/toolchain/parser/testdata/var/fail_bad_name.carbon +++ b/toolchain/parser/testdata/var/fail_bad_name.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: '*', has_error: yes}, @@ -13,5 +12,5 @@ // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] -// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/var/fail_bad_name.carbon:[[@LINE+1]]:5: Expected pattern in `var` declaration. +// CHECK:STDERR: toolchain/parser/testdata/var/fail_bad_name.carbon:[[@LINE+1]]:5: Expected pattern in `var` declaration. var *; diff --git a/toolchain/parser/testdata/var/fail_empty.carbon b/toolchain/parser/testdata/var/fail_empty.carbon index 6183c4407d8a..b33018175cba 100644 --- a/toolchain/parser/testdata/var/fail_empty.carbon +++ b/toolchain/parser/testdata/var/fail_empty.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: ';', has_error: yes}, @@ -13,5 +12,5 @@ // CHECK:STDOUT: {kind: 'FileEnd', text: ''}, // CHECK:STDOUT: ] -// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/var/fail_empty.carbon:[[@LINE+1]]:4: Expected pattern in `var` declaration. +// CHECK:STDERR: toolchain/parser/testdata/var/fail_empty.carbon:[[@LINE+1]]:4: Expected pattern in `var` declaration. var; diff --git a/toolchain/parser/testdata/var/var.carbon b/toolchain/parser/testdata/var/var.carbon index 0460570cd10b..a2624811ef52 100644 --- a/toolchain/parser/testdata/var/var.carbon +++ b/toolchain/parser/testdata/var/var.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'v'}, diff --git a/toolchain/parser/testdata/while/basic.carbon b/toolchain/parser/testdata/while/basic.carbon index bb0fa469106f..9466e569aa31 100644 --- a/toolchain/parser/testdata/while/basic.carbon +++ b/toolchain/parser/testdata/while/basic.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'F'}, diff --git a/toolchain/parser/testdata/while/fail_no_semi.carbon b/toolchain/parser/testdata/while/fail_no_semi.carbon index ea3fae0eaed5..db9c4c4f9f24 100644 --- a/toolchain/parser/testdata/while/fail_no_semi.carbon +++ b/toolchain/parser/testdata/while/fail_no_semi.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'F'}, @@ -40,11 +39,11 @@ fn F() { while (a) { if (b) { break - // CHECK:STDERR: {{.*}}/toolchain/parser/testdata/while/fail_no_semi.carbon:[[@LINE+1]]:5: Expected `;` after `break`. + // CHECK:STDERR: toolchain/parser/testdata/while/fail_no_semi.carbon:[[@LINE+1]]:5: Expected `;` after `break`. } if (c) { continue - // CHECK:STDERR: {{.*}}/toolchain/parser/testdata/while/fail_no_semi.carbon:[[@LINE+1]]:5: Expected `;` after `continue`. + // CHECK:STDERR: toolchain/parser/testdata/while/fail_no_semi.carbon:[[@LINE+1]]:5: Expected `;` after `continue`. } } } diff --git a/toolchain/parser/testdata/while/fail_unbraced.carbon b/toolchain/parser/testdata/while/fail_unbraced.carbon index 14f88f1f007e..3bf046117212 100644 --- a/toolchain/parser/testdata/while/fail_unbraced.carbon +++ b/toolchain/parser/testdata/while/fail_unbraced.carbon @@ -4,7 +4,6 @@ // // TODO: This should have an error. // AUTOUPDATE -// RUN: %{not} %{carbon-run-parser} // CHECK:STDOUT: [ // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, // CHECK:STDOUT: {kind: 'DeclaredName', text: 'F'}, @@ -25,6 +24,6 @@ fn F() { while (a) - // CHECK:STDERR: {{.*}}/toolchain/parser/testdata/while/fail_unbraced.carbon:[[@LINE+1]]:5: Expected braced code block. + // CHECK:STDERR: toolchain/parser/testdata/while/fail_unbraced.carbon:[[@LINE+1]]:5: Expected braced code block. break; } diff --git a/toolchain/semantics/BUILD b/toolchain/semantics/BUILD index 9e8761eadf34..34be5123f637 100644 --- a/toolchain/semantics/BUILD +++ b/toolchain/semantics/BUILD @@ -2,6 +2,9 @@ # Exceptions. See /LICENSE for license information. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +load("//bazel/sh_run:rules.bzl", "glob_sh_run") +load("//testing/file_test:rules.bzl", "file_test") + package(default_visibility = ["//visibility:public"]) cc_library( @@ -105,3 +108,37 @@ cc_test( "@llvm-project//llvm:Support", ], ) + +file_test( + name = "semantics_file_test", + srcs = ["semantics_file_test.cpp"], + tests = glob(["testdata/**/*.carbon"]), + deps = [ + "//testing/file_test:file_test_base", + "//toolchain/driver", + "@com_google_googletest//:gtest", + "@llvm-project//llvm:Support", + ], +) + +glob_sh_run( + args = [ + "$(location //toolchain/driver:carbon)", + "dump", + "semantics-ir", + ], + data = ["//toolchain/driver:carbon"], + file_exts = ["carbon"], +) + +glob_sh_run( + args = [ + "$(location //toolchain/driver:carbon)", + "-v", + "dump", + "semantics-ir", + ], + data = ["//toolchain/driver:carbon"], + file_exts = ["carbon"], + run_ext = "verbose", +) diff --git a/toolchain/semantics/lit_autoupdate.py b/toolchain/semantics/lit_autoupdate.py index 733a7445f280..94c714c7b793 100755 --- a/toolchain/semantics/lit_autoupdate.py +++ b/toolchain/semantics/lit_autoupdate.py @@ -26,7 +26,6 @@ def main() -> None: "--tool=carbon", "--autoupdate_arg=dump", "--autoupdate_arg=semantics-ir", - "--lit_run=%{carbon-run-semantics}", "--testdata=toolchain/semantics/testdata", ] + sys.argv[1:] os.execv(actual_py, args) diff --git a/toolchain/semantics/semantics_file_test.cpp b/toolchain/semantics/semantics_file_test.cpp new file mode 100644 index 000000000000..fc8ba251ae6e --- /dev/null +++ b/toolchain/semantics/semantics_file_test.cpp @@ -0,0 +1,37 @@ +// Part of the Carbon Language project, under the Apache License v2.0 with LLVM +// Exceptions. See /LICENSE for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +#include +#include + +#include + +#include "llvm/ADT/StringRef.h" +#include "llvm/Support/raw_ostream.h" +#include "testing/file_test/file_test_base.h" +#include "toolchain/driver/driver.h" + +namespace Carbon::Testing { +namespace { + +class SemanticsFileTest : public FileTestBase { + public: + explicit SemanticsFileTest(llvm::StringRef path) : FileTestBase(path) {} + + auto RunOverFile(llvm::raw_ostream& stdout, llvm::raw_ostream& stderr) + -> bool override { + Driver driver(stdout, stderr); + return driver.RunFullCommand({"dump", "semantics-ir", path()}); + } +}; + +} // namespace + +auto RegisterFileTests(const std::vector& paths) -> void { + SemanticsFileTest::RegisterTests( + "SemanticsFileTest", paths, + [](llvm::StringRef path) { return new SemanticsFileTest(path); }); +} + +} // namespace Carbon::Testing diff --git a/toolchain/semantics/testdata/BUILD b/toolchain/semantics/testdata/BUILD deleted file mode 100644 index 5d49323b2b25..000000000000 --- a/toolchain/semantics/testdata/BUILD +++ /dev/null @@ -1,39 +0,0 @@ -# Part of the Carbon Language project, under the Apache License v2.0 with LLVM -# Exceptions. See /LICENSE for license information. -# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - -load("//bazel/sh_run:rules.bzl", "glob_sh_run") -load("//bazel/testing:lit.bzl", "glob_lit_tests") - -glob_lit_tests( - data = [ - "//bazel/testing:merge_output", - "//toolchain/driver:carbon", - "@llvm-project//llvm:FileCheck", - "@llvm-project//llvm:not", - ], - driver = "lit.cfg.py", - test_file_exts = ["carbon"], -) - -glob_sh_run( - args = [ - "$(location //toolchain/driver:carbon)", - "dump", - "semantics-ir", - ], - data = ["//toolchain/driver:carbon"], - file_exts = ["carbon"], -) - -glob_sh_run( - args = [ - "$(location //toolchain/driver:carbon)", - "-v", - "dump", - "semantics-ir", - ], - data = ["//toolchain/driver:carbon"], - file_exts = ["carbon"], - run_ext = "verbose", -) diff --git a/toolchain/semantics/testdata/basics/builtin_types.carbon b/toolchain/semantics/testdata/basics/builtin_types.carbon index c776fe797dc5..a0de520f23a5 100644 --- a/toolchain/semantics/testdata/basics/builtin_types.carbon +++ b/toolchain/semantics/testdata/basics/builtin_types.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-semantics} // CHECK:STDOUT: cross_reference_irs_size: 1 // CHECK:STDOUT: calls: [ // CHECK:STDOUT: ] diff --git a/toolchain/semantics/testdata/basics/empty.carbon b/toolchain/semantics/testdata/basics/empty.carbon index f4f3d951dbdf..b5c84733c633 100644 --- a/toolchain/semantics/testdata/basics/empty.carbon +++ b/toolchain/semantics/testdata/basics/empty.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-semantics} // CHECK:STDOUT: cross_reference_irs_size: 1 // CHECK:STDOUT: calls: [ // CHECK:STDOUT: ] diff --git a/toolchain/semantics/testdata/basics/empty_decl.carbon b/toolchain/semantics/testdata/basics/empty_decl.carbon index 6083b169b8d2..aa8e2ea544ea 100644 --- a/toolchain/semantics/testdata/basics/empty_decl.carbon +++ b/toolchain/semantics/testdata/basics/empty_decl.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-semantics} // CHECK:STDOUT: cross_reference_irs_size: 1 // CHECK:STDOUT: calls: [ // CHECK:STDOUT: ] diff --git a/toolchain/semantics/testdata/basics/fail_name_lookup.carbon b/toolchain/semantics/testdata/basics/fail_name_lookup.carbon index eb274e706fa0..ba0bee0e4eff 100644 --- a/toolchain/semantics/testdata/basics/fail_name_lookup.carbon +++ b/toolchain/semantics/testdata/basics/fail_name_lookup.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-semantics} // CHECK:STDOUT: cross_reference_irs_size: 1 // CHECK:STDOUT: calls: [ // CHECK:STDOUT: ] @@ -31,6 +30,6 @@ // CHECK:STDOUT: ] fn Main() { - // CHECK:STDERR: {{.*}}/toolchain/semantics/testdata/basics/fail_name_lookup.carbon:[[@LINE+1]]:3: Name x not found + // CHECK:STDERR: toolchain/semantics/testdata/basics/fail_name_lookup.carbon:[[@LINE+1]]:3: Name x not found x; } diff --git a/toolchain/semantics/testdata/designators/fail_unsupported.carbon b/toolchain/semantics/testdata/designators/fail_unsupported.carbon index aebc7fa910c1..d7160ec24e85 100644 --- a/toolchain/semantics/testdata/designators/fail_unsupported.carbon +++ b/toolchain/semantics/testdata/designators/fail_unsupported.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-semantics} // CHECK:STDOUT: cross_reference_irs_size: 1 // CHECK:STDOUT: calls: [ // CHECK:STDOUT: ] @@ -38,5 +37,5 @@ // CHECK:STDOUT: ] var x: i32; -// CHECK:STDERR: {{.*}}/toolchain/semantics/testdata/designators/fail_unsupported.carbon:[[@LINE+1]]:15: Type `i32` does not support designator expressions. +// CHECK:STDERR: toolchain/semantics/testdata/designators/fail_unsupported.carbon:[[@LINE+1]]:15: Type `i32` does not support designator expressions. var y: i32 = x.b; diff --git a/toolchain/semantics/testdata/function/call/empty_struct.carbon b/toolchain/semantics/testdata/function/call/empty_struct.carbon index 089c292a4f01..e41bd9219f7d 100644 --- a/toolchain/semantics/testdata/function/call/empty_struct.carbon +++ b/toolchain/semantics/testdata/function/call/empty_struct.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-semantics} // CHECK:STDOUT: cross_reference_irs_size: 1 // CHECK:STDOUT: calls: [ // CHECK:STDOUT: {arg_ir: block4, arg_refs: block5}, diff --git a/toolchain/semantics/testdata/function/call/fail_param_count.carbon b/toolchain/semantics/testdata/function/call/fail_param_count.carbon index a3ed8bcbb963..1d3cd6ed9c3f 100644 --- a/toolchain/semantics/testdata/function/call/fail_param_count.carbon +++ b/toolchain/semantics/testdata/function/call/fail_param_count.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-semantics} // CHECK:STDOUT: cross_reference_irs_size: 1 // CHECK:STDOUT: calls: [ // CHECK:STDOUT: ] @@ -130,24 +129,24 @@ fn Run1(a: i32) {} fn Run2(a: i32, b: i32) {} fn Main() { - // CHECK:STDERR: {{.*}}/toolchain/semantics/testdata/function/call/fail_param_count.carbon:[[@LINE+2]]:7: No matching callable was found. - // CHECK:STDERR: {{.*}}/toolchain/semantics/testdata/function/call/fail_param_count.carbon:[[@LINE-6]]:1: Callable cannot be used: Received 1 argument(s), but require 0 argument(s). + // CHECK:STDERR: toolchain/semantics/testdata/function/call/fail_param_count.carbon:[[@LINE+2]]:7: No matching callable was found. + // CHECK:STDERR: toolchain/semantics/testdata/function/call/fail_param_count.carbon:[[@LINE-6]]:1: Callable cannot be used: Received 1 argument(s), but require 0 argument(s). Run0(1); - // CHECK:STDERR: {{.*}}/toolchain/semantics/testdata/function/call/fail_param_count.carbon:[[@LINE+2]]:7: No matching callable was found. - // CHECK:STDERR: {{.*}}/toolchain/semantics/testdata/function/call/fail_param_count.carbon:[[@LINE-9]]:1: Callable cannot be used: Received 2 argument(s), but require 0 argument(s). + // CHECK:STDERR: toolchain/semantics/testdata/function/call/fail_param_count.carbon:[[@LINE+2]]:7: No matching callable was found. + // CHECK:STDERR: toolchain/semantics/testdata/function/call/fail_param_count.carbon:[[@LINE-9]]:1: Callable cannot be used: Received 2 argument(s), but require 0 argument(s). Run0(0, 1); - // CHECK:STDERR: {{.*}}/toolchain/semantics/testdata/function/call/fail_param_count.carbon:[[@LINE+2]]:7: No matching callable was found. - // CHECK:STDERR: {{.*}}/toolchain/semantics/testdata/function/call/fail_param_count.carbon:[[@LINE-12]]:1: Callable cannot be used: Received 0 argument(s), but require 1 argument(s). + // CHECK:STDERR: toolchain/semantics/testdata/function/call/fail_param_count.carbon:[[@LINE+2]]:7: No matching callable was found. + // CHECK:STDERR: toolchain/semantics/testdata/function/call/fail_param_count.carbon:[[@LINE-12]]:1: Callable cannot be used: Received 0 argument(s), but require 1 argument(s). Run1(); - // CHECK:STDERR: {{.*}}/toolchain/semantics/testdata/function/call/fail_param_count.carbon:[[@LINE+2]]:7: No matching callable was found. - // CHECK:STDERR: {{.*}}/toolchain/semantics/testdata/function/call/fail_param_count.carbon:[[@LINE-15]]:1: Callable cannot be used: Received 2 argument(s), but require 1 argument(s). + // CHECK:STDERR: toolchain/semantics/testdata/function/call/fail_param_count.carbon:[[@LINE+2]]:7: No matching callable was found. + // CHECK:STDERR: toolchain/semantics/testdata/function/call/fail_param_count.carbon:[[@LINE-15]]:1: Callable cannot be used: Received 2 argument(s), but require 1 argument(s). Run1(0, 1); - // CHECK:STDERR: {{.*}}/toolchain/semantics/testdata/function/call/fail_param_count.carbon:[[@LINE+2]]:7: No matching callable was found. - // CHECK:STDERR: {{.*}}/toolchain/semantics/testdata/function/call/fail_param_count.carbon:[[@LINE-18]]:1: Callable cannot be used: Received 0 argument(s), but require 2 argument(s). + // CHECK:STDERR: toolchain/semantics/testdata/function/call/fail_param_count.carbon:[[@LINE+2]]:7: No matching callable was found. + // CHECK:STDERR: toolchain/semantics/testdata/function/call/fail_param_count.carbon:[[@LINE-18]]:1: Callable cannot be used: Received 0 argument(s), but require 2 argument(s). Run2(); - // CHECK:STDERR: {{.*}}/toolchain/semantics/testdata/function/call/fail_param_count.carbon:[[@LINE+2]]:7: No matching callable was found. - // CHECK:STDERR: {{.*}}/toolchain/semantics/testdata/function/call/fail_param_count.carbon:[[@LINE-21]]:1: Callable cannot be used: Received 1 argument(s), but require 2 argument(s). + // CHECK:STDERR: toolchain/semantics/testdata/function/call/fail_param_count.carbon:[[@LINE+2]]:7: No matching callable was found. + // CHECK:STDERR: toolchain/semantics/testdata/function/call/fail_param_count.carbon:[[@LINE-21]]:1: Callable cannot be used: Received 1 argument(s), but require 2 argument(s). Run2(0); } diff --git a/toolchain/semantics/testdata/function/call/fail_param_type.carbon b/toolchain/semantics/testdata/function/call/fail_param_type.carbon index 18a5f4260bc6..5bd11eb25f20 100644 --- a/toolchain/semantics/testdata/function/call/fail_param_type.carbon +++ b/toolchain/semantics/testdata/function/call/fail_param_type.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-semantics} // CHECK:STDOUT: cross_reference_irs_size: 1 // CHECK:STDOUT: calls: [ // CHECK:STDOUT: ] @@ -59,7 +58,7 @@ fn Run(a: i32) {} fn Main() { - // CHECK:STDERR: {{.*}}/toolchain/semantics/testdata/function/call/fail_param_type.carbon:[[@LINE+2]]:6: No matching callable was found. - // CHECK:STDERR: {{.*}}/toolchain/semantics/testdata/function/call/fail_param_type.carbon:[[@LINE-4]]:1: Callable cannot be used: Cannot implicityly convert argument 0 from `f64` to `i32`. + // CHECK:STDERR: toolchain/semantics/testdata/function/call/fail_param_type.carbon:[[@LINE+2]]:6: No matching callable was found. + // CHECK:STDERR: toolchain/semantics/testdata/function/call/fail_param_type.carbon:[[@LINE-4]]:1: Callable cannot be used: Cannot implicityly convert argument 0 from `f64` to `i32`. Run(1.0); } diff --git a/toolchain/semantics/testdata/function/call/fail_return_type_mismatch.carbon b/toolchain/semantics/testdata/function/call/fail_return_type_mismatch.carbon index 886576cbf677..2b540d2c8026 100644 --- a/toolchain/semantics/testdata/function/call/fail_return_type_mismatch.carbon +++ b/toolchain/semantics/testdata/function/call/fail_return_type_mismatch.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-semantics} // CHECK:STDOUT: cross_reference_irs_size: 1 // CHECK:STDOUT: calls: [ // CHECK:STDOUT: {arg_ir: block0, arg_refs: block0}, @@ -58,6 +57,6 @@ fn Foo() -> f64 { return 1.0; } fn Run() { - // CHECK:STDERR: {{.*}}/toolchain/semantics/testdata/function/call/fail_return_type_mismatch.carbon:[[@LINE+1]]:21: Cannot implicitly convert from `f64` to `i32`. + // CHECK:STDERR: toolchain/semantics/testdata/function/call/fail_return_type_mismatch.carbon:[[@LINE+1]]:21: Cannot implicitly convert from `f64` to `i32`. var x: i32 = Foo(); } diff --git a/toolchain/semantics/testdata/function/call/i32.carbon b/toolchain/semantics/testdata/function/call/i32.carbon index 86e2a2cb318c..3b34c8164f37 100644 --- a/toolchain/semantics/testdata/function/call/i32.carbon +++ b/toolchain/semantics/testdata/function/call/i32.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-semantics} // CHECK:STDOUT: cross_reference_irs_size: 1 // CHECK:STDOUT: calls: [ // CHECK:STDOUT: {arg_ir: block6, arg_refs: block7}, diff --git a/toolchain/semantics/testdata/function/call/more_param_ir.carbon b/toolchain/semantics/testdata/function/call/more_param_ir.carbon index 415df0671de2..f871a07b352a 100644 --- a/toolchain/semantics/testdata/function/call/more_param_ir.carbon +++ b/toolchain/semantics/testdata/function/call/more_param_ir.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-semantics} // CHECK:STDOUT: cross_reference_irs_size: 1 // CHECK:STDOUT: calls: [ // CHECK:STDOUT: {arg_ir: block4, arg_refs: block5}, diff --git a/toolchain/semantics/testdata/function/call/params_one.carbon b/toolchain/semantics/testdata/function/call/params_one.carbon index 95f58315e90b..51f27f0b7e86 100644 --- a/toolchain/semantics/testdata/function/call/params_one.carbon +++ b/toolchain/semantics/testdata/function/call/params_one.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-semantics} // CHECK:STDOUT: cross_reference_irs_size: 1 // CHECK:STDOUT: calls: [ // CHECK:STDOUT: {arg_ir: block4, arg_refs: block5}, diff --git a/toolchain/semantics/testdata/function/call/params_one_comma.carbon b/toolchain/semantics/testdata/function/call/params_one_comma.carbon index 76cb014fa87a..28b63c387448 100644 --- a/toolchain/semantics/testdata/function/call/params_one_comma.carbon +++ b/toolchain/semantics/testdata/function/call/params_one_comma.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-semantics} // CHECK:STDOUT: cross_reference_irs_size: 1 // CHECK:STDOUT: calls: [ // CHECK:STDOUT: {arg_ir: block4, arg_refs: block5}, diff --git a/toolchain/semantics/testdata/function/call/params_two.carbon b/toolchain/semantics/testdata/function/call/params_two.carbon index a99f0b8b1796..5b437930a77a 100644 --- a/toolchain/semantics/testdata/function/call/params_two.carbon +++ b/toolchain/semantics/testdata/function/call/params_two.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-semantics} // CHECK:STDOUT: cross_reference_irs_size: 1 // CHECK:STDOUT: calls: [ // CHECK:STDOUT: {arg_ir: block4, arg_refs: block5}, diff --git a/toolchain/semantics/testdata/function/call/params_two_comma.carbon b/toolchain/semantics/testdata/function/call/params_two_comma.carbon index 0a1447c4ba4f..02935c7188a9 100644 --- a/toolchain/semantics/testdata/function/call/params_two_comma.carbon +++ b/toolchain/semantics/testdata/function/call/params_two_comma.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-semantics} // CHECK:STDOUT: cross_reference_irs_size: 1 // CHECK:STDOUT: calls: [ // CHECK:STDOUT: {arg_ir: block4, arg_refs: block5}, diff --git a/toolchain/semantics/testdata/function/call/params_zero.carbon b/toolchain/semantics/testdata/function/call/params_zero.carbon index aabccb5d8e62..072743c05a62 100644 --- a/toolchain/semantics/testdata/function/call/params_zero.carbon +++ b/toolchain/semantics/testdata/function/call/params_zero.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-semantics} // CHECK:STDOUT: cross_reference_irs_size: 1 // CHECK:STDOUT: calls: [ // CHECK:STDOUT: {arg_ir: block0, arg_refs: block0}, diff --git a/toolchain/semantics/testdata/function/definition/fail_param_name_conflict.carbon b/toolchain/semantics/testdata/function/definition/fail_param_name_conflict.carbon index 0d2c4572e50b..5c127c0c85ce 100644 --- a/toolchain/semantics/testdata/function/definition/fail_param_name_conflict.carbon +++ b/toolchain/semantics/testdata/function/definition/fail_param_name_conflict.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-semantics} // CHECK:STDOUT: cross_reference_irs_size: 1 // CHECK:STDOUT: calls: [ // CHECK:STDOUT: ] @@ -45,6 +44,6 @@ // CHECK:STDOUT: ], // CHECK:STDOUT: ] -// CHECK:STDERR: {{.*}}/toolchain/semantics/testdata/function/definition/fail_param_name_conflict.carbon:[[@LINE+2]]:16: Redefining a in the same scope. -// CHECK:STDERR: {{.*}}/toolchain/semantics/testdata/function/definition/fail_param_name_conflict.carbon:[[@LINE+1]]:8: Previous definition is here. +// CHECK:STDERR: toolchain/semantics/testdata/function/definition/fail_param_name_conflict.carbon:[[@LINE+2]]:16: Redefining a in the same scope. +// CHECK:STDERR: toolchain/semantics/testdata/function/definition/fail_param_name_conflict.carbon:[[@LINE+1]]:8: Previous definition is here. fn Bar(a: i32, a: i32) {} diff --git a/toolchain/semantics/testdata/function/definition/order.carbon b/toolchain/semantics/testdata/function/definition/order.carbon index 40e84ef35b6b..33c07ed39c66 100644 --- a/toolchain/semantics/testdata/function/definition/order.carbon +++ b/toolchain/semantics/testdata/function/definition/order.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-semantics} // CHECK:STDOUT: cross_reference_irs_size: 1 // CHECK:STDOUT: calls: [ // CHECK:STDOUT: ] diff --git a/toolchain/semantics/testdata/function/definition/params_one.carbon b/toolchain/semantics/testdata/function/definition/params_one.carbon index 85fa950d6dd4..227ac2c9feec 100644 --- a/toolchain/semantics/testdata/function/definition/params_one.carbon +++ b/toolchain/semantics/testdata/function/definition/params_one.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-semantics} // CHECK:STDOUT: cross_reference_irs_size: 1 // CHECK:STDOUT: calls: [ // CHECK:STDOUT: ] diff --git a/toolchain/semantics/testdata/function/definition/params_one_comma.carbon b/toolchain/semantics/testdata/function/definition/params_one_comma.carbon index 69cb8d98c819..c9862f4c9362 100644 --- a/toolchain/semantics/testdata/function/definition/params_one_comma.carbon +++ b/toolchain/semantics/testdata/function/definition/params_one_comma.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-semantics} // CHECK:STDOUT: cross_reference_irs_size: 1 // CHECK:STDOUT: calls: [ // CHECK:STDOUT: ] diff --git a/toolchain/semantics/testdata/function/definition/params_two.carbon b/toolchain/semantics/testdata/function/definition/params_two.carbon index 3ba5754c7803..babb726b2a07 100644 --- a/toolchain/semantics/testdata/function/definition/params_two.carbon +++ b/toolchain/semantics/testdata/function/definition/params_two.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-semantics} // CHECK:STDOUT: cross_reference_irs_size: 1 // CHECK:STDOUT: calls: [ // CHECK:STDOUT: ] diff --git a/toolchain/semantics/testdata/function/definition/params_two_comma.carbon b/toolchain/semantics/testdata/function/definition/params_two_comma.carbon index 3d955513f377..0cd2d9b6b547 100644 --- a/toolchain/semantics/testdata/function/definition/params_two_comma.carbon +++ b/toolchain/semantics/testdata/function/definition/params_two_comma.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-semantics} // CHECK:STDOUT: cross_reference_irs_size: 1 // CHECK:STDOUT: calls: [ // CHECK:STDOUT: ] diff --git a/toolchain/semantics/testdata/function/definition/params_zero.carbon b/toolchain/semantics/testdata/function/definition/params_zero.carbon index 5e410d7ec49b..f9d6279fc7e9 100644 --- a/toolchain/semantics/testdata/function/definition/params_zero.carbon +++ b/toolchain/semantics/testdata/function/definition/params_zero.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-semantics} // CHECK:STDOUT: cross_reference_irs_size: 1 // CHECK:STDOUT: calls: [ // CHECK:STDOUT: ] diff --git a/toolchain/semantics/testdata/function/definition/same_param_name.carbon b/toolchain/semantics/testdata/function/definition/same_param_name.carbon index 5fa87ce323a0..a83ddb17ece4 100644 --- a/toolchain/semantics/testdata/function/definition/same_param_name.carbon +++ b/toolchain/semantics/testdata/function/definition/same_param_name.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-semantics} // CHECK:STDOUT: cross_reference_irs_size: 1 // CHECK:STDOUT: calls: [ // CHECK:STDOUT: ] diff --git a/toolchain/semantics/testdata/lit.cfg.py b/toolchain/semantics/testdata/lit.cfg.py deleted file mode 120000 index c323f8a5e8da..000000000000 --- a/toolchain/semantics/testdata/lit.cfg.py +++ /dev/null @@ -1 +0,0 @@ -../../../bazel/testing/lit.cfg.py \ No newline at end of file diff --git a/toolchain/semantics/testdata/operators/binary_op.carbon b/toolchain/semantics/testdata/operators/binary_op.carbon index 47d33e6c229a..c9831eedbb3b 100644 --- a/toolchain/semantics/testdata/operators/binary_op.carbon +++ b/toolchain/semantics/testdata/operators/binary_op.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-semantics} // CHECK:STDOUT: cross_reference_irs_size: 1 // CHECK:STDOUT: calls: [ // CHECK:STDOUT: ] diff --git a/toolchain/semantics/testdata/operators/fail_type_mismatch.carbon b/toolchain/semantics/testdata/operators/fail_type_mismatch.carbon index e13ffd5db76a..b375acea7d21 100644 --- a/toolchain/semantics/testdata/operators/fail_type_mismatch.carbon +++ b/toolchain/semantics/testdata/operators/fail_type_mismatch.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-semantics} // CHECK:STDOUT: cross_reference_irs_size: 1 // CHECK:STDOUT: calls: [ // CHECK:STDOUT: ] @@ -43,6 +42,6 @@ // CHECK:STDOUT: ] fn Main() -> i32 { - // CHECK:STDERR: {{.*}}/toolchain/semantics/testdata/operators/fail_type_mismatch.carbon:[[@LINE+1]]:13: Cannot implicitly convert from `i32` to `f64`. + // CHECK:STDERR: toolchain/semantics/testdata/operators/fail_type_mismatch.carbon:[[@LINE+1]]:13: Cannot implicitly convert from `i32` to `f64`. return 12 + 3.4; } diff --git a/toolchain/semantics/testdata/operators/fail_type_mismatch_once.carbon b/toolchain/semantics/testdata/operators/fail_type_mismatch_once.carbon index 314d14bbee11..c77b6209dd26 100644 --- a/toolchain/semantics/testdata/operators/fail_type_mismatch_once.carbon +++ b/toolchain/semantics/testdata/operators/fail_type_mismatch_once.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-semantics} // CHECK:STDOUT: cross_reference_irs_size: 1 // CHECK:STDOUT: calls: [ // CHECK:STDOUT: ] @@ -50,6 +49,6 @@ fn Main() -> i32 { // The following line has two mismatches, but after the first, it shouldn't // keep erroring. - // CHECK:STDERR: {{.*}}/toolchain/semantics/testdata/operators/fail_type_mismatch_once.carbon:[[@LINE+1]]:13: Cannot implicitly convert from `i32` to `f64`. + // CHECK:STDERR: toolchain/semantics/testdata/operators/fail_type_mismatch_once.carbon:[[@LINE+1]]:13: Cannot implicitly convert from `i32` to `f64`. return 12 + 3.4 + 12; } diff --git a/toolchain/semantics/testdata/return/fail_type_mismatch.carbon b/toolchain/semantics/testdata/return/fail_type_mismatch.carbon index e82ab651045e..65c8e949ab06 100644 --- a/toolchain/semantics/testdata/return/fail_type_mismatch.carbon +++ b/toolchain/semantics/testdata/return/fail_type_mismatch.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-semantics} // CHECK:STDOUT: cross_reference_irs_size: 1 // CHECK:STDOUT: calls: [ // CHECK:STDOUT: ] @@ -38,6 +37,6 @@ // CHECK:STDOUT: ] fn Main() -> i32 { - // CHECK:STDERR: {{.*}}/toolchain/semantics/testdata/return/fail_type_mismatch.carbon:[[@LINE+1]]:13: Cannot implicitly convert from `f64` to `i32`. + // CHECK:STDERR: toolchain/semantics/testdata/return/fail_type_mismatch.carbon:[[@LINE+1]]:13: Cannot implicitly convert from `f64` to `i32`. return 1.0; } diff --git a/toolchain/semantics/testdata/return/fail_value_disallowed.carbon b/toolchain/semantics/testdata/return/fail_value_disallowed.carbon index 0d2730826545..8fa4b6157e5a 100644 --- a/toolchain/semantics/testdata/return/fail_value_disallowed.carbon +++ b/toolchain/semantics/testdata/return/fail_value_disallowed.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-semantics} // CHECK:STDOUT: cross_reference_irs_size: 1 // CHECK:STDOUT: calls: [ // CHECK:STDOUT: ] @@ -38,7 +37,7 @@ // CHECK:STDOUT: ] fn Main() { - // CHECK:STDERR: {{.*}}/toolchain/semantics/testdata/return/fail_value_disallowed.carbon:[[@LINE+2]]:11: No return expression should be provided in this context. - // CHECK:STDERR: {{.*}}/toolchain/semantics/testdata/return/fail_value_disallowed.carbon:[[@LINE-2]]:1: There was no return type provided. + // CHECK:STDERR: toolchain/semantics/testdata/return/fail_value_disallowed.carbon:[[@LINE+2]]:11: No return expression should be provided in this context. + // CHECK:STDERR: toolchain/semantics/testdata/return/fail_value_disallowed.carbon:[[@LINE-2]]:1: There was no return type provided. return 0; } diff --git a/toolchain/semantics/testdata/return/fail_value_missing.carbon b/toolchain/semantics/testdata/return/fail_value_missing.carbon index b671d56ab67c..d3c20ef56275 100644 --- a/toolchain/semantics/testdata/return/fail_value_missing.carbon +++ b/toolchain/semantics/testdata/return/fail_value_missing.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-semantics} // CHECK:STDOUT: cross_reference_irs_size: 1 // CHECK:STDOUT: calls: [ // CHECK:STDOUT: ] @@ -35,6 +34,6 @@ // CHECK:STDOUT: ] fn Main() -> i32 { - // CHECK:STDERR: {{.*}}/toolchain/semantics/testdata/return/fail_value_missing.carbon:[[@LINE+1]]:9: Must return a i32. + // CHECK:STDERR: toolchain/semantics/testdata/return/fail_value_missing.carbon:[[@LINE+1]]:9: Must return a i32. return; } diff --git a/toolchain/semantics/testdata/return/no_value.carbon b/toolchain/semantics/testdata/return/no_value.carbon index e3ec3b16f8e8..042c37b6531c 100644 --- a/toolchain/semantics/testdata/return/no_value.carbon +++ b/toolchain/semantics/testdata/return/no_value.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-semantics} // CHECK:STDOUT: cross_reference_irs_size: 1 // CHECK:STDOUT: calls: [ // CHECK:STDOUT: ] diff --git a/toolchain/semantics/testdata/return/struct.carbon b/toolchain/semantics/testdata/return/struct.carbon index b2e8f11d0305..c0f6bcf00c44 100644 --- a/toolchain/semantics/testdata/return/struct.carbon +++ b/toolchain/semantics/testdata/return/struct.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-semantics} // CHECK:STDOUT: cross_reference_irs_size: 1 // CHECK:STDOUT: calls: [ // CHECK:STDOUT: ] diff --git a/toolchain/semantics/testdata/return/value.carbon b/toolchain/semantics/testdata/return/value.carbon index 848e6534c9be..f07fce59bd93 100644 --- a/toolchain/semantics/testdata/return/value.carbon +++ b/toolchain/semantics/testdata/return/value.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-semantics} // CHECK:STDOUT: cross_reference_irs_size: 1 // CHECK:STDOUT: calls: [ // CHECK:STDOUT: ] diff --git a/toolchain/semantics/testdata/struct/empty.carbon b/toolchain/semantics/testdata/struct/empty.carbon index 765efd01ae91..0ba80fee761a 100644 --- a/toolchain/semantics/testdata/struct/empty.carbon +++ b/toolchain/semantics/testdata/struct/empty.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-semantics} // CHECK:STDOUT: cross_reference_irs_size: 1 // CHECK:STDOUT: calls: [ // CHECK:STDOUT: ] diff --git a/toolchain/semantics/testdata/struct/fail_assign_empty.carbon b/toolchain/semantics/testdata/struct/fail_assign_empty.carbon index cb8405cab90d..d2caf1459875 100644 --- a/toolchain/semantics/testdata/struct/fail_assign_empty.carbon +++ b/toolchain/semantics/testdata/struct/fail_assign_empty.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-semantics} // CHECK:STDOUT: cross_reference_irs_size: 1 // CHECK:STDOUT: calls: [ // CHECK:STDOUT: ] @@ -41,5 +40,5 @@ // CHECK:STDOUT: ], // CHECK:STDOUT: ] -// CHECK:STDERR: {{.*}}/toolchain/semantics/testdata/struct/fail_assign_empty.carbon:[[@LINE+1]]:22: Cannot implicitly convert from `{} as Type` to `{.a: i32}`. +// CHECK:STDERR: toolchain/semantics/testdata/struct/fail_assign_empty.carbon:[[@LINE+1]]:22: Cannot implicitly convert from `{} as Type` to `{.a: i32}`. var x: {.a: i32} = {}; diff --git a/toolchain/semantics/testdata/struct/fail_assign_to_empty.carbon b/toolchain/semantics/testdata/struct/fail_assign_to_empty.carbon index c40af0b19e53..6a88a2bdbf3a 100644 --- a/toolchain/semantics/testdata/struct/fail_assign_to_empty.carbon +++ b/toolchain/semantics/testdata/struct/fail_assign_to_empty.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-semantics} // CHECK:STDOUT: cross_reference_irs_size: 1 // CHECK:STDOUT: calls: [ // CHECK:STDOUT: ] @@ -50,5 +49,5 @@ // CHECK:STDOUT: ], // CHECK:STDOUT: ] -// CHECK:STDERR: {{.*}}/toolchain/semantics/testdata/struct/fail_assign_to_empty.carbon:[[@LINE+1]]:21: Cannot implicitly convert from `{.a: i32}` to `{} as Type`. +// CHECK:STDERR: toolchain/semantics/testdata/struct/fail_assign_to_empty.carbon:[[@LINE+1]]:21: Cannot implicitly convert from `{.a: i32}` to `{} as Type`. var x: {} = {.a = 1}; diff --git a/toolchain/semantics/testdata/struct/fail_field_name_mismatch.carbon b/toolchain/semantics/testdata/struct/fail_field_name_mismatch.carbon index 9cb10d8c057c..a84080b558d3 100644 --- a/toolchain/semantics/testdata/struct/fail_field_name_mismatch.carbon +++ b/toolchain/semantics/testdata/struct/fail_field_name_mismatch.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-semantics} // CHECK:STDOUT: cross_reference_irs_size: 1 // CHECK:STDOUT: calls: [ // CHECK:STDOUT: ] @@ -60,5 +59,5 @@ // CHECK:STDOUT: ], // CHECK:STDOUT: ] -// CHECK:STDERR: {{.*}}/toolchain/semantics/testdata/struct/fail_field_name_mismatch.carbon:[[@LINE+1]]:28: Cannot implicitly convert from `{.b: i32}` to `{.a: i32}`. +// CHECK:STDERR: toolchain/semantics/testdata/struct/fail_field_name_mismatch.carbon:[[@LINE+1]]:28: Cannot implicitly convert from `{.b: i32}` to `{.a: i32}`. var x: {.a: i32} = {.b = 1}; diff --git a/toolchain/semantics/testdata/struct/fail_field_type_mismatch.carbon b/toolchain/semantics/testdata/struct/fail_field_type_mismatch.carbon index f2b0e38168de..8142e48a4920 100644 --- a/toolchain/semantics/testdata/struct/fail_field_type_mismatch.carbon +++ b/toolchain/semantics/testdata/struct/fail_field_type_mismatch.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-semantics} // CHECK:STDOUT: cross_reference_irs_size: 1 // CHECK:STDOUT: calls: [ // CHECK:STDOUT: ] @@ -60,5 +59,5 @@ // CHECK:STDOUT: ], // CHECK:STDOUT: ] -// CHECK:STDERR: {{.*}}/toolchain/semantics/testdata/struct/fail_field_type_mismatch.carbon:[[@LINE+1]]:30: Cannot implicitly convert from `{.b: f64}` to `{.a: i32}`. +// CHECK:STDERR: toolchain/semantics/testdata/struct/fail_field_type_mismatch.carbon:[[@LINE+1]]:30: Cannot implicitly convert from `{.b: f64}` to `{.a: i32}`. var x: {.a: i32} = {.b = 1.0}; diff --git a/toolchain/semantics/testdata/struct/fail_member_access_type.carbon b/toolchain/semantics/testdata/struct/fail_member_access_type.carbon index 73d15c3ca9bf..ef4f9b98db83 100644 --- a/toolchain/semantics/testdata/struct/fail_member_access_type.carbon +++ b/toolchain/semantics/testdata/struct/fail_member_access_type.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-semantics} // CHECK:STDOUT: cross_reference_irs_size: 1 // CHECK:STDOUT: calls: [ // CHECK:STDOUT: ] @@ -68,5 +67,5 @@ // CHECK:STDOUT: ] var x: {.a: f64} = {.a = 4.0}; -// CHECK:STDERR: {{.*}}/toolchain/semantics/testdata/struct/fail_member_access_type.carbon:[[@LINE+1]]:15: Type `{.a: f64}` does not have a member `b`. +// CHECK:STDERR: toolchain/semantics/testdata/struct/fail_member_access_type.carbon:[[@LINE+1]]:15: Type `{.a: f64}` does not have a member `b`. var y: i32 = x.b; diff --git a/toolchain/semantics/testdata/struct/fail_non_member_access.carbon b/toolchain/semantics/testdata/struct/fail_non_member_access.carbon index 3c24a00b8915..1d18c8728068 100644 --- a/toolchain/semantics/testdata/struct/fail_non_member_access.carbon +++ b/toolchain/semantics/testdata/struct/fail_non_member_access.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-semantics} // CHECK:STDOUT: cross_reference_irs_size: 1 // CHECK:STDOUT: calls: [ // CHECK:STDOUT: ] @@ -68,5 +67,5 @@ // CHECK:STDOUT: ] var x: {.a: i32} = {.a = 4}; -// CHECK:STDERR: {{.*}}/toolchain/semantics/testdata/struct/fail_non_member_access.carbon:[[@LINE+1]]:15: Type `{.a: i32}` does not have a member `b`. +// CHECK:STDERR: toolchain/semantics/testdata/struct/fail_non_member_access.carbon:[[@LINE+1]]:15: Type `{.a: i32}` does not have a member `b`. var y: i32 = x.b; diff --git a/toolchain/semantics/testdata/struct/fail_too_few_values.carbon b/toolchain/semantics/testdata/struct/fail_too_few_values.carbon index ebfffb7f5c69..83ce18c72b32 100644 --- a/toolchain/semantics/testdata/struct/fail_too_few_values.carbon +++ b/toolchain/semantics/testdata/struct/fail_too_few_values.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-semantics} // CHECK:STDOUT: cross_reference_irs_size: 1 // CHECK:STDOUT: calls: [ // CHECK:STDOUT: ] @@ -63,5 +62,5 @@ // CHECK:STDOUT: ], // CHECK:STDOUT: ] -// CHECK:STDERR: {{.*}}/toolchain/semantics/testdata/struct/fail_too_few_values.carbon:[[@LINE+1]]:37: Cannot implicitly convert from `{.a: i32}` to `{.a: i32, .b: i32}`. +// CHECK:STDERR: toolchain/semantics/testdata/struct/fail_too_few_values.carbon:[[@LINE+1]]:37: Cannot implicitly convert from `{.a: i32}` to `{.a: i32, .b: i32}`. var x: {.a: i32, .b: i32} = {.a = 1}; diff --git a/toolchain/semantics/testdata/struct/fail_type_assign.carbon b/toolchain/semantics/testdata/struct/fail_type_assign.carbon index 8bfe0d064b6f..15e54bc359ce 100644 --- a/toolchain/semantics/testdata/struct/fail_type_assign.carbon +++ b/toolchain/semantics/testdata/struct/fail_type_assign.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-semantics} // CHECK:STDOUT: cross_reference_irs_size: 1 // CHECK:STDOUT: calls: [ // CHECK:STDOUT: ] @@ -50,5 +49,5 @@ // CHECK:STDOUT: ], // CHECK:STDOUT: ] -// CHECK:STDERR: {{.*}}/toolchain/semantics/testdata/struct/fail_type_assign.carbon:[[@LINE+1]]:29: Cannot implicitly convert from `Type` to `{.a: i32}`. +// CHECK:STDERR: toolchain/semantics/testdata/struct/fail_type_assign.carbon:[[@LINE+1]]:29: Cannot implicitly convert from `Type` to `{.a: i32}`. var x: {.a: i32} = {.a: i32}; diff --git a/toolchain/semantics/testdata/struct/fail_value_as_type.carbon b/toolchain/semantics/testdata/struct/fail_value_as_type.carbon index 39e917ef2878..1e7ee601fec6 100644 --- a/toolchain/semantics/testdata/struct/fail_value_as_type.carbon +++ b/toolchain/semantics/testdata/struct/fail_value_as_type.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-semantics} // CHECK:STDOUT: cross_reference_irs_size: 1 // CHECK:STDOUT: calls: [ // CHECK:STDOUT: ] @@ -48,5 +47,5 @@ // CHECK:STDOUT: ], // CHECK:STDOUT: ] -// CHECK:STDERR: {{.*}}/toolchain/semantics/testdata/struct/fail_value_as_type.carbon:[[@LINE+1]]:15: Cannot implicitly convert from `{.a: i32}` to `Type`. +// CHECK:STDERR: toolchain/semantics/testdata/struct/fail_value_as_type.carbon:[[@LINE+1]]:15: Cannot implicitly convert from `{.a: i32}` to `Type`. var x: {.a = 1}; diff --git a/toolchain/semantics/testdata/struct/member_access.carbon b/toolchain/semantics/testdata/struct/member_access.carbon index 19f8f238994b..fed78e252262 100644 --- a/toolchain/semantics/testdata/struct/member_access.carbon +++ b/toolchain/semantics/testdata/struct/member_access.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-semantics} // CHECK:STDOUT: cross_reference_irs_size: 1 // CHECK:STDOUT: calls: [ // CHECK:STDOUT: ] diff --git a/toolchain/semantics/testdata/struct/one_entry.carbon b/toolchain/semantics/testdata/struct/one_entry.carbon index e48f76eccb47..3156d99d6471 100644 --- a/toolchain/semantics/testdata/struct/one_entry.carbon +++ b/toolchain/semantics/testdata/struct/one_entry.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-semantics} // CHECK:STDOUT: cross_reference_irs_size: 1 // CHECK:STDOUT: calls: [ // CHECK:STDOUT: ] diff --git a/toolchain/semantics/testdata/struct/two_entries.carbon b/toolchain/semantics/testdata/struct/two_entries.carbon index 20e4fdb0df09..06ae45bb219a 100644 --- a/toolchain/semantics/testdata/struct/two_entries.carbon +++ b/toolchain/semantics/testdata/struct/two_entries.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-semantics} // CHECK:STDOUT: cross_reference_irs_size: 1 // CHECK:STDOUT: calls: [ // CHECK:STDOUT: ] diff --git a/toolchain/semantics/testdata/var/decl.carbon b/toolchain/semantics/testdata/var/decl.carbon index feecfabc78aa..d6fb83534b1e 100644 --- a/toolchain/semantics/testdata/var/decl.carbon +++ b/toolchain/semantics/testdata/var/decl.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-semantics} // CHECK:STDOUT: cross_reference_irs_size: 1 // CHECK:STDOUT: calls: [ // CHECK:STDOUT: ] diff --git a/toolchain/semantics/testdata/var/decl_with_init.carbon b/toolchain/semantics/testdata/var/decl_with_init.carbon index b76d7ca5c24a..e00d1cad804c 100644 --- a/toolchain/semantics/testdata/var/decl_with_init.carbon +++ b/toolchain/semantics/testdata/var/decl_with_init.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-semantics} // CHECK:STDOUT: cross_reference_irs_size: 1 // CHECK:STDOUT: calls: [ // CHECK:STDOUT: ] diff --git a/toolchain/semantics/testdata/var/fail_duplicate_decl.carbon b/toolchain/semantics/testdata/var/fail_duplicate_decl.carbon index 3fb5bad9d75e..4de435507dcc 100644 --- a/toolchain/semantics/testdata/var/fail_duplicate_decl.carbon +++ b/toolchain/semantics/testdata/var/fail_duplicate_decl.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-semantics} // CHECK:STDOUT: cross_reference_irs_size: 1 // CHECK:STDOUT: calls: [ // CHECK:STDOUT: ] @@ -54,7 +53,7 @@ fn Main() { var x: i32 = 0; - // CHECK:STDERR: {{.*}}/toolchain/semantics/testdata/var/fail_duplicate_decl.carbon:[[@LINE+2]]:7: Redefining x in the same scope. - // CHECK:STDERR: {{.*}}/toolchain/semantics/testdata/var/fail_duplicate_decl.carbon:[[@LINE-2]]:7: Previous definition is here. + // CHECK:STDERR: toolchain/semantics/testdata/var/fail_duplicate_decl.carbon:[[@LINE+2]]:7: Redefining x in the same scope. + // CHECK:STDERR: toolchain/semantics/testdata/var/fail_duplicate_decl.carbon:[[@LINE-2]]:7: Previous definition is here. var x: i32 = 0; } diff --git a/toolchain/semantics/testdata/var/fail_init_type_mismatch.carbon b/toolchain/semantics/testdata/var/fail_init_type_mismatch.carbon index a076142a327b..32c730ea88bd 100644 --- a/toolchain/semantics/testdata/var/fail_init_type_mismatch.carbon +++ b/toolchain/semantics/testdata/var/fail_init_type_mismatch.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-semantics} // CHECK:STDOUT: cross_reference_irs_size: 1 // CHECK:STDOUT: calls: [ // CHECK:STDOUT: ] @@ -43,6 +42,6 @@ // CHECK:STDOUT: ] fn Main() { - // CHECK:STDERR: {{.*}}/toolchain/semantics/testdata/var/fail_init_type_mismatch.carbon:[[@LINE+1]]:19: Cannot implicitly convert from `f64` to `i32`. + // CHECK:STDERR: toolchain/semantics/testdata/var/fail_init_type_mismatch.carbon:[[@LINE+1]]:19: Cannot implicitly convert from `f64` to `i32`. var x: i32 = 1.0; } diff --git a/toolchain/semantics/testdata/var/fail_init_with_self.carbon b/toolchain/semantics/testdata/var/fail_init_with_self.carbon index 0961dce53618..1a1c17fd9888 100644 --- a/toolchain/semantics/testdata/var/fail_init_with_self.carbon +++ b/toolchain/semantics/testdata/var/fail_init_with_self.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-semantics} // CHECK:STDOUT: cross_reference_irs_size: 1 // CHECK:STDOUT: calls: [ // CHECK:STDOUT: ] @@ -40,6 +39,6 @@ // CHECK:STDOUT: ] fn Main() { - // CHECK:STDERR: {{.*}}/toolchain/semantics/testdata/var/fail_init_with_self.carbon:[[@LINE+1]]:16: Name x not found + // CHECK:STDERR: toolchain/semantics/testdata/var/fail_init_with_self.carbon:[[@LINE+1]]:16: Name x not found var x: i32 = x; } diff --git a/toolchain/semantics/testdata/var/fail_lookup_outside_scope.carbon b/toolchain/semantics/testdata/var/fail_lookup_outside_scope.carbon index 842728ff7000..1b2768ec9ec6 100644 --- a/toolchain/semantics/testdata/var/fail_lookup_outside_scope.carbon +++ b/toolchain/semantics/testdata/var/fail_lookup_outside_scope.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-semantics} // CHECK:STDOUT: cross_reference_irs_size: 1 // CHECK:STDOUT: calls: [ // CHECK:STDOUT: ] @@ -48,5 +47,5 @@ fn Main() { var x: i32; } -// CHECK:STDERR: {{.*}}/toolchain/semantics/testdata/var/fail_lookup_outside_scope.carbon:[[@LINE+1]]:14: Name x not found +// CHECK:STDERR: toolchain/semantics/testdata/var/fail_lookup_outside_scope.carbon:[[@LINE+1]]:14: Name x not found var y: i32 = x; diff --git a/toolchain/semantics/testdata/var/fail_storage_is_literal.carbon b/toolchain/semantics/testdata/var/fail_storage_is_literal.carbon index 3511c9c8c7c6..5f8d808dfad4 100644 --- a/toolchain/semantics/testdata/var/fail_storage_is_literal.carbon +++ b/toolchain/semantics/testdata/var/fail_storage_is_literal.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{not} %{carbon-run-semantics} // CHECK:STDOUT: cross_reference_irs_size: 1 // CHECK:STDOUT: calls: [ // CHECK:STDOUT: ] @@ -46,6 +45,6 @@ // CHECK:STDOUT: ] fn Main() { - // CHECK:STDERR: {{.*}}/toolchain/semantics/testdata/var/fail_storage_is_literal.carbon:[[@LINE+1]]:10: Cannot implicitly convert from `i32` to `Type`. + // CHECK:STDERR: toolchain/semantics/testdata/var/fail_storage_is_literal.carbon:[[@LINE+1]]:10: Cannot implicitly convert from `i32` to `Type`. var x: 1 = 1; } diff --git a/toolchain/semantics/testdata/var/global_decl.carbon b/toolchain/semantics/testdata/var/global_decl.carbon index a1fe3ea46a48..7e9a115d4f1b 100644 --- a/toolchain/semantics/testdata/var/global_decl.carbon +++ b/toolchain/semantics/testdata/var/global_decl.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-semantics} // CHECK:STDOUT: cross_reference_irs_size: 1 // CHECK:STDOUT: calls: [ // CHECK:STDOUT: ] diff --git a/toolchain/semantics/testdata/var/global_decl_with_init.carbon b/toolchain/semantics/testdata/var/global_decl_with_init.carbon index 9c701da38275..2e823efb0727 100644 --- a/toolchain/semantics/testdata/var/global_decl_with_init.carbon +++ b/toolchain/semantics/testdata/var/global_decl_with_init.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-semantics} // CHECK:STDOUT: cross_reference_irs_size: 1 // CHECK:STDOUT: calls: [ // CHECK:STDOUT: ] diff --git a/toolchain/semantics/testdata/var/global_lookup.carbon b/toolchain/semantics/testdata/var/global_lookup.carbon index b1ba45fe5e9f..baffba6baf10 100644 --- a/toolchain/semantics/testdata/var/global_lookup.carbon +++ b/toolchain/semantics/testdata/var/global_lookup.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-semantics} // CHECK:STDOUT: cross_reference_irs_size: 1 // CHECK:STDOUT: calls: [ // CHECK:STDOUT: ] diff --git a/toolchain/semantics/testdata/var/global_lookup_in_scope.carbon b/toolchain/semantics/testdata/var/global_lookup_in_scope.carbon index 22074aa6f05a..f7a1625e50a1 100644 --- a/toolchain/semantics/testdata/var/global_lookup_in_scope.carbon +++ b/toolchain/semantics/testdata/var/global_lookup_in_scope.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-semantics} // CHECK:STDOUT: cross_reference_irs_size: 1 // CHECK:STDOUT: calls: [ // CHECK:STDOUT: ] diff --git a/toolchain/semantics/testdata/var/lookup.carbon b/toolchain/semantics/testdata/var/lookup.carbon index a5fa9e2ea1f7..d76b6413f9e4 100644 --- a/toolchain/semantics/testdata/var/lookup.carbon +++ b/toolchain/semantics/testdata/var/lookup.carbon @@ -3,7 +3,6 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // AUTOUPDATE -// RUN: %{carbon-run-semantics} // CHECK:STDOUT: cross_reference_irs_size: 1 // CHECK:STDOUT: calls: [ // CHECK:STDOUT: ]