Skip to content

Commit 8715c34

Browse files
authored
Merge pull request #78047 from swiftlang/eng/chrismiles/playground-transform-test-cleanup-using-macro
Simplifies PlaygroundTransform tests by moving boilerplate code to a macro
2 parents 3542af9 + f301746 commit 8715c34

39 files changed

+271
-836
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
1-
// testxx (module-name) -> 1 (module-id)
2-
internal let __builtin_pg_module_test5a: Int = 1
3-
internal let __builtin_pg_module_test5b: Int = 1
4-
internal let __builtin_pg_module_test6a: Int = 1
5-
internal let __builtin_pg_module_test6b: Int = 1
1+
// main (module-name) -> 1 (module-id)
2+
internal let __builtin_pg_module_main: Int = 1
63

7-
// testxx (module-name), main (file-name), main_ (file-name-punycode) -> 2 (file-id)
8-
internal let __builtin_pg_module_test5a_pg_file_main_: Int = 2
9-
internal let __builtin_pg_module_test5b_pg_file_main_: Int = 2
10-
internal let __builtin_pg_module_test6a_pg_file_main_: Int = 2
11-
internal let __builtin_pg_module_test6b_pg_file_main_: Int = 2
4+
// main (module-name), main (file-name), main_ (file-name-punycode) -> 2 (file-id)
5+
internal let __builtin_pg_module_main_pg_file_main_: Int = 2

test/PlaygroundTransform/array.swift

+6-22
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,11 @@
1-
// RUN: %empty-directory(%t)
2-
// RUN: cp %s %t/main.swift
3-
4-
// Build PlaygroundSupport module
5-
// RUN: %target-build-swift -whole-module-optimization -module-name PlaygroundSupport -emit-module-path %t/PlaygroundSupport.swiftmodule -parse-as-library -c -o %t/PlaygroundSupport.o %S/Inputs/SilentPCMacroRuntime.swift %S/Inputs/PlaygroundsRuntime.swift
6-
71
// -playground
8-
// RUN: %target-build-swift -swift-version 5 -Xfrontend -playground -o %t/main5a -I=%t %t/PlaygroundSupport.o %t/main.swift
9-
// RUN: %target-build-swift -swift-version 6 -Xfrontend -playground -o %t/main6a -I=%t %t/PlaygroundSupport.o %t/main.swift
10-
2+
// RUN: %target-playground-build-run-swift(-swift-version 5 -Xfrontend -playground) | %FileCheck %s
3+
// RUN: %target-playground-build-run-swift(-swift-version 6 -Xfrontend -playground) | %FileCheck %s
4+
//
115
// -pc-macro -playground
12-
// RUN: %target-build-swift -swift-version 5 -Xfrontend -pc-macro -Xfrontend -playground -o %t/main5b -I=%t %t/PlaygroundSupport.o %t/main.swift
13-
// RUN: %target-build-swift -swift-version 6 -Xfrontend -pc-macro -Xfrontend -playground -o %t/main6b -I=%t %t/PlaygroundSupport.o %t/main.swift
14-
15-
// RUN: %target-codesign %t/main5a
16-
// RUN: %target-codesign %t/main5b
17-
// RUN: %target-codesign %t/main6a
18-
// RUN: %target-codesign %t/main6b
19-
20-
// RUN: %target-run %t/main5a | %FileCheck %s
21-
// RUN: %target-run %t/main5b | %FileCheck %s
22-
// RUN: %target-run %t/main6a | %FileCheck %s
23-
// RUN: %target-run %t/main6b | %FileCheck %s
24-
6+
// RUN: %target-playground-build-run-swift(-swift-version 5 -Xfrontend -pc-macro -Xfrontend -playground) | %FileCheck %s
7+
// RUN: %target-playground-build-run-swift(-swift-version 6 -Xfrontend -pc-macro -Xfrontend -playground) | %FileCheck %s
8+
//
259
// REQUIRES: executable_test
2610

2711
import PlaygroundSupport

test/PlaygroundTransform/array_did_set.swift

