mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-24 22:02:23 +01:00
This opens the door for replacing all `library ...` lines in toolchain test files with `library "[[@TEST_NAME]]";`. That's technically more typing in a lot of cases, but OTOH means we can just do some copy-paste boilerplate and stop carefully writing library names. Also cleans up the test setup, because it's getting messy. I'm trying to make it easier to see the divisions of tests and the output associated with them. StringSwitch looked like a way to do this, with a few edits to make it work nicely.
14 lines
722 B
Plaintext
14 lines
722 B
Plaintext
// 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
|
|
|
|
// AUTOUPDATE
|
|
// TIP: To test this file alone, run:
|
|
// TIP: bazel test //testing/file_test:file_test_base_test --test_arg=--file_tests=testing/file_test/testdata/replace_content.carbon
|
|
// TIP: To dump output, run:
|
|
// TIP: bazel run //testing/file_test:file_test_base_test -- --dump_output --file_tests=testing/file_test/testdata/replace_content.carbon
|
|
// CHECK:STDOUT: 2 args: `default_args`, `replace_content.carbon`
|
|
|
|
library "[[@TEST_NAME]]";
|
|
// CHECK:STDOUT: replace_content.carbon:[[@LINE-1]]: library "replace_content";
|