Files
carbon-lang/toolchain/driver/testdata/errors_streamed_test.carbon
T
Jon Ross-Perkins 80570e1a5b Modify the driver to support using for semantics IR testing (#2222)
This unifies `dump-tokens` and `dump-parse-tree` so that we don't keep writing basically the same code repeatedly.

I'll need to modify the output of SemanticsIR::Print more, and may soon unify printing multiple IRs this way (particularly including the builtins SemanticsIR) but this is intended to offer a starting point.

I may eventually try to unify lit.cfg.py files, but I was thinking about whether that works in various contexts we may run in and eventually decided copying the driver/testdata/lit.cfg.py file would be the easiest solution.
2022-09-28 17:40:57 -07:00

16 lines
638 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
//
// RUN: %{not} %{carbon} --print-errors=streamed dump tokens %s 2>&1 | \
// RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s
fn run(String program) {
return True;
var x = 3a;
// CHECK: {{.*}}/errors_streamed_test.carbon:11:10: Invalid digit 'a' in decimal numeric literal.
// CHECK: {{.*}}/errors_streamed_test.carbon:8:24: Closing symbol does not match most recent opening symbol.
// CHECK-COUNT-17: token: {{.*}}