+6-22
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,11 @@
1-
// RUN: %empty-directory(%t)
2-
// RUN: cp %s %t/main.swift
3-
4-
// Build PlaygroundSupport module
5-
// RUN: %target-build-swift -whole-module-optimization -module-name PlaygroundSupport -emit-module-path %t/PlaygroundSupport.swiftmodule -parse-as-library -c -o %t/PlaygroundSupport.o %S/Inputs/SilentPCMacroRuntime.swift %S/Inputs/PlaygroundsRuntime.swift
6-
71
// -playground
8-
// RUN: %target-build-swift -swift-version 5 -Xfrontend -playground -o %t/main5a -I=%t %t/PlaygroundSupport.o %t/main.swift
9-
// RUN: %target-build-swift -swift-version 6 -Xfrontend -playground -o %t/main6a -I=%t %t/PlaygroundSupport.o %t/main.swift
10-
2+
// RUN: %target-playground-build-run-swift(-swift-version 5 -Xfrontend -playground) | %FileCheck %s
3+
// RUN: %target-playground-build-run-swift(-swift-version 6 -Xfrontend -playground) | %FileCheck %s
4+
//
115
// -pc-macro -playground
12-
// RUN: %target-build-swift -swift-version 5 -Xfrontend -pc-macro -Xfrontend -playground -o %t/main5b -I=%t %t/PlaygroundSupport.o %t/main.swift
13-
// RUN: %target-build-swift -swift-version 6 -Xfrontend -pc-macro -Xfrontend -playground -o %t/main6b -I=%t %t/PlaygroundSupport.o %t/main.swift
14-
15-
// RUN: %target-codesign %t/main5a
16-
// RUN: %target-codesign %t/main5b
17-
// RUN: %target-codesign %t/main6a
18-
// RUN: %target-codesign %t/main6b
19-
20-
// RUN: %target-run %t/main5a | %FileCheck %s
21-
// RUN: %target-run %t/main5b | %FileCheck %s
22-
// RUN: %target-run %t/main6a | %FileCheck %s
23-
// RUN: %target-run %t/main6b | %FileCheck %s
24-
6+
// RUN: %target-playground-build-run-swift(-swift-version 5 -Xfrontend -pc-macro -Xfrontend -playground) | %FileCheck %s
7+
// RUN: %target-playground-build-run-swift(-swift-version 6 -Xfrontend -pc-macro -Xfrontend -playground) | %FileCheck %s
8+
//
259
// REQUIRES: executable_test
2610

2711
import PlaygroundSupport

test/PlaygroundTransform/array_in_struct.swift

+6-22
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,11 @@
1-
// RUN: %empty-directory(%t)
2-
// RUN: cp %s %t/main.swift
3-
4-
// Build PlaygroundSupport module
5-
// RUN: %target-build-swift -whole-module-optimization -module-name PlaygroundSupport -emit-module-path %t/PlaygroundSupport.swiftmodule -parse-as-library -c -o %t/PlaygroundSupport.o %S/Inputs/SilentPCMacroRuntime.swift %S/Inputs/PlaygroundsRuntime.swift
6-
71
// -playground
8-
// RUN: %target-build-swift -swift-version 5 -Xfrontend -playground -o %t/main5a -I=%t %t/PlaygroundSupport.o %t/main.swift
9-
// RUN: %target-build-swift -swift-version 6 -Xfrontend -playground -o %t/main6a -I=%t %t/PlaygroundSupport.o %t/main.swift
10-
2+
// RUN: %target-playground-build-run-swift(-swift-version 5 -Xfrontend -playground) | %FileCheck %s
3+
// RUN: %target-playground-build-run-swift(-swift-version 6 -Xfrontend -playground) | %FileCheck %s
4+
//
115
// -pc-macro -playground
12-
// RUN: %target-build-swift -swift-version 5 -Xfrontend -pc-macro -Xfrontend -playground -o %t/main5b -I=%t %t/PlaygroundSupport.o %t/main.swift
13-
// RUN: %target-build-swift -swift-version 6 -Xfrontend -pc-macro -Xfrontend -playground -o %t/main6b -I=%t %t/PlaygroundSupport.o %t/main.swift
14-
15-
// RUN: %target-codesign %t/main5a
16-
// RUN: %target-codesign %t/main5b
17-
// RUN: %target-codesign %t/main6a
18-
// RUN: %target-codesign %t/main6b
19-
20-
// RUN: %target-run %t/main5a | %FileCheck %s
21-
// RUN: %target-run %t/main5b | %FileCheck %s
22-
// RUN: %target-run %t/main6a | %FileCheck %s
23-
// RUN: %target-run %t/main6b | %FileCheck %s
24-
6+
// RUN: %target-playground-build-run-swift(-swift-version 5 -Xfrontend -pc-macro -Xfrontend -playground) | %FileCheck %s
7+
// RUN: %target-playground-build-run-swift(-swift-version 6 -Xfrontend -pc-macro -Xfrontend -playground) | %FileCheck %s
8+
//
259
// REQUIRES: executable_test
2610

