From b87d04bf9b4aaee7689bb38f75f227097694b514 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Wed, 4 May 2022 12:39:12 -0700 Subject: [PATCH] Remove executable_semantics files that were accidentally re-created (#1227) Remove files accidentally duplicated in e85f45de10a6e0053d8827848c151f276c2b4d6a between explorer/ and executable_semantics/. Each removed file already has a corresponding file in explorer/. --- .../auto_return/fail_no_return.carbon | 19 ----------------- .../function/fail_non_exhaustive_match.carbon | 18 ---------------- .../testdata/import/fail_order.carbon | 18 ---------------- .../name_lookup/fail_block_duplicate.carbon | 18 ---------------- .../name_lookup/fail_class_duplicate.carbon | 21 ------------------- .../name_lookup/fail_global_duplicate.carbon | 19 ----------------- .../name_lookup/fail_match_duplicate.carbon | 20 ------------------ .../fail_explicit_with_no_return.carbon | 20 ------------------ .../fail_implicit_with_explicit_return.carbon | 21 ------------------- 9 files changed, 174 deletions(-) delete mode 100644 executable_semantics/testdata/function/auto_return/fail_no_return.carbon delete mode 100644 executable_semantics/testdata/function/fail_non_exhaustive_match.carbon delete mode 100644 executable_semantics/testdata/import/fail_order.carbon delete mode 100644 executable_semantics/testdata/name_lookup/fail_block_duplicate.carbon delete mode 100644 executable_semantics/testdata/name_lookup/fail_class_duplicate.carbon delete mode 100644 executable_semantics/testdata/name_lookup/fail_global_duplicate.carbon delete mode 100644 executable_semantics/testdata/name_lookup/fail_match_duplicate.carbon delete mode 100644 executable_semantics/testdata/return/fail_explicit_with_no_return.carbon delete mode 100644 executable_semantics/testdata/return/fail_implicit_with_explicit_return.carbon diff --git a/executable_semantics/testdata/function/auto_return/fail_no_return.carbon b/executable_semantics/testdata/function/auto_return/fail_no_return.carbon deleted file mode 100644 index 6842b3c26c5d..000000000000 --- a/executable_semantics/testdata/function/auto_return/fail_no_return.carbon +++ /dev/null @@ -1,19 +0,0 @@ -// 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} %{executable_semantics} %s 2>&1 | \ -// RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{not} %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ -// RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s -// AUTOUPDATE: %{executable_semantics} %s - -package ExecutableSemanticsTest api; - -fn NoReturn() -> auto { -// CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/function/auto_return/fail_no_return.carbon:[[@LINE+1]]: control-flow reaches end of function that provides a `->` return type without reaching a return statement -} - -fn Main() { - NoReturn(); -} diff --git a/executable_semantics/testdata/function/fail_non_exhaustive_match.carbon b/executable_semantics/testdata/function/fail_non_exhaustive_match.carbon deleted file mode 100644 index 8f5df732f63d..000000000000 --- a/executable_semantics/testdata/function/fail_non_exhaustive_match.carbon +++ /dev/null @@ -1,18 +0,0 @@ -// 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} %{executable_semantics} %s 2>&1 | \ -// RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{not} %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ -// RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s -// AUTOUPDATE: %{executable_semantics} %s - -package ExecutableSemanticsTest api; - -fn Main() -> i32 { - match (0) { - case 1 => return 0; - } -// CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/function/fail_non_exhaustive_match.carbon:[[@LINE+1]]: non-exhaustive match may allow control-flow to reach the end of a function that provides a `->` return type -} diff --git a/executable_semantics/testdata/import/fail_order.carbon b/executable_semantics/testdata/import/fail_order.carbon deleted file mode 100644 index 5bbb13c143b0..000000000000 --- a/executable_semantics/testdata/import/fail_order.carbon +++ /dev/null @@ -1,18 +0,0 @@ -// 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} %{executable_semantics} %s 2>&1 | \ -// RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{not} %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ -// RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s -// AUTOUPDATE: %{executable_semantics} %s - -package ExecutableSemanticsTest api; - -fn Main() -> i32 { - return 0; -} - -// CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/import/fail_order.carbon:[[@LINE+1]]: syntax error, unexpected IMPORT, expecting END_OF_FILE -import ExecutableSemanticsTest library "Nonexistent"; diff --git a/executable_semantics/testdata/name_lookup/fail_block_duplicate.carbon b/executable_semantics/testdata/name_lookup/fail_block_duplicate.carbon deleted file mode 100644 index 01fbaf6e801c..000000000000 --- a/executable_semantics/testdata/name_lookup/fail_block_duplicate.carbon +++ /dev/null @@ -1,18 +0,0 @@ -// 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} %{executable_semantics} %s 2>&1 | \ -// RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{not} %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ -// RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s -// AUTOUPDATE: %{executable_semantics} %s - -package ExecutableSemanticsTest api; - -fn Main() -> i32 { - var x: i32 = 0; - // CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/name_lookup/fail_block_duplicate.carbon:[[@LINE+1]]: Duplicate name `x` also found at {{.*}}/executable_semantics/testdata/name_lookup/fail_block_duplicate.carbon:14 - var x: i32 = 0; - return 0; -} diff --git a/executable_semantics/testdata/name_lookup/fail_class_duplicate.carbon b/executable_semantics/testdata/name_lookup/fail_class_duplicate.carbon deleted file mode 100644 index 97907e8fb6c7..000000000000 --- a/executable_semantics/testdata/name_lookup/fail_class_duplicate.carbon +++ /dev/null @@ -1,21 +0,0 @@ -// 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} %{executable_semantics} %s 2>&1 | \ -// RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{not} %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ -// RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s -// AUTOUPDATE: %{executable_semantics} %s - -package ExecutableSemanticsTest api; - -class Foo { - var x: i32; - // CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/name_lookup/fail_class_duplicate.carbon:[[@LINE+1]]: Duplicate name `x` also found at {{.*}}/executable_semantics/testdata/name_lookup/fail_class_duplicate.carbon:14 - var x: i32; -} - -fn Main() -> i32 { - return 0; -} diff --git a/executable_semantics/testdata/name_lookup/fail_global_duplicate.carbon b/executable_semantics/testdata/name_lookup/fail_global_duplicate.carbon deleted file mode 100644 index d54cb1bb39c0..000000000000 --- a/executable_semantics/testdata/name_lookup/fail_global_duplicate.carbon +++ /dev/null @@ -1,19 +0,0 @@ -// 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} %{executable_semantics} %s 2>&1 | \ -// RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{not} %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ -// RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s -// AUTOUPDATE: %{executable_semantics} %s - -package ExecutableSemanticsTest api; - -var x: i32 = 0; -// CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/name_lookup/fail_global_duplicate.carbon:[[@LINE+1]]: Duplicate name `x` also found at {{.*}}/executable_semantics/testdata/name_lookup/fail_global_duplicate.carbon:13 -var x: i32 = 0; - -fn Main() -> i32 { - return 0; -} diff --git a/executable_semantics/testdata/name_lookup/fail_match_duplicate.carbon b/executable_semantics/testdata/name_lookup/fail_match_duplicate.carbon deleted file mode 100644 index d6be8b18bcd2..000000000000 --- a/executable_semantics/testdata/name_lookup/fail_match_duplicate.carbon +++ /dev/null @@ -1,20 +0,0 @@ -// 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} %{executable_semantics} %s 2>&1 | \ -// RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{not} %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ -// RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s -// AUTOUPDATE: %{executable_semantics} %s - -package ExecutableSemanticsTest api; - -fn Main() -> i32 { - match (0) { - case x: i32 => - // CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/name_lookup/fail_match_duplicate.carbon:[[@LINE+1]]: Duplicate name `x` also found at {{.*}}/executable_semantics/testdata/name_lookup/fail_match_duplicate.carbon:15 - var x: i32 = 0; - } - return 0; -} diff --git a/executable_semantics/testdata/return/fail_explicit_with_no_return.carbon b/executable_semantics/testdata/return/fail_explicit_with_no_return.carbon deleted file mode 100644 index 3e0347e9095a..000000000000 --- a/executable_semantics/testdata/return/fail_explicit_with_no_return.carbon +++ /dev/null @@ -1,20 +0,0 @@ -// 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} %{executable_semantics} %s 2>&1 | \ -// RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{not} %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ -// RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s -// AUTOUPDATE: %{executable_semantics} %s - -package ExecutableSemanticsTest api; - -fn F() -> () { -// CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/return/fail_explicit_with_no_return.carbon:[[@LINE+1]]: control-flow reaches end of function that provides a `->` return type without reaching a return statement -} - -fn Main() -> i32 { - F(); - return 0; -} diff --git a/executable_semantics/testdata/return/fail_implicit_with_explicit_return.carbon b/executable_semantics/testdata/return/fail_implicit_with_explicit_return.carbon deleted file mode 100644 index a0ad7356d887..000000000000 --- a/executable_semantics/testdata/return/fail_implicit_with_explicit_return.carbon +++ /dev/null @@ -1,21 +0,0 @@ -// 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} %{executable_semantics} %s 2>&1 | \ -// RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s -// RUN: %{not} %{executable_semantics} --parser_debug --trace_file=- %s 2>&1 | \ -// RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s -// AUTOUPDATE: %{executable_semantics} %s - -package ExecutableSemanticsTest api; - -fn F() { - // CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/return/fail_implicit_with_explicit_return.carbon:[[@LINE+1]]: return (); should not provide a return value, to match the function's signature. - return (); -} - -fn Main() -> i32 { - F(); - return 0; -}