mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-04 17:13:16 +01:00
Automate the addition of RUN and simplify RUN lines (#2292)
This was an offshoot of the discussion about how much boilerplate we could remove. lit requires RUN lines be there, everything else is optional.
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
// Exceptions. See /LICENSE for license information.
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
//
|
||||
// RUN: %{carbon} dump parse-tree %s | %{FileCheck-strict} %s
|
||||
// AUTOUPDATE: %{carbon} dump parse-tree %s
|
||||
// AUTOUPDATE
|
||||
// RUN: %{carbon-run-parser}
|
||||
// CHECK:STDOUT: [
|
||||
// CHECK:STDOUT: {node_index: 5, kind: 'FunctionDeclaration', text: 'fn', subtree_size: 6, children: [
|
||||
// CHECK:STDOUT: {node_index: 0, kind: 'DeclaredName', text: 'F'},
|
||||
|
||||
+3
-3
@@ -2,8 +2,8 @@
|
||||
// Exceptions. See /LICENSE for license information.
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
//
|
||||
// RUN: %{not} %{carbon} dump parse-tree %s | %{FileCheck-strict} %s
|
||||
// AUTOUPDATE: %{carbon} dump parse-tree %s
|
||||
// AUTOUPDATE
|
||||
// RUN: %{not} %{carbon-run-parser}
|
||||
// CHECK:STDOUT: [
|
||||
// CHECK:STDOUT: {node_index: 6, kind: 'FunctionDeclaration', text: 'fn', subtree_size: 7, children: [
|
||||
// CHECK:STDOUT: {node_index: 0, kind: 'DeclaredName', text: 'F'},
|
||||
@@ -19,5 +19,5 @@ fn F() {
|
||||
// Note: this might become valid depending on the expression syntax. This test
|
||||
// shouldn't be taken as a sign it should remain invalid.
|
||||
bar
|
||||
// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/function/definition/identifier_in_statements.carbon:[[@LINE+1]]:1: Expected `;` after expression.
|
||||
// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/function/definition/fail_identifier_in_statements.carbon:[[@LINE+1]]:1: Expected `;` after expression.
|
||||
}
|
||||
@@ -2,8 +2,8 @@
|
||||
// Exceptions. See /LICENSE for license information.
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
//
|
||||
// RUN: %{carbon} dump parse-tree %s | %{FileCheck-strict} %s
|
||||
// AUTOUPDATE: %{carbon} dump parse-tree %s
|
||||
// AUTOUPDATE
|
||||
// RUN: %{carbon-run-parser}
|
||||
// CHECK:STDOUT: [
|
||||
// CHECK:STDOUT: {node_index: 21, kind: 'FunctionDeclaration', text: 'fn', subtree_size: 22, children: [
|
||||
// CHECK:STDOUT: {node_index: 0, kind: 'DeclaredName', text: 'foo'},
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
// Exceptions. See /LICENSE for license information.
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
//
|
||||
// RUN: %{carbon} dump parse-tree %s | %{FileCheck-strict} %s
|
||||
// AUTOUPDATE: %{carbon} dump parse-tree %s
|
||||
// AUTOUPDATE
|
||||
// RUN: %{carbon-run-parser}
|
||||
// CHECK:STDOUT: [
|
||||
// CHECK:STDOUT: {node_index: 10, kind: 'FunctionDeclaration', text: 'fn', subtree_size: 11, children: [
|
||||
// CHECK:STDOUT: {node_index: 0, kind: 'DeclaredName', text: 'foo'},
|
||||
|
||||
Reference in New Issue
Block a user