2711
// FIXME: We need to instrument mutations of objects that are accessed in
+14-30
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,14 @@
1-
// RUN: %empty-directory(%t)
2-
// RUN: cp %s %t/main.swift
3-
4-
// Build PlaygroundSupport module
5-
// RUN: %target-build-swift -whole-module-optimization -module-name PlaygroundSupport -emit-module-path %t/PlaygroundSupport.swiftmodule -parse-as-library -c -o %t/PlaygroundSupport.o %S/Inputs/SilentPCMacroRuntime.swift %S/Inputs/PlaygroundsRuntime.swift
6-
71
// -playground
8-
// RUN: %target-build-swift -swift-version 5 -Xfrontend -disable-availability-checking -Xfrontend -playground -o %t/main5a -I=%t %t/PlaygroundSupport.o %t/main.swift
9-
// RUN: %target-build-swift -swift-version 6 -Xfrontend -disable-availability-checking -Xfrontend -playground -o %t/main6a -I=%t %t/PlaygroundSupport.o %t/main.swift
10-
2+
// RUN: %target-playground-build-run-swift(-swift-version 5 -Xfrontend -disable-availability-checking -Xfrontend -playground) | %FileCheck %s
3+
// RUN: %target-playground-build-run-swift(-swift-version 6 -Xfrontend -disable-availability-checking -Xfrontend -playground) | %FileCheck %s
4+
//
115
// -pc-macro -playground
12-
// RUN: %target-build-swift -swift-version 5 -Xfrontend -disable-availability-checking -Xfrontend -pc-macro -Xfrontend -playground -o %t/main5b -I=%t %t/PlaygroundSupport.o %t/main.swift
13-
// RUN: %target-build-swift -swift-version 6 -Xfrontend -disable-availability-checking -Xfrontend -pc-macro -Xfrontend -playground -o %t/main6b -I=%t %t/PlaygroundSupport.o %t/main.swift
14-
15-
// RUN: %target-codesign %t/main5a
16-
// RUN: %target-codesign %t/main5b
17-
// RUN: %target-codesign %t/main6a
18-
// RUN: %target-codesign %t/main6b
19-
20-
// RUN: %target-run %t/main5a | %FileCheck %s
21-
// RUN: %target-run %t/main5b | %FileCheck %s
22-
// RUN: %target-run %t/main6a | %FileCheck %s
23-
// RUN: %target-run %t/main6b | %FileCheck %s
24-
6+
// RUN: %target-playground-build-run-swift(-swift-version 5 -Xfrontend -disable-availability-checking -Xfrontend -pc-macro -Xfrontend -playground) | %FileCheck %s
7+
// RUN: %target-playground-build-run-swift(-swift-version 6 -Xfrontend -disable-availability-checking -Xfrontend -pc-macro -Xfrontend -playground) | %FileCheck %s
8+
//
259
// REQUIRES: executable_test
2610
// REQUIRES: concurrency
27-
11+
//
2812
// rdar://76038845
2913
// REQUIRES: concurrency_runtime
3014
// UNSUPPORTED: back_deployment_runtime
@@ -42,25 +26,25 @@ async let fac4 = factorial(4)
4226
print(await fac4)
4327

