fail_errors_in_two_files.carbon 1.1 KB

12345678910111213141516171819202122232425262728
  1. // Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  2. // Exceptions. See /LICENSE for license information.
  3. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. //
  5. // ARGS: compile --phase=lex %s
  6. //
  7. // AUTOUPDATE
  8. // TIP: To test this file alone, run:
  9. // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/driver/testdata/fail_errors_in_two_files.carbon
  10. // TIP: To dump output, run:
  11. // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/driver/testdata/fail_errors_in_two_files.carbon
  12. // --- fail_file1.carbon
  13. // CHECK:STDERR: fail_file1.carbon:[[@LINE+4]]:24: error: opening symbol without a corresponding closing symbol
  14. // CHECK:STDERR: fn run(String program) {
  15. // CHECK:STDERR: ^
  16. // CHECK:STDERR:
  17. fn run(String program) {
  18. return True;
  19. // --- fail_file2.carbon
  20. // CHECK:STDERR: fail_file2.carbon:[[@LINE+4]]:10: error: invalid digit 'a' in decimal numeric literal
  21. // CHECK:STDERR: var x = 3a;
  22. // CHECK:STDERR: ^
  23. // CHECK:STDERR:
  24. var x = 3a;