Files
carbon-lang/toolchain/check/testdata/main_run/fail_mismatch_params.carbon
T
Jon Ross-Perkins cea9954e28 Update basics tests for ranges, splits, and min_prelude (#5509)
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.
2025-05-23 17:50:02 +00:00

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) {}