4428
// return await x * factorial(x - 1)
45-
// CHECK: [36:{{[[:digit:]]+}}-36:{{[[:digit:]]+}}] __builtin_log[='1']
29+
// CHECK: [20:{{[[:digit:]]+}}-20:{{[[:digit:]]+}}] __builtin_log[='1']
4630

4731
// return await x * factorial(x - 1)
48-
// CHECK: [38:{{[[:digit:]]+}}-38:{{[[:digit:]]+}}] __builtin_log[='1']
32+
// CHECK: [22:{{[[:digit:]]+}}-22:{{[[:digit:]]+}}] __builtin_log[='1']
4933

5034
// return await x * factorial(x - 1)
51-
// CHECK: [38:{{[[:digit:]]+}}-38:{{[[:digit:]]+}}] __builtin_log[='2']
35+
// CHECK: [22:{{[[:digit:]]+}}-22:{{[[:digit:]]+}}] __builtin_log[='2']
5236

5337
// return await x * factorial(x - 1)
54-
// CHECK: [38:{{[[:digit:]]+}}-38:{{[[:digit:]]+}}] __builtin_log[='6']
38+
// CHECK: [22:{{[[:digit:]]+}}-22:{{[[:digit:]]+}}] __builtin_log[='6']
5539

5640
// return await x * factorial(x - 1)
57-
// CHECK: [38:{{[[:digit:]]+}}-38:{{[[:digit:]]+}}] __builtin_log[='24']
41+
// CHECK: [22:{{[[:digit:]]+}}-22:{{[[:digit:]]+}}] __builtin_log[='24']
5842

5943
// func factorial(_ x : Int) { ... }
60-
// CHECK-NEXT: [34:{{[[:digit:]]+}}-39:{{[[:digit:]]+}}] __builtin_log_scope_exit
44+
// CHECK-NEXT: [18:{{[[:digit:]]+}}-23:{{[[:digit:]]+}}] __builtin_log_scope_exit
6145

6246
// (actually print the thing)
6347
// CHECK-NEXT: 24
6448

6549
// print(await fac4)
66-
// CHECK-NEXT: [42:{{[[:digit:]]+}}-42:{{[[:digit:]]+}}] __builtin_postPrint
50+
// CHECK-NEXT: [26:{{[[:digit:]]+}}-26:{{[[:digit:]]+}}] __builtin_postPrint

test/PlaygroundTransform/bare_value.swift

+6-22
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,11 @@
1-
// RUN: %empty-directory(%t)
2-
// RUN: cp %s %t/main.swift
3-
4-
// Build PlaygroundSupport module
5-
// RUN: %target-build-swift -whole-module-optimization -module-name PlaygroundSupport -emit-module-path %t/PlaygroundSupport.swiftmodule -parse-as-library -c -o %t/PlaygroundSupport.o %S/Inputs/SilentPCMacroRuntime.swift %S/Inputs/PlaygroundsRuntime.swift
6-
71
// -playground
8-
// RUN: %target-build-swift -swift-version 5 -Xfrontend -playground -o %t/main5a -I=%t %t/PlaygroundSupport.o %t/main.swift
9-
// RUN: %target-build-swift -swift-version 6 -Xfrontend -playground -o %t/main6a -I=%t %t/PlaygroundSupport.o %t/main.swift
10-
2+
// RUN: %target-playground-build-run-swift(-swift-version 5 -Xfrontend -playground) | %FileCheck %s
3+
// RUN: %target-playground-build-run-swift(-swift-version 6 -Xfrontend -playground) | %FileCheck %s
4+
//
115
// -pc-macro -playground
12-
// RUN: %target-build-swift -swift-version 5 -Xfrontend -pc-macro -Xfrontend -playground -o %t/main5b -I=%t %t/PlaygroundSupport.o %t/main.swift
13-
// RUN: %target-build-swift -swift-version 6 -Xfrontend -pc-macro -Xfrontend -playground -o %t/main6b -I=%t %t/PlaygroundSupport.o %t/main.swift
14-
15-
// RUN: %target-codesign %t/main5a
16-
// RUN: %target-codesign %t/main5b
17-
// RUN: %target-codesign %t/main6a
18-
// RUN: %target-codesign %t/main6b
19-
20-
// RUN: %target-run %t/main5a | %FileCheck %s
21-
// RUN: %target-run %t/main5b | %FileCheck %s
22-
// RUN: %target-run %t/main6a | %FileCheck %s
23-
// RUN: %target-run %t/main6b | %FileCheck %s
24-
6+
// RUN: %target-playground-build-run-swift(-swift-version 5 -Xfrontend -pc-macro -Xfrontend -playground) | %FileCheck %s
7+
// RUN: %target-playground-build-run-swift(-swift-version 6 -Xfrontend -pc-macro -Xfrontend -playground) | %FileCheck %s
8+
//
259
// REQUIRES: executable_test
2610

