mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 21:11:27 +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
-2
@@ -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: 11, kind: 'FunctionDeclaration', text: 'fn', subtree_size: 12, 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: 11, kind: 'FunctionDeclaration', text: 'fn', subtree_size: 12, children: [
|
||||
// CHECK:STDOUT: {node_index: 0, kind: 'DeclaredName', text: 'F'},
|
||||
@@ -21,6 +21,6 @@
|
||||
// CHECK:STDOUT: ]
|
||||
|
||||
fn F() {
|
||||
// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/operators/missing_precedence_and_or.carbon:[[@LINE+1]]:11: Parentheses are required to disambiguate operator precedence.
|
||||
// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/operators/fail_missing_precedence_and_or.carbon:[[@LINE+1]]:11: Parentheses are required to disambiguate operator precedence.
|
||||
a and b or c;
|
||||
}
|
||||
+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: 11, kind: 'FunctionDeclaration', text: 'fn', subtree_size: 12, children: [
|
||||
// CHECK:STDOUT: {node_index: 0, kind: 'DeclaredName', text: 'F'},
|
||||
@@ -21,6 +21,6 @@
|
||||
// CHECK:STDOUT: ]
|
||||
|
||||
fn F() {
|
||||
// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/operators/missing_precedence_or_and.carbon:[[@LINE+1]]:10: Parentheses are required to disambiguate operator precedence.
|
||||
// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/operators/fail_missing_precedence_or_and.carbon:[[@LINE+1]]:10: Parentheses are required to disambiguate operator precedence.
|
||||
a or b and c;
|
||||
}
|
||||
+6
-6
@@ -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: 26, kind: 'FunctionDeclaration', text: 'fn', subtree_size: 27, children: [
|
||||
// CHECK:STDOUT: {node_index: 0, kind: 'DeclaredName', text: 'F'},
|
||||
@@ -36,9 +36,9 @@
|
||||
// CHECK:STDOUT: ]
|
||||
|
||||
fn F() {
|
||||
// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/operators/variety.carbon:[[@LINE+4]]:29: Parentheses are required to disambiguate operator precedence.
|
||||
// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/operators/variety.carbon:[[@LINE+3]]:34: Parentheses are required to disambiguate operator precedence.
|
||||
// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/operators/variety.carbon:[[@LINE+2]]:38: Parentheses are required to disambiguate operator precedence.
|
||||
// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/operators/variety.carbon:[[@LINE+1]]:40: Parentheses are required to disambiguate operator precedence.
|
||||
// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/operators/fail_variety.carbon:[[@LINE+4]]:29: Parentheses are required to disambiguate operator precedence.
|
||||
// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/operators/fail_variety.carbon:[[@LINE+3]]:34: Parentheses are required to disambiguate operator precedence.
|
||||
// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/operators/fail_variety.carbon:[[@LINE+2]]:38: Parentheses are required to disambiguate operator precedence.
|
||||
// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/operators/fail_variety.carbon:[[@LINE+1]]:40: Parentheses are required to disambiguate operator precedence.
|
||||
n = a * b + c * d = d * d << e & f - not g;
|
||||
}
|
||||
+2
-2
@@ -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: 64, kind: 'FunctionDeclaration', text: 'fn', subtree_size: 65, children: [
|
||||
// CHECK:STDOUT: {node_index: 0, kind: 'DeclaredName', text: 'F'},
|
||||
|
||||
@@ -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: 14, kind: 'FunctionDeclaration', text: 'fn', subtree_size: 15, children: [
|
||||
// CHECK:STDOUT: {node_index: 0, kind: 'DeclaredName', text: 'F'},
|
||||
|
||||
@@ -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: 9, kind: 'FunctionDeclaration', text: 'fn', subtree_size: 10, children: [
|
||||
// CHECK:STDOUT: {node_index: 0, kind: 'DeclaredName', text: 'F'},
|
||||
|
||||
+2
-2
@@ -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: 9, kind: 'FunctionDeclaration', text: 'fn', subtree_size: 10, children: [
|
||||
// CHECK:STDOUT: {node_index: 0, kind: 'DeclaredName', text: 'F'},
|
||||
|
||||
Reference in New Issue
Block a user