mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 14:21:09 +01:00
Updating tests in the style of https://github.com/carbon-language/carbon-lang/pull/5455. - Moving `Run`-specific tests into their own directory, with a README to explain why it's unusual. - Note, I suspect we'll also get more over time (e.g., with arguments) - This makes a little more use of `if-present` just because there are more tests that want to print their full output. - I'm combining the two empty-ish tests, thought I do still want the *really* empty one to be fully empty (i.e., no tokens provided by the file). - Dropping multifile.carbon because it doesn't seem like an interesting test to keep.
18 lines
875 B
Plaintext
18 lines
875 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
|
|
//
|
|
// EXTRA-ARGS: --dump-sem-ir-ranges=only
|
|
//
|
|
// AUTOUPDATE
|
|
// TIP: To test this file alone, run:
|
|
// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/main_run/fail_mismatch_params.carbon
|
|
// TIP: To dump output, run:
|
|
// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/main_run/fail_mismatch_params.carbon
|
|
|
|
// CHECK:STDERR: fail_mismatch_params.carbon:[[@LINE+4]]:1: error: invalid signature for `Main.Run` function; expected `fn ()` or `fn () -> i32` [InvalidMainRunSignature]
|
|
// CHECK:STDERR: fn Run(n: i32) {}
|
|
// CHECK:STDERR: ^~~~~~~~~~~~~~~~
|
|
// CHECK:STDERR:
|
|
fn Run(n: i32) {}
|