2711
import PlaygroundSupport

test/PlaygroundTransform/closure_parameters.swift

+6-22
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,11 @@
1-
// RUN: %empty-directory(%t)
2-
// RUN: cp %s %t/main.swift
3-
4-
// Build PlaygroundSupport module
5-
// RUN: %target-build-swift -whole-module-optimization -module-name PlaygroundSupport -emit-module-path %t/PlaygroundSupport.swiftmodule -parse-as-library -c -o %t/PlaygroundSupport.o %S/Inputs/SilentPCMacroRuntime.swift %S/Inputs/PlaygroundsRuntime.swift
6-
71
// -playground
8-
// RUN: %target-build-swift -swift-version 5 -Xfrontend -playground -Xfrontend -debugger-support -o %t/main5a -I=%t %t/PlaygroundSupport.o %t/main.swift
9-
// RUN: %target-build-swift -swift-version 6 -Xfrontend -playground -Xfrontend -debugger-support -o %t/main6a -I=%t %t/PlaygroundSupport.o %t/main.swift
10-
2+
// RUN: %target-playground-build-run-swift(-swift-version 5 -Xfrontend -playground -Xfrontend -debugger-support) | %FileCheck %s
3+
// RUN: %target-playground-build-run-swift(-swift-version 6 -Xfrontend -playground -Xfrontend -debugger-support) | %FileCheck %s
4+
//
115
// -pc-macro -playground
12-
// RUN: %target-build-swift -swift-version 5 -Xfrontend -pc-macro -Xfrontend -playground -Xfrontend -debugger-support -o %t/main5b -I=%t %t/PlaygroundSupport.o %t/main.swift
13-
// RUN: %target-build-swift -swift-version 6 -Xfrontend -pc-macro -Xfrontend -playground -Xfrontend -debugger-support -o %t/main6b -I=%t %t/PlaygroundSupport.o %t/main.swift
14-
15-
// RUN: %target-codesign %t/main5a
16-
// RUN: %target-codesign %t/main5b
17-
// RUN: %target-codesign %t/main6a
18-
// RUN: %target-codesign %t/main6b
19-
20-
// RUN: %target-run %t/main5a | %FileCheck %s
21-
// RUN: %target-run %t/main5b | %FileCheck %s
22-
// RUN: %target-run %t/main6a | %FileCheck %s
23-
// RUN: %target-run %t/main6b | %FileCheck %s
24-
6+
// RUN: %target-playground-build-run-swift(-swift-version 5 -Xfrontend -pc-macro -Xfrontend -playground -Xfrontend -debugger-support) | %FileCheck %s
7+
// RUN: %target-playground-build-run-swift(-swift-version 6 -Xfrontend -pc-macro -Xfrontend -playground -Xfrontend -debugger-support) | %FileCheck %s
8+
//
259
// REQUIRES: executable_test
2610

2711
import PlaygroundSupport

test/PlaygroundTransform/control-flow.swift

