11// RUN: %empty-directory(%t)
22// RUN: cp %s %t/main.swift
3+
4+ // Build PlaygroundSupport module
35// 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
4- // RUN: %target-build-swift -Xfrontend -disable-availability-checking -Xfrontend -playground -o %t/main -I=%t %t/PlaygroundSupport.o %t/main.swift
5- // RUN: %target-codesign %t/main
6- // RUN: %target-run %t/main | %FileCheck %s
7- // RUN: %target-build-swift -Xfrontend -disable-availability-checking -Xfrontend -pc-macro -Xfrontend -playground -o %t/main2 -I=%t %t/PlaygroundSupport.o %t/main.swift
8- // RUN: %target-codesign %t/main2
9- // RUN: %target-run %t/main2 | %FileCheck %s
6+
7+ // -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+
11+ // -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
1024
1125// REQUIRES: executable_test
1226// REQUIRES: concurrency
@@ -28,25 +42,25 @@ async let fac4 = factorial(4)
2842print ( await fac4)
2943
3044// return await x * factorial(x - 1)
31- // CHECK: [22 :{{[[:digit:]]+}}-22 :{{[[:digit:]]+}}] __builtin_log[='1']
45+ // CHECK: [36 :{{[[:digit:]]+}}-36 :{{[[:digit:]]+}}] __builtin_log[='1']
3246
3347// return await x * factorial(x - 1)
34- // CHECK: [24 :{{[[:digit:]]+}}-24 :{{[[:digit:]]+}}] __builtin_log[='1']
48+ // CHECK: [38 :{{[[:digit:]]+}}-38 :{{[[:digit:]]+}}] __builtin_log[='1']
3549
3650// return await x * factorial(x - 1)
37- // CHECK: [24 :{{[[:digit:]]+}}-24 :{{[[:digit:]]+}}] __builtin_log[='2']
51+ // CHECK: [38 :{{[[:digit:]]+}}-38 :{{[[:digit:]]+}}] __builtin_log[='2']
3852
3953// return await x * factorial(x - 1)
40- // CHECK: [24 :{{[[:digit:]]+}}-24 :{{[[:digit:]]+}}] __builtin_log[='6']
54+ // CHECK: [38 :{{[[:digit:]]+}}-38 :{{[[:digit:]]+}}] __builtin_log[='6']
4155
4256// return await x * factorial(x - 1)
43- // CHECK: [24 :{{[[:digit:]]+}}-24 :{{[[:digit:]]+}}] __builtin_log[='24']
57+ // CHECK: [38 :{{[[:digit:]]+}}-38 :{{[[:digit:]]+}}] __builtin_log[='24']
4458
4559// func factorial(_ x : Int) { ... }
46- // CHECK-NEXT: [20 :{{[[:digit:]]+}}-25 :{{[[:digit:]]+}}] __builtin_log_scope_exit
60+ // CHECK-NEXT: [34 :{{[[:digit:]]+}}-39 :{{[[:digit:]]+}}] __builtin_log_scope_exit
4761
4862// (actually print the thing)
4963// CHECK-NEXT: 24
5064
5165// print(await fac4)
52- // CHECK-NEXT: [28 :{{[[:digit:]]+}}-28 :{{[[:digit:]]+}}] __builtin_postPrint
66+ // CHECK-NEXT: [42 :{{[[:digit:]]+}}-42 :{{[[:digit:]]+}}] __builtin_postPrint
0 commit comments