mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-24 22:02:23 +01:00
This removes some churn when adding new diagnostic cases to test files (where previous to this change the newly added newline would cause the previous diagnostic CHECKs to be updated including changes to the line number because the CHECK for the blank line meant an extra line between CHECK and source line). A few alternatives discussed here: https://discord.com/channels/655572317891461132/655578254970716160/1329573358475673723 --------- Co-authored-by: Jon Ross-Perkins <jperkins@google.com>
25 lines
1.0 KiB
Plaintext
25 lines
1.0 KiB
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
|
|
//
|
|
// ARGS: compile --phase=lex --stream-errors %s
|
|
//
|
|
// AUTOUPDATE
|
|
// TIP: To test this file alone, run:
|
|
// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/driver/testdata/fail_errors_streamed.carbon
|
|
// TIP: To dump output, run:
|
|
// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/driver/testdata/fail_errors_streamed.carbon
|
|
|
|
fn run(String program) {
|
|
return True;
|
|
|
|
// CHECK:STDERR: fail_errors_streamed.carbon:[[@LINE+8]]:10: error: invalid digit 'a' in decimal numeric literal
|
|
// CHECK:STDERR: var x = 3a;
|
|
// CHECK:STDERR: ^
|
|
// CHECK:STDERR:
|
|
// CHECK:STDERR: fail_errors_streamed.carbon:[[@LINE-7]]:24: error: opening symbol without a corresponding closing symbol
|
|
// CHECK:STDERR: fn run(String program) {
|
|
// CHECK:STDERR: ^
|
|
// CHECK:STDERR:
|
|
var x = 3a;
|