Procházet zdrojové kódy

Reorganize tests into dirs and rename numbered tests (#825)

There's a small update to update_checks.py to handle the recursive directories. Also, I'm only using one level of nesting in this PR but really no reason we can't do more. I'm just not sure what clustering is best right now.

As a pattern, I'm trying to name all failing tests `fail_*.carbon`.
Jon Meow před 4 roky
rodič
revize
395a331cde
100 změnil soubory, kde provedl 58 přidání a 77 odebrání
  1. 0 0
      executable_semantics/testdata/assignment_copy/destruct_original.carbon
  2. 0 0
      executable_semantics/testdata/assignment_copy/reassign_original.carbon
  3. 0 0
      executable_semantics/testdata/basic_syntax/choice.carbon
  4. 1 2
      executable_semantics/testdata/basic_syntax/fail_invalid_char.carbon
  5. 1 2
      executable_semantics/testdata/basic_syntax/fail_missing_var.carbon
  6. 0 0
      executable_semantics/testdata/basic_syntax/next.carbon
  7. 0 0
      executable_semantics/testdata/basic_syntax/placeholder_variable.carbon
  8. 0 0
      executable_semantics/testdata/basic_syntax/print.carbon
  9. 0 0
      executable_semantics/testdata/basic_syntax/record.carbon
  10. 0 0
      executable_semantics/testdata/basic_syntax/star.carbon
  11. 0 0
      executable_semantics/testdata/basic_syntax/var_tuple.carbon
  12. 0 0
      executable_semantics/testdata/basic_syntax/zero.carbon
  13. 0 0
      executable_semantics/testdata/block/empty.carbon
  14. 0 0
      executable_semantics/testdata/block/shadowing.carbon
  15. 0 0
      executable_semantics/testdata/class/assign_member.carbon
  16. 1 2
      executable_semantics/testdata/class/fail_field_access_mismatch.carbon
  17. 1 2
      executable_semantics/testdata/class/fail_field_mismatch.carbon
  18. 1 2
      executable_semantics/testdata/class/fail_field_missing.carbon
  19. 0 0
      executable_semantics/testdata/class/temp.carbon
  20. 0 0
      executable_semantics/testdata/class/var.carbon
  21. 0 0
      executable_semantics/testdata/experimental_continuation/await_maintains_scope.carbon
  22. 0 0
      executable_semantics/testdata/experimental_continuation/copy_in_continuation.carbon
  23. 0 0
      executable_semantics/testdata/experimental_continuation/creation_is_noop.carbon
  24. 1 2
      executable_semantics/testdata/experimental_continuation/fail_lifetime.carbon
  25. 0 0
      executable_semantics/testdata/experimental_continuation/recursive.carbon
  26. 0 0
      executable_semantics/testdata/experimental_continuation/run.carbon
  27. 0 0
      executable_semantics/testdata/experimental_continuation/run_with_await.carbon
  28. 0 0
      executable_semantics/testdata/experimental_continuation/shallow_copy.carbon
  29. 0 19
      executable_semantics/testdata/fun_named_params2.carbon
  30. 0 0
      executable_semantics/testdata/function/auto_return_add.carbon
  31. 0 0
      executable_semantics/testdata/function/auto_return_modify_arg_type.carbon
  32. 0 0
      executable_semantics/testdata/function/auto_return_modify_return_type.carbon
  33. 0 0
      executable_semantics/testdata/function/auto_return_type.carbon
  34. 0 0
      executable_semantics/testdata/function/empty_params.carbon
  35. 1 2
      executable_semantics/testdata/function/fail_call_with_tuple.carbon
  36. 20 0
      executable_semantics/testdata/function/fail_named_params_order.carbon
  37. 0 0
      executable_semantics/testdata/function/fnty.carbon
  38. 0 0
      executable_semantics/testdata/function/ignored_parameter.carbon
  39. 0 0
      executable_semantics/testdata/function/multiple_args.carbon
  40. 3 1
      executable_semantics/testdata/function/named_params.carbon
  41. 0 0
      executable_semantics/testdata/function/param_lifetime.carbon
  42. 0 0
      executable_semantics/testdata/function/recursive.carbon
  43. 0 0
      executable_semantics/testdata/function/return.carbon
  44. 0 0
      executable_semantics/testdata/function/type_match.carbon
  45. 0 0
      executable_semantics/testdata/generic_function/apply.carbon
  46. 1 2
      executable_semantics/testdata/generic_function/fail_not_addable.carbon
  47. 1 2
      executable_semantics/testdata/generic_function/fail_type_deduction_mismatch.carbon
  48. 1 2
      executable_semantics/testdata/generic_function/fail_type_deduction_unused.carbon
  49. 0 0
      executable_semantics/testdata/generic_function/non_generic_param.carbon
  50. 0 0
      executable_semantics/testdata/generic_function/return_val.carbon
  51. 0 0
      executable_semantics/testdata/generic_function/swap.carbon
  52. 0 0
      executable_semantics/testdata/generic_function/tuple_map.carbon
  53. 0 0
      executable_semantics/testdata/generic_function/type_matching.carbon
  54. 1 2
      executable_semantics/testdata/global_variable/fail_init_order.carbon
  55. 1 2
      executable_semantics/testdata/global_variable/fail_init_type_mismatch.carbon
  56. 0 0
      executable_semantics/testdata/global_variable/init_and_read.carbon
  57. 0 0
      executable_semantics/testdata/global_variable/init_from_function.carbon
  58. 0 0
      executable_semantics/testdata/global_variable/init_order.carbon
  59. 1 2
      executable_semantics/testdata/global_variable/shadowing.carbon
  60. 0 0
      executable_semantics/testdata/global_variable/write.carbon
  61. 0 0
      executable_semantics/testdata/global_variable/write_from_function.carbon
  62. 0 0
      executable_semantics/testdata/if_else/if_else.carbon
  63. 0 0
      executable_semantics/testdata/if_else/if_else_if.carbon
  64. 0 0
      executable_semantics/testdata/if_else/if_else_if_else.carbon
  65. 0 0
      executable_semantics/testdata/if_else/if_false.carbon
  66. 0 0
      executable_semantics/testdata/if_else/if_nesting.carbon
  67. 0 0
      executable_semantics/testdata/if_else/if_true.carbon
  68. 2 0
      executable_semantics/testdata/import/fail_nonexistent_library.carbon
  69. 2 0
      executable_semantics/testdata/import/fail_nonexistent_package.carbon
  70. 1 2
      executable_semantics/testdata/import/fail_order.carbon
  71. 0 0
      executable_semantics/testdata/match/any_int.carbon
  72. 0 0
      executable_semantics/testdata/match/int.carbon
  73. 0 0
      executable_semantics/testdata/match/int_default.carbon
  74. 0 0
      executable_semantics/testdata/match/no_match.carbon
  75. 0 0
      executable_semantics/testdata/match/placeholder.carbon
  76. 1 2
      executable_semantics/testdata/package/fail_missing.carbon
  77. 0 0
      executable_semantics/testdata/package/with_library.carbon
  78. 0 0
      executable_semantics/testdata/return/explicit_empty.carbon
  79. 1 2
      executable_semantics/testdata/return/fail_auto.carbon
  80. 1 2
      executable_semantics/testdata/return/fail_explicit_with_no_return.carbon
  81. 1 2
      executable_semantics/testdata/return/fail_explicit_with_plain_return.carbon
  82. 1 2
      executable_semantics/testdata/return/fail_implicit_with_explicit_return.carbon
  83. 0 0
      executable_semantics/testdata/return/implicit_with_no_return.carbon
  84. 0 0
      executable_semantics/testdata/return/implicit_with_plain_return.carbon
  85. 0 0
      executable_semantics/testdata/string/basic.carbon
  86. 1 2
      executable_semantics/testdata/string/fail_hex_lower.carbon
  87. 1 2
      executable_semantics/testdata/string/fail_hex_truncated.carbon
  88. 1 2
      executable_semantics/testdata/string/fail_invalid_escape.carbon
  89. 1 2
      executable_semantics/testdata/string/fail_newline.carbon
  90. 1 2
      executable_semantics/testdata/string/fail_octal.carbon
  91. 1 2
      executable_semantics/testdata/string/fail_tab.carbon
  92. 0 0
      executable_semantics/testdata/string/hex.carbon
  93. 0 0
      executable_semantics/testdata/string/newline.carbon
  94. 0 0
      executable_semantics/testdata/tuple/assign.carbon
  95. 0 0
      executable_semantics/testdata/tuple/ending_comma.carbon
  96. 0 0
      executable_semantics/testdata/tuple/equality.carbon
  97. 0 0
      executable_semantics/testdata/tuple/equality_false.carbon
  98. 4 5
      executable_semantics/testdata/tuple/fail_equality_type.carbon
  99. 1 1
      executable_semantics/testdata/tuple/fail_name_order.carbon
  100. 1 1
      executable_semantics/testdata/tuple/fail_positional_order.carbon

+ 0 - 0
executable_semantics/testdata/assignment_copy1.carbon → executable_semantics/testdata/assignment_copy/destruct_original.carbon


+ 0 - 0
executable_semantics/testdata/assignment_copy2.carbon → executable_semantics/testdata/assignment_copy/reassign_original.carbon


+ 0 - 0
executable_semantics/testdata/choice1.carbon → executable_semantics/testdata/basic_syntax/choice.carbon


+ 1 - 2
executable_semantics/testdata/invalid_char.carbon → executable_semantics/testdata/basic_syntax/fail_invalid_char.carbon

@@ -7,7 +7,6 @@
 // RUN: not executable_semantics --trace %s 2>&1 | \
 // RUN:   FileCheck --match-full-lines --allow-unused-prefixes %s
 // AUTOUPDATE: executable_semantics %s
-// CHECK: COMPILATION ERROR: {{.*}}/invalid_char.carbon:13: invalid character '\xEF' in source file.
-
+// CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/basic_syntax/fail_invalid_char.carbon:12: invalid character '\xEF' in source file.
 

+ 1 - 2
executable_semantics/testdata/pattern_variable_fail.carbon → executable_semantics/testdata/basic_syntax/fail_missing_var.carbon

@@ -7,8 +7,7 @@
 // RUN: not executable_semantics --trace %s 2>&1 | \
 // RUN:   FileCheck --match-full-lines --allow-unused-prefixes %s
 // AUTOUPDATE: executable_semantics %s
-// CHECK: COMPILATION ERROR: {{.*}}/pattern_variable_fail.carbon:17: syntax error, unexpected COLON
-
+// CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/basic_syntax/fail_missing_var.carbon:16: syntax error, unexpected COLON
 
 package ExecutableSemanticsTest api;
 

+ 0 - 0
executable_semantics/testdata/next.carbon → executable_semantics/testdata/basic_syntax/next.carbon


+ 0 - 0
executable_semantics/testdata/placeholder_variable.carbon → executable_semantics/testdata/basic_syntax/placeholder_variable.carbon


+ 0 - 0
executable_semantics/testdata/print1.carbon → executable_semantics/testdata/basic_syntax/print.carbon


+ 0 - 0
executable_semantics/testdata/record1.carbon → executable_semantics/testdata/basic_syntax/record.carbon


+ 0 - 0
executable_semantics/testdata/star.carbon → executable_semantics/testdata/basic_syntax/star.carbon


+ 0 - 0
executable_semantics/testdata/pattern_init.carbon → executable_semantics/testdata/basic_syntax/var_tuple.carbon


+ 0 - 0
executable_semantics/testdata/zero.carbon → executable_semantics/testdata/basic_syntax/zero.carbon


+ 0 - 0
executable_semantics/testdata/block2.carbon → executable_semantics/testdata/block/empty.carbon


+ 0 - 0
executable_semantics/testdata/block1.carbon → executable_semantics/testdata/block/shadowing.carbon


+ 0 - 0
executable_semantics/testdata/class2.carbon → executable_semantics/testdata/class/assign_member.carbon


+ 1 - 2
executable_semantics/testdata/class_field_access_mismatch.carbon → executable_semantics/testdata/class/fail_field_access_mismatch.carbon

@@ -7,8 +7,7 @@
 // RUN: not executable_semantics --trace %s 2>&1 | \
 // RUN:   FileCheck --match-full-lines --allow-unused-prefixes %s
 // AUTOUPDATE: executable_semantics %s
-// CHECK: COMPILATION ERROR: {{.*}}/class_field_access_mismatch.carbon:21: class Point does not have a field named z
-
+// CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/class/fail_field_access_mismatch.carbon:20: class Point does not have a field named z
 
 package ExecutableSemanticsTest api;
 

+ 1 - 2
executable_semantics/testdata/class_field_mismatch.carbon → executable_semantics/testdata/class/fail_field_mismatch.carbon

@@ -7,11 +7,10 @@
 // RUN: not executable_semantics --trace %s 2>&1 | \
 // RUN:   FileCheck --match-full-lines --allow-unused-prefixes %s
 // AUTOUPDATE: executable_semantics %s
-// CHECK: COMPILATION ERROR: {{.*}}/class_field_mismatch.carbon:23: type error in call
+// CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/class/fail_field_mismatch.carbon:22: type error in call
 // CHECK: expected: (x = i32, y = i32)
 // CHECK: actual: (x = i32, z = i32)
 
-
 package ExecutableSemanticsTest api;
 
 class Point {

+ 1 - 2
executable_semantics/testdata/class_field_missing.carbon → executable_semantics/testdata/class/fail_field_missing.carbon

@@ -7,11 +7,10 @@
 // RUN: not executable_semantics --trace %s 2>&1 | \
 // RUN:   FileCheck --match-full-lines --allow-unused-prefixes %s
 // AUTOUPDATE: executable_semantics %s
-// CHECK: COMPILATION ERROR: {{.*}}/class_field_missing.carbon:23: type error in call
+// CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/class/fail_field_missing.carbon:22: type error in call
 // CHECK: expected: (x = i32, y = i32)
 // CHECK: actual: (x = i32)
 
-
 package ExecutableSemanticsTest api;
 
 class Point {

+ 0 - 0
executable_semantics/testdata/class3.carbon → executable_semantics/testdata/class/temp.carbon


+ 0 - 0
executable_semantics/testdata/class1.carbon → executable_semantics/testdata/class/var.carbon


+ 0 - 0
executable_semantics/testdata/experimental_continuation5.carbon → executable_semantics/testdata/experimental_continuation/await_maintains_scope.carbon


+ 0 - 0
executable_semantics/testdata/experimental_continuation7.carbon → executable_semantics/testdata/experimental_continuation/copy_in_continuation.carbon


+ 0 - 0
executable_semantics/testdata/experimental_continuation1.carbon → executable_semantics/testdata/experimental_continuation/creation_is_noop.carbon


+ 1 - 2
executable_semantics/testdata/experimental_continuation9.carbon → executable_semantics/testdata/experimental_continuation/fail_lifetime.carbon

@@ -7,8 +7,7 @@
 // RUN: not executable_semantics --trace %s 2>&1 | \
 // RUN:   FileCheck --match-full-lines --allow-unused-prefixes %s
 // AUTOUPDATE: executable_semantics %s
-// CHECK: RUNTIME ERROR: {{.*}}/experimental_continuation9.carbon:22: undefined behavior: access to dead value 1
-
+// CHECK: RUNTIME ERROR: {{.*}}/executable_semantics/testdata/experimental_continuation/fail_lifetime.carbon:21: undefined behavior: access to dead value 1
 
 package ExecutableSemanticsTest api;
 

+ 0 - 0
executable_semantics/testdata/experimental_continuation6.carbon → executable_semantics/testdata/experimental_continuation/recursive.carbon


+ 0 - 0
executable_semantics/testdata/experimental_continuation2.carbon → executable_semantics/testdata/experimental_continuation/run.carbon


+ 0 - 0
executable_semantics/testdata/experimental_continuation3.carbon → executable_semantics/testdata/experimental_continuation/run_with_await.carbon


+ 0 - 0
executable_semantics/testdata/experimental_continuation4.carbon → executable_semantics/testdata/experimental_continuation/shallow_copy.carbon


+ 0 - 19
executable_semantics/testdata/fun_named_params2.carbon

@@ -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 --trace %s 2>&1 | \
-// RUN:   FileCheck --match-full-lines --allow-unused-prefixes %s
-// AUTOUPDATE: executable_semantics %s
-// CHECK: PROGRAM ERROR: {{.*}}/fun_named_params2.carbon:15: positional members must come before named members
-
-
-package ExecutableSemanticsTest api;
-
-fn f(x: i32, .d = y: i32, z: i32, .e = a: i32) => (x + y) - (z + a);
-
-fn main() -> i32 {
-  return 0;
-}

+ 0 - 0
executable_semantics/testdata/fun5.carbon → executable_semantics/testdata/function/auto_return_add.carbon


+ 0 - 0
executable_semantics/testdata/type_compute3.carbon → executable_semantics/testdata/function/auto_return_modify_arg_type.carbon


+ 0 - 0
executable_semantics/testdata/type_compute2.carbon → executable_semantics/testdata/function/auto_return_modify_return_type.carbon


+ 0 - 0
executable_semantics/testdata/type_compute.carbon → executable_semantics/testdata/function/auto_return_type.carbon


+ 0 - 0
executable_semantics/testdata/fun4.carbon → executable_semantics/testdata/function/empty_params.carbon


+ 1 - 2
executable_semantics/testdata/fun6_fail_type.carbon → executable_semantics/testdata/function/fail_call_with_tuple.carbon

@@ -7,11 +7,10 @@
 // RUN: not executable_semantics --trace %s 2>&1 | \
 // RUN:   FileCheck --match-full-lines --allow-unused-prefixes %s
 // AUTOUPDATE: executable_semantics %s
-// CHECK: COMPILATION ERROR: {{.*}}/fun6_fail_type.carbon:22: type error in call
+// CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/function/fail_call_with_tuple.carbon:21: type error in call
 // CHECK: expected: (0 = i32, 1 = i32)
 // CHECK: actual: (0 = (0 = i32, 1 = i32))
 
-
 package ExecutableSemanticsTest api;
 
 fn f(x: i32, y: i32) -> i32 { return x + y; }

+ 20 - 0
executable_semantics/testdata/function/fail_named_params_order.carbon

@@ -0,0 +1,20 @@
+// 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 --trace %s 2>&1 | \
+// RUN:   FileCheck --match-full-lines --allow-unused-prefixes %s
+// AUTOUPDATE: executable_semantics %s
+// CHECK: PROGRAM ERROR: {{.*}}/executable_semantics/testdata/function/fail_named_params_order.carbon:14: positional members must come before named members
+
+package ExecutableSemanticsTest api;
+
+fn f(x: i32, .d = y: i32, z: i32, .e = a: i32) -> i32 {
+  return (x + y) - (z + a);
+}
+
+fn main() -> i32 {
+  return 0;
+}

+ 0 - 0
executable_semantics/testdata/funptr1.carbon → executable_semantics/testdata/function/fnty.carbon


+ 0 - 0
executable_semantics/testdata/ignored_parameter.carbon → executable_semantics/testdata/function/ignored_parameter.carbon


+ 0 - 0
executable_semantics/testdata/fun3.carbon → executable_semantics/testdata/function/multiple_args.carbon


+ 3 - 1
executable_semantics/testdata/fun_named_params.carbon → executable_semantics/testdata/function/named_params.carbon

@@ -11,7 +11,9 @@
 
 package ExecutableSemanticsTest api;
 
-fn f(x: i32, .d = y: i32) => x + y;
+fn f(x: i32, .d = y: i32) -> i32 {
+  return x + y;
+}
 
 fn main() -> i32 {
   return f(1, .d = 2) - 3;

+ 0 - 0
executable_semantics/testdata/fun2.carbon → executable_semantics/testdata/function/param_lifetime.carbon


+ 0 - 0
executable_semantics/testdata/fun_recur.carbon → executable_semantics/testdata/function/recursive.carbon


+ 0 - 0
executable_semantics/testdata/fun1.carbon → executable_semantics/testdata/function/return.carbon


+ 0 - 0
executable_semantics/testdata/type_match.carbon → executable_semantics/testdata/function/type_match.carbon


+ 0 - 0
executable_semantics/testdata/generic_function_apply.carbon → executable_semantics/testdata/generic_function/apply.carbon


+ 1 - 2
executable_semantics/testdata/generic_function_fail3.carbon → executable_semantics/testdata/generic_function/fail_not_addable.carbon

@@ -7,11 +7,10 @@
 // RUN: not executable_semantics --trace %s 2>&1 | \
 // RUN:   FileCheck --match-full-lines --allow-unused-prefixes %s
 // AUTOUPDATE: executable_semantics %s
-// CHECK: COMPILATION ERROR: {{.*}}/generic_function_fail3.carbon:18: type error in addition(1)
+// CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/generic_function/fail_not_addable.carbon:17: type error in addition(1)
 // CHECK: expected: i32
 // CHECK: actual: T
 
-
 package ExecutableSemanticsTest api;
 
 fn id[T:! Type](x: T) -> T {

+ 1 - 2
executable_semantics/testdata/generic_function_fail1.carbon → executable_semantics/testdata/generic_function/fail_type_deduction_mismatch.carbon

@@ -7,11 +7,10 @@
 // RUN: not executable_semantics --trace %s 2>&1 | \
 // RUN:   FileCheck --match-full-lines --allow-unused-prefixes %s
 // AUTOUPDATE: executable_semantics %s
-// CHECK: COMPILATION ERROR: {{.*}}/generic_function_fail1.carbon:22: type error in argument deduction
+// CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/generic_function/fail_type_deduction_mismatch.carbon:21: type error in argument deduction
 // CHECK: expected: i32
 // CHECK: actual: Bool
 
-
 package ExecutableSemanticsTest api;
 
 fn fst[T:! Type](x: T, y: T) -> T {

+ 1 - 2
executable_semantics/testdata/generic_function_fail2.carbon → executable_semantics/testdata/generic_function/fail_type_deduction_unused.carbon

@@ -7,8 +7,7 @@
 // RUN: not executable_semantics --trace %s 2>&1 | \
 // RUN:   FileCheck --match-full-lines --allow-unused-prefixes %s
 // AUTOUPDATE: executable_semantics %s
-// CHECK: COMPILATION ERROR: {{.*}}/generic_function_fail2.carbon:20: could not deduce type argument for type parameter T
-
+// CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/generic_function/fail_type_deduction_unused.carbon:19: could not deduce type argument for type parameter T
 
 package ExecutableSemanticsTest api;
 

+ 0 - 0
executable_semantics/testdata/generic_function3.carbon → executable_semantics/testdata/generic_function/non_generic_param.carbon


+ 0 - 0
executable_semantics/testdata/generic_function1.carbon → executable_semantics/testdata/generic_function/return_val.carbon


+ 0 - 0
executable_semantics/testdata/generic_function_swap.carbon → executable_semantics/testdata/generic_function/swap.carbon


+ 0 - 0
executable_semantics/testdata/generic_function_tuple_map.carbon → executable_semantics/testdata/generic_function/tuple_map.carbon


+ 0 - 0
executable_semantics/testdata/generic_function2.carbon → executable_semantics/testdata/generic_function/type_matching.carbon


+ 1 - 2
executable_semantics/testdata/global_variable8.carbon → executable_semantics/testdata/global_variable/fail_init_order.carbon

@@ -7,8 +7,7 @@
 // RUN: not executable_semantics --trace %s 2>&1 | \
 // RUN:   FileCheck --match-full-lines --allow-unused-prefixes %s
 // AUTOUPDATE: executable_semantics %s
-// CHECK: RUNTIME ERROR: {{.*}}/global_variable8.carbon:18: could not find `y`
-
+// CHECK: RUNTIME ERROR: {{.*}}/executable_semantics/testdata/global_variable/fail_init_order.carbon:17: could not find `y`
 
 package ExecutableSemanticsTest api;
 

+ 1 - 2
executable_semantics/testdata/global_variable3.carbon → executable_semantics/testdata/global_variable/fail_init_type_mismatch.carbon

@@ -7,11 +7,10 @@
 // RUN: not executable_semantics --trace %s 2>&1 | \
 // RUN:   FileCheck --match-full-lines --allow-unused-prefixes %s
 // AUTOUPDATE: executable_semantics %s
-// CHECK: COMPILATION ERROR: {{.*}}/global_variable3.carbon:19: type error in initializer of variable
+// CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/global_variable/fail_init_type_mismatch.carbon:18: type error in initializer of variable
 // CHECK: expected: i32
 // CHECK: actual: Bool
 
-
 package ExecutableSemanticsTest api;
 
 // Test type checking of global variable. Error expected.

+ 0 - 0
executable_semantics/testdata/global_variable1.carbon → executable_semantics/testdata/global_variable/init_and_read.carbon


+ 0 - 0
executable_semantics/testdata/global_variable7.carbon → executable_semantics/testdata/global_variable/init_from_function.carbon


+ 0 - 0
executable_semantics/testdata/global_variable6.carbon → executable_semantics/testdata/global_variable/init_order.carbon


+ 1 - 2
executable_semantics/testdata/global_variable5.carbon → executable_semantics/testdata/global_variable/shadowing.carbon

@@ -7,11 +7,10 @@
 // RUN: not executable_semantics --trace %s 2>&1 | \
 // RUN:   FileCheck --match-full-lines --allow-unused-prefixes %s
 // AUTOUPDATE: executable_semantics %s
-// CHECK: COMPILATION ERROR: {{.*}}/global_variable5.carbon:22: type error in return
+// CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/global_variable/shadowing.carbon:21: type error in return
 // CHECK: expected: ()
 // CHECK: actual: i32
 
-
 package ExecutableSemanticsTest api;
 
 // Test overshadowing of global variable.

+ 0 - 0
executable_semantics/testdata/global_variable4.carbon → executable_semantics/testdata/global_variable/write.carbon


+ 0 - 0
executable_semantics/testdata/global_variable2.carbon → executable_semantics/testdata/global_variable/write_from_function.carbon


+ 0 - 0
executable_semantics/testdata/if_else.carbon → executable_semantics/testdata/if_else/if_else.carbon


+ 0 - 0
executable_semantics/testdata/if_else_if.carbon → executable_semantics/testdata/if_else/if_else_if.carbon


+ 0 - 0
executable_semantics/testdata/if_else_if_else.carbon → executable_semantics/testdata/if_else/if_else_if_else.carbon


+ 0 - 0
executable_semantics/testdata/if_false.carbon → executable_semantics/testdata/if_else/if_false.carbon


+ 0 - 0
executable_semantics/testdata/if_nesting.carbon → executable_semantics/testdata/if_else/if_nesting.carbon


+ 0 - 0
executable_semantics/testdata/if_true.carbon → executable_semantics/testdata/if_else/if_true.carbon


+ 2 - 0
executable_semantics/testdata/import_nonexistent_library.carbon → executable_semantics/testdata/import/fail_nonexistent_library.carbon

@@ -2,6 +2,8 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
+// TODO: This SHOULD fail but doesn't presently.
+//
 // RUN: executable_semantics %s 2>&1 | \
 // RUN:   FileCheck --match-full-lines --allow-unused-prefixes=false %s
 // RUN: executable_semantics --trace %s 2>&1 | \

+ 2 - 0
executable_semantics/testdata/import_nonexistent_package.carbon → executable_semantics/testdata/import/fail_nonexistent_package.carbon

@@ -2,6 +2,8 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
+// TODO: This SHOULD fail but doesn't presently.
+//
 // RUN: executable_semantics %s 2>&1 | \
 // RUN:   FileCheck --match-full-lines --allow-unused-prefixes=false %s
 // RUN: executable_semantics --trace %s 2>&1 | \

+ 1 - 2
executable_semantics/testdata/import_late.carbon → executable_semantics/testdata/import/fail_order.carbon

@@ -7,8 +7,7 @@
 // RUN: not executable_semantics --trace %s 2>&1 | \
 // RUN:   FileCheck --match-full-lines --allow-unused-prefixes %s
 // AUTOUPDATE: executable_semantics %s
-// CHECK: COMPILATION ERROR: {{.*}}/import_late.carbon:19: syntax error, unexpected IMPORT, expecting END_OF_FILE
-
+// CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/import/fail_order.carbon:18: syntax error, unexpected IMPORT, expecting END_OF_FILE
 
 package ExecutableSemanticsTest api;
 

+ 0 - 0
executable_semantics/testdata/match_any_int.carbon → executable_semantics/testdata/match/any_int.carbon


+ 0 - 0
executable_semantics/testdata/match_int.carbon → executable_semantics/testdata/match/int.carbon


+ 0 - 0
executable_semantics/testdata/match_int_default.carbon → executable_semantics/testdata/match/int_default.carbon


+ 0 - 0
executable_semantics/testdata/no_match.carbon → executable_semantics/testdata/match/no_match.carbon


+ 0 - 0
executable_semantics/testdata/match_placeholder.carbon → executable_semantics/testdata/match/placeholder.carbon


+ 1 - 2
executable_semantics/testdata/package_missing.carbon → executable_semantics/testdata/package/fail_missing.carbon

@@ -7,8 +7,7 @@
 // RUN: not executable_semantics --trace %s 2>&1 | \
 // RUN:   FileCheck --match-full-lines --allow-unused-prefixes %s
 // AUTOUPDATE: executable_semantics %s
-// CHECK: COMPILATION ERROR: {{.*}}/package_missing.carbon:13: syntax error, unexpected FN, expecting PACKAGE
-
+// CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/package/fail_missing.carbon:12: syntax error, unexpected FN, expecting PACKAGE
 
 fn main() -> i32 {
   return 0;

+ 0 - 0
executable_semantics/testdata/package_library.carbon → executable_semantics/testdata/package/with_library.carbon


+ 0 - 0
executable_semantics/testdata/return_empty_explicit.carbon → executable_semantics/testdata/return/explicit_empty.carbon


+ 1 - 2
executable_semantics/testdata/return_auto.carbon → executable_semantics/testdata/return/fail_auto.carbon

@@ -7,8 +7,7 @@
 // RUN: not executable_semantics --trace %s 2>&1 | \
 // RUN:   FileCheck --match-full-lines --allow-unused-prefixes %s
 // AUTOUPDATE: executable_semantics %s
-// CHECK: COMPILATION ERROR: {{.*}}/return_auto.carbon:15: syntax error, unexpected AUTO
-
+// CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/return/fail_auto.carbon:14: syntax error, unexpected AUTO
 
 package ExecutableSemanticsTest api;
 

+ 1 - 2
executable_semantics/testdata/return_empty_implicit_fail1.carbon → executable_semantics/testdata/return/fail_explicit_with_no_return.carbon

@@ -7,8 +7,7 @@
 // RUN: not executable_semantics --trace %s 2>&1 | \
 // RUN:   FileCheck --match-full-lines --allow-unused-prefixes %s
 // AUTOUPDATE: executable_semantics %s
-// CHECK: COMPILATION ERROR: {{.*}}/return_empty_implicit_fail1.carbon:16: control-flow reaches end of function that provides a `->` return type without reaching a return statement
-
+// CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/return/fail_explicit_with_no_return.carbon:15: control-flow reaches end of function that provides a `->` return type without reaching a return statement
 
 package ExecutableSemanticsTest api;
 

+ 1 - 2
executable_semantics/testdata/return_empty_implicit_fail2.carbon → executable_semantics/testdata/return/fail_explicit_with_plain_return.carbon

@@ -7,8 +7,7 @@
 // RUN: not executable_semantics --trace %s 2>&1 | \
 // RUN:   FileCheck --match-full-lines --allow-unused-prefixes %s
 // AUTOUPDATE: executable_semantics %s
-// CHECK: COMPILATION ERROR: {{.*}}/return_empty_implicit_fail2.carbon:16: return; should provide a return value, to match the function's signature.
-
+// CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/return/fail_explicit_with_plain_return.carbon:15: return; should provide a return value, to match the function's signature.
 
 package ExecutableSemanticsTest api;
 

+ 1 - 2
executable_semantics/testdata/return_empty_explicit_fail.carbon → executable_semantics/testdata/return/fail_implicit_with_explicit_return.carbon

@@ -7,8 +7,7 @@
 // RUN: not executable_semantics --trace %s 2>&1 | \
 // RUN:   FileCheck --match-full-lines --allow-unused-prefixes %s
 // AUTOUPDATE: executable_semantics %s
-// CHECK: COMPILATION ERROR: {{.*}}/return_empty_explicit_fail.carbon:16: return (); should not provide a return value, to match the function's signature.
-
+// CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/return/fail_implicit_with_explicit_return.carbon:15: return (); should not provide a return value, to match the function's signature.
 
 package ExecutableSemanticsTest api;
 

+ 0 - 0
executable_semantics/testdata/return_empty_implicit1.carbon → executable_semantics/testdata/return/implicit_with_no_return.carbon


+ 0 - 0
executable_semantics/testdata/return_empty_implicit2.carbon → executable_semantics/testdata/return/implicit_with_plain_return.carbon


+ 0 - 0
executable_semantics/testdata/string1.carbon → executable_semantics/testdata/string/basic.carbon


+ 1 - 2
executable_semantics/testdata/string_fail3.carbon → executable_semantics/testdata/string/fail_hex_lower.carbon

@@ -7,8 +7,7 @@
 // RUN: not executable_semantics --trace %s 2>&1 | \
 // RUN:   FileCheck --match-full-lines --allow-unused-prefixes %s
 // AUTOUPDATE: executable_semantics %s
-// CHECK: COMPILATION ERROR: {{.*}}/string_fail3.carbon:16: Invalid escaping in string: "str\xaa"
-
+// CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/string/fail_hex_lower.carbon:15: Invalid escaping in string: "str\xaa"
 
 package ExecutableSemanticsTest api;
 

+ 1 - 2
executable_semantics/testdata/string_fail2.carbon → executable_semantics/testdata/string/fail_hex_truncated.carbon

@@ -7,8 +7,7 @@
 // RUN: not executable_semantics --trace %s 2>&1 | \
 // RUN:   FileCheck --match-full-lines --allow-unused-prefixes %s
 // AUTOUPDATE: executable_semantics %s
-// CHECK: COMPILATION ERROR: {{.*}}/string_fail2.carbon:16: Invalid escaping in string: "str\x"
-
+// CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/string/fail_hex_truncated.carbon:15: Invalid escaping in string: "str\x"
 
 package ExecutableSemanticsTest api;
 

+ 1 - 2
executable_semantics/testdata/string_fail1.carbon → executable_semantics/testdata/string/fail_invalid_escape.carbon

@@ -7,8 +7,7 @@
 // RUN: not executable_semantics --trace %s 2>&1 | \
 // RUN:   FileCheck --match-full-lines --allow-unused-prefixes %s
 // AUTOUPDATE: executable_semantics %s
-// CHECK: COMPILATION ERROR: {{.*}}/string_fail1.carbon:16: Invalid escaping in string: "str\e"
-
+// CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/string/fail_invalid_escape.carbon:15: Invalid escaping in string: "str\e"
 
 package ExecutableSemanticsTest api;
 

+ 1 - 2
executable_semantics/testdata/string_fail5.carbon → executable_semantics/testdata/string/fail_newline.carbon

@@ -7,8 +7,7 @@
 // RUN: not executable_semantics --trace %s 2>&1 | \
 // RUN:   FileCheck --match-full-lines --allow-unused-prefixes %s
 // AUTOUPDATE: executable_semantics %s
-// CHECK: COMPILATION ERROR: {{.*}}/string_fail5.carbon:16: invalid character '\x22' in source file.
-
+// CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/string/fail_newline.carbon:15: invalid character '\x22' in source file.
 
 package ExecutableSemanticsTest api;
 

+ 1 - 2
executable_semantics/testdata/string_fail4.carbon → executable_semantics/testdata/string/fail_octal.carbon

@@ -7,8 +7,7 @@
 // RUN: not executable_semantics --trace %s 2>&1 | \
 // RUN:   FileCheck --match-full-lines --allow-unused-prefixes %s
 // AUTOUPDATE: executable_semantics %s
-// CHECK: COMPILATION ERROR: {{.*}}/string_fail4.carbon:16: Invalid escaping in string: "str\01"
-
+// CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/string/fail_octal.carbon:15: Invalid escaping in string: "str\01"
 
 package ExecutableSemanticsTest api;
 

+ 1 - 2
executable_semantics/testdata/string_fail6.carbon → executable_semantics/testdata/string/fail_tab.carbon

@@ -7,8 +7,7 @@
 // RUN: not executable_semantics --trace %s 2>&1 | \
 // RUN:   FileCheck --match-full-lines --allow-unused-prefixes %s
 // AUTOUPDATE: executable_semantics %s
-// CHECK: COMPILATION ERROR: {{.*}}/string_fail6.carbon:16: Invalid escaping in string: "new	line"
-
+// CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/string/fail_tab.carbon:15: Invalid escaping in string: "new	line"
 
 package ExecutableSemanticsTest api;
 

+ 0 - 0
executable_semantics/testdata/string3.carbon → executable_semantics/testdata/string/hex.carbon


+ 0 - 0
executable_semantics/testdata/string2.carbon → executable_semantics/testdata/string/newline.carbon


+ 0 - 0
executable_semantics/testdata/tuple_assign.carbon → executable_semantics/testdata/tuple/assign.carbon


+ 0 - 0
executable_semantics/testdata/tuple2.carbon → executable_semantics/testdata/tuple/ending_comma.carbon


+ 0 - 0
executable_semantics/testdata/tuple_equality.carbon → executable_semantics/testdata/tuple/equality.carbon


+ 0 - 0
executable_semantics/testdata/tuple_equality2.carbon → executable_semantics/testdata/tuple/equality_false.carbon


+ 4 - 5
executable_semantics/testdata/tuple_equality3.carbon → executable_semantics/testdata/tuple/fail_equality_type.carbon

@@ -3,6 +3,10 @@
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
 // RUN: not executable_semantics %s 2>&1 2>&1 | FileCheck %s
+// AUTOUPDATE: executable_semantics %s
+// CHECK: COMPILATION ERROR: {{.*}}/executable_semantics/testdata/tuple/fail_equality_type.carbon:16: type error in ==
+// CHECK: expected: (0 = i32, 1 = i32)
+// CHECK: actual: (0 = i32)
 
 package ExecutableSemanticsTest api;
 
@@ -15,8 +19,3 @@ fn main() -> i32 {
     return 0;
   }
 }
-
-// AUTOUPDATE: executable_semantics %s
-// CHECK: COMPILATION ERROR: {{.*}}/tuple_equality3.carbon:12: type error in ==
-// CHECK: expected: (0 = i32, 1 = i32)
-// CHECK: actual: (0 = i32)

+ 1 - 1
executable_semantics/testdata/tuple5.carbon → executable_semantics/testdata/tuple/fail_name_order.carbon

@@ -7,7 +7,7 @@
 // RUN: not executable_semantics --trace %s 2>&1 | \
 // RUN:   FileCheck --match-full-lines --allow-unused-prefixes %s
 // AUTOUPDATE: executable_semantics %s
-// CHECK: PROGRAM ERROR: {{.*}}/tuple5.carbon:17: Tuple field name 'y' does not match pattern field name 'x'
+// CHECK: PROGRAM ERROR: {{.*}}/executable_semantics/testdata/tuple/fail_name_order.carbon:17: Tuple field name 'y' does not match pattern field name 'x'
 
 package ExecutableSemanticsTest api;
 

+ 1 - 1
executable_semantics/testdata/tuple4.carbon → executable_semantics/testdata/tuple/fail_positional_order.carbon

@@ -7,7 +7,7 @@
 // RUN: not executable_semantics --trace %s 2>&1 | \
 // RUN:   FileCheck --match-full-lines --allow-unused-prefixes %s
 // AUTOUPDATE: executable_semantics %s
-// CHECK: PROGRAM ERROR: {{.*}}/tuple4.carbon:15: positional members must come before named members
+// CHECK: PROGRAM ERROR: {{.*}}/executable_semantics/testdata/tuple/fail_positional_order.carbon:15: positional members must come before named members
 
 package ExecutableSemanticsTest api;
 

Některé soubory nejsou zobrazeny, neboť je v těchto rozdílových datech změněno mnoho souborů