mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +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: 25, kind: 'FunctionDeclaration', text: 'fn', subtree_size: 26, 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: 60, kind: 'FunctionDeclaration', text: 'fn', subtree_size: 61, 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: 52, kind: 'FunctionDeclaration', text: 'fn', subtree_size: 53, children: [
|
||||
// CHECK:STDOUT: {node_index: 0, kind: 'DeclaredName', text: 'F'},
|
||||
|
||||
Vendored
+7
-7
@@ -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: 24, kind: 'FunctionDeclaration', text: 'fn', subtree_size: 25, children: [
|
||||
// CHECK:STDOUT: {node_index: 0, kind: 'DeclaredName', text: 'F'},
|
||||
@@ -34,13 +34,13 @@
|
||||
// CHECK:STDOUT: ]
|
||||
|
||||
fn F() {
|
||||
// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/if/errors.carbon:[[@LINE+1]]:6: Expected `(` after `if`.
|
||||
// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/if/fail_errors.carbon:[[@LINE+1]]:6: Expected `(` after `if`.
|
||||
if a {}
|
||||
// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/if/errors.carbon:[[@LINE+1]]:7: Expected expression.
|
||||
// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/if/fail_errors.carbon:[[@LINE+1]]:7: Expected expression.
|
||||
if () {}
|
||||
// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/if/errors.carbon:[[@LINE+1]]:9: Unexpected tokens before `)`.
|
||||
// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/if/fail_errors.carbon:[[@LINE+1]]:9: Unexpected tokens before `)`.
|
||||
if (b c) {}
|
||||
if (d)
|
||||
// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/if/errors.carbon:[[@LINE+2]]:1: Expected braced code block.
|
||||
// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/if/errors.carbon:[[@LINE+1]]:1: Expected expression.
|
||||
// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/if/fail_errors.carbon:[[@LINE+2]]:1: Expected braced code block.
|
||||
// CHECK:STDERR: {{.*}}/toolchain/parser/testdata/if/fail_errors.carbon:[[@LINE+1]]:1: Expected expression.
|
||||
}
|
||||
+2
-2
@@ -3,8 +3,8 @@
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
//
|
||||
// TODO: This should have an error.
|
||||
// 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: 19, kind: 'FunctionDeclaration', text: 'fn', subtree_size: 20, children: [
|
||||
// CHECK:STDOUT: {node_index: 0, kind: 'DeclaredName', text: 'F'},
|
||||
|
||||
Reference in New Issue
Block a user