+6-23
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,15 @@
1-
// RUN: %empty-directory(%t)
2-
// RUN: cp %s %t/main.swift
3-
4-
// Build PlaygroundSupport module
5-
// RUN: %target-build-swift -whole-module-optimization -module-name PlaygroundSupport -emit-module-path %t/PlaygroundSupport.swiftmodule -parse-as-library -c -o %t/PlaygroundSupport.o %S/Inputs/SilentPCMacroRuntime.swift %S/Inputs/PlaygroundsRuntime.swift
6-
71
// -playground
8-
// RUN: %target-build-swift -swift-version 5 -Xfrontend -playground -o %t/main5a -I=%t %t/PlaygroundSupport.o %t/main.swift
9-
// RUN: %target-build-swift -swift-version 6 -Xfrontend -playground -o %t/main6a -I=%t %t/PlaygroundSupport.o %t/main.swift
10-
2+
// RUN: %target-playground-build-run-swift(-swift-version 5 -Xfrontend -playground) | %FileCheck %s
3+
// RUN: %target-playground-build-run-swift(-swift-version 6 -Xfrontend -playground) | %FileCheck %s
4+
//
115
// -pc-macro -playground
12-
// RUN: %target-build-swift -swift-version 5 -Xfrontend -pc-macro -Xfrontend -playground -o %t/main5b -I=%t %t/PlaygroundSupport.o %t/main.swift
13-
// RUN: %target-build-swift -swift-version 6 -Xfrontend -pc-macro -Xfrontend -playground -o %t/main6b -I=%t %t/PlaygroundSupport.o %t/main.swift
14-
15-
// RUN: %target-codesign %t/main5a
16-
// RUN: %target-codesign %t/main5b
17-
// RUN: %target-codesign %t/main6a
18-
// RUN: %target-codesign %t/main6b
19-
20-
// RUN: %target-run %t/main5a | %FileCheck %s
21-
// RUN: %target-run %t/main5b | %FileCheck %s
22-
// RUN: %target-run %t/main6a | %FileCheck %s
23-
// RUN: %target-run %t/main6b | %FileCheck %s
24-
6+
// RUN: %target-playground-build-run-swift(-swift-version 5 -Xfrontend -pc-macro -Xfrontend -playground) | %FileCheck %s
7+
// RUN: %target-playground-build-run-swift(-swift-version 6 -Xfrontend -pc-macro -Xfrontend -playground) | %FileCheck %s
8+
//
259
// REQUIRES: executable_test
2610

2711
import PlaygroundSupport
2812

