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
-
7
1
// -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
+ //
11
5
// -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
+ //
25
9
// REQUIRES: executable_test
26
10
// REQUIRES: concurrency
27
-
11
+ //
28
12
// rdar://76038845
29
13
// REQUIRES: concurrency_runtime
30
14
// UNSUPPORTED: back_deployment_runtime
@@ -42,25 +26,25 @@ async let fac4 = factorial(4)
42
26
print ( await fac4)
43
27
44
28
// return await x * factorial(x - 1)
45
- // CHECK: [36 :{{[[:digit:]]+}}-36 :{{[[:digit:]]+}}] __builtin_log[='1']
29
+ // CHECK: [20 :{{[[:digit:]]+}}-20 :{{[[:digit:]]+}}] __builtin_log[='1']
46
30
47
31
// return await x * factorial(x - 1)
48
- // CHECK: [38 :{{[[:digit:]]+}}-38 :{{[[:digit:]]+}}] __builtin_log[='1']
32
+ // CHECK: [22 :{{[[:digit:]]+}}-22 :{{[[:digit:]]+}}] __builtin_log[='1']
49
33
50
34
// return await x * factorial(x - 1)
51
- // CHECK: [38 :{{[[:digit:]]+}}-38 :{{[[:digit:]]+}}] __builtin_log[='2']
35
+ // CHECK: [22 :{{[[:digit:]]+}}-22 :{{[[:digit:]]+}}] __builtin_log[='2']
52
36
53
37
// return await x * factorial(x - 1)
54
- // CHECK: [38 :{{[[:digit:]]+}}-38 :{{[[:digit:]]+}}] __builtin_log[='6']
38
+ // CHECK: [22 :{{[[:digit:]]+}}-22 :{{[[:digit:]]+}}] __builtin_log[='6']
55
39
56
40
// return await x * factorial(x - 1)
57
- // CHECK: [38 :{{[[:digit:]]+}}-38 :{{[[:digit:]]+}}] __builtin_log[='24']
41
+ // CHECK: [22 :{{[[:digit:]]+}}-22 :{{[[:digit:]]+}}] __builtin_log[='24']
58
42
59
43
// 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
61
45
62
46
// (actually print the thing)
63
47
// CHECK-NEXT: 24
64
48
65
49
// print(await fac4)
66
- // CHECK-NEXT: [42 :{{[[:digit:]]+}}-42 :{{[[:digit:]]+}}] __builtin_postPrint
50
+ // CHECK-NEXT: [26 :{{[[:digit:]]+}}-26 :{{[[:digit:]]+}}] __builtin_postPrint
0 commit comments