29-
3013
var a = true
3114
if (a) {
3215
5

test/PlaygroundTransform/declarations.swift

+6-22
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,11 @@
1-
// RUN: %empty-directory(%t)
2-
// RUN: cp %s %t/main.swift
3-
4-
// Build PlaygroundSupport module
5-
// RUN: %target-build-swift -whole-module-optimization -module-name PlaygroundSupport -emit-module-path %t/PlaygroundSupport.swiftmodule -parse-as-library -c -o %t/PlaygroundSupport.o %S/Inputs/SilentPCMacroRuntime.swift %S/Inputs/PlaygroundsRuntime.swift
6-
71
// -playground
8-
// RUN: %target-build-swift -swift-version 5 -Xfrontend -playground -o %t/main5a -I=%t %t/PlaygroundSupport.o %t/main.swift
9-
// RUN: %target-build-swift -swift-version 6 -Xfrontend -playground -o %t/main6a -I=%t %t/PlaygroundSupport.o %t/main.swift
10-
2+
// RUN: %target-playground-build-run-swift(-swift-version 5 -Xfrontend -playground) | %FileCheck %s
3+
// RUN: %target-playground-build-run-swift(-swift-version 6 -Xfrontend -playground) | %FileCheck %s
4+
//
115
// -pc-macro -playground
12-
// RUN: %target-build-swift -swift-version 5 -Xfrontend -pc-macro -Xfrontend -playground -o %t/main5b -I=%t %t/PlaygroundSupport.o %t/main.swift
13-
// RUN: %target-build-swift -swift-version 6 -Xfrontend -pc-macro -Xfrontend -playground -o %t/main6b -I=%t %t/PlaygroundSupport.o %t/main.swift
14-
15-
// RUN: %target-codesign %t/main5a
16-
// RUN: %target-codesign %t/main5b
17-
// RUN: %target-codesign %t/main6a
18-
// RUN: %target-codesign %t/main6b
19-
20-
// RUN: %target-run %t/main5a | %FileCheck %s
21-
// RUN: %target-run %t/main5b | %FileCheck %s
22-
// RUN: %target-run %t/main6a | %FileCheck %s
23-
// RUN: %target-run %t/main6b | %FileCheck %s
24-
6+
// RUN: %target-playground-build-run-swift(-swift-version 5 -Xfrontend -pc-macro -Xfrontend -playground) | %FileCheck %s
7+
// RUN: %target-playground-build-run-swift(-swift-version 6 -Xfrontend -pc-macro -Xfrontend -playground) | %FileCheck %s
8+
//
259
// REQUIRES: executable_test
2610

2711
import PlaygroundSupport

test/PlaygroundTransform/defer.swift

+6-22
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,11 @@
1-
// RUN: %empty-directory(%t)
2-
// RUN: cp %s %t/main.swift
3-
4-
// Build PlaygroundSupport module
5-
// RUN: %target-build-swift -whole-module-optimization -module-name PlaygroundSupport -emit-module-path %t/PlaygroundSupport.swiftmodule -parse-as-library -c -o %t/PlaygroundSupport.o %S/Inputs/SilentPCMacroRuntime.swift %S/Inputs/PlaygroundsRuntime.swift
6-
71
// -playground
8-
// RUN: %target-build-swift -swift-version 5 -Xfrontend -playground -Xfrontend -debugger-support -o %t/main5a -I=%t %t/PlaygroundSupport.o %t/main.swift
9-
// RUN: %target-build-swift -swift-version 6 -Xfrontend -playground -Xfrontend -debugger-support -o %t/main6a -I=%t %t/PlaygroundSupport.o %t/main.swift
10-
2+
// RUN: %target-playground-build-run-swift(-swift-version 5 -Xfrontend -playground -Xfrontend -debugger-support) | %FileCheck %s
3+
// RUN: %target-playground-build-run-swift(-swift-version 6 -Xfrontend -playground -Xfrontend -debugger-support) | %FileCheck %s
4+
//
115
// -pc-macro -playground
12-
// RUN: %target-build-swift -swift-version 5 -Xfrontend -pc-macro -Xfrontend -playground -Xfrontend -debugger-support -o %t/main5b -I=%t %t/PlaygroundSupport.o %t/main.swift
13-
// RUN: %target-build-swift -swift-version 6 -Xfrontend -pc-macro -Xfrontend -playground -Xfrontend -debugger-support -o %t/main6b -I=%t %t/PlaygroundSupport.o %t/main.swift
14-
15-
// RUN: %target-codesign %t/main5a
16-
// RUN: %target-codesign %t/main5b
17-
// RUN: %target-codesign %t/main6a
18-
// RUN: %target-codesign %t/main6b
19-
20-
// RUN: %target-run %t/main5a | %FileCheck %s
21-
// RUN: %target-run %t/main5b | %FileCheck %s
22-
// RUN: %target-run %t/main6a | %FileCheck %s
23-
// RUN: %target-run %t/main6b | %FileCheck %s
24-
6+
// RUN: %target-playground-build-run-swift(-swift-version 5 -Xfrontend -pc-macro -Xfrontend -playground -Xfrontend -debugger-support) | %FileCheck %s
7+
// RUN: %target-playground-build-run-swift(-swift-version 6 -Xfrontend -pc-macro -Xfrontend -playground -Xfrontend -debugger-support) | %FileCheck %s
8+
//
259
// REQUIRES: executable_test
2610

2711
import PlaygroundSupport

0 commit comments

Comments
 (0)