Skip to content

Commit 95fd3ed

Browse files
committed
Update tests and testing tools for implicit _Concurrency import
1 parent cc0a74d commit 95fd3ed

File tree

55 files changed

+363
-245
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+363
-245
lines changed

test/Concurrency/async_main_no_concurrency.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-typecheck-verify-swift -parse-as-library %s
1+
// RUN: %target-typecheck-verify-swift -parse-as-library -disable-implicit-concurrency-module-import %s
22
// RUN: %target-typecheck-verify-swift -parse-as-library -enable-experimental-concurrency -parse-stdlib %s
33

44
@main struct Main {

test/IDE/Inputs/foo_swift_module.printed.comments.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import SwiftOnoneSupport
2+
import _Concurrency
23

34
func %%% (lhs: Int, rhs: Int) -> Int
45

test/IDE/complete_from_stdlib.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %empty-directory(%t)
2-
// RUN: %target-swift-ide-test -batch-code-completion -source-filename %s -filecheck %raw-FileCheck -completion-output-dir %t
2+
// RUN: %target-swift-ide-test -disable-implicit-concurrency-module-import -batch-code-completion -source-filename %s -filecheck %raw-FileCheck -completion-output-dir %t
33

44
// NO_STDLIB_PRIVATE: Begin completions
55
// NO_STDLIB_PRIVATE-NOT: Decl{{[^:]*}}/IsSystem: _

test/IDE/complete_override.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %empty-directory(%t)
2-
// RUN: %target-swift-ide-test -batch-code-completion -source-filename %s -filecheck %raw-FileCheck -completion-output-dir %t
2+
// RUN: %target-swift-ide-test -disable-implicit-concurrency-module-import -batch-code-completion -source-filename %s -filecheck %raw-FileCheck -completion-output-dir %t
33
// RUN: sed -n -e '1,/NO_ERRORS_UP_TO_HERE$/ p' %s > %t_no_errors.swift
44
// RUN: %target-swift-frontend -typecheck -verify -disable-objc-attr-requires-foundation-module -enable-objc-interop %t_no_errors.swift
55

test/Index/Store/cross-import-overlay.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ from__ABAdditionsCAdditions()
3030
// MAIN-NEXT: is-debug: 1
3131
// MAIN-NEXT: DEPEND START
3232
// MAIN-NEXT: Unit | system | Swift | {{.*}}{{/|\\}}Swift.swiftmodule
33+
// MAIN-NEXT: Unit | system | _Concurrency | {{.*}}{{/|\\}}_Concurrency.swiftmodule
3334
// MAIN-NEXT: Unit | system | B | {{.*}}{{/|\\}}B.swiftmodule{{/|\\}}{{.*}}
3435
// MAIN-NEXT: Unit | system | C | {{.*}}{{/|\\}}C.swiftmodule{{/|\\}}{{.*}}
3536
// MAIN-NEXT: Unit | system | A | {{.*}}{{/|\\}}__ABAdditionsCAdditions.swiftmodule{{/|\\}}{{.*}}

test/Index/Store/unit-from-compile.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
// CHECK: DEPEND START
1818
// CHECK: Unit | system | {{.*}}{{/|\\}}Swift.swiftmodule
19-
// CHECK: DEPEND END (1)
19+
// CHECK: Unit | system | _Concurrency
20+
// CHECK: DEPEND END (2)
2021

2122
// OPT: is-debug: 1

test/Index/Store/unit-one-file-multi-file-invocation.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@
88
// CHECK: 00-output_for_index
99
// CHECK: DEPEND START
1010
// CHECK: Unit | system | Swift | [[MODULE:.*[/\\]Swift[.]swiftmodule([/\\].+[.]swiftmodule)?]] | [[SWIFT:.+[.]swiftmodule-[A-Z0-9]*]]
11+
// CHECK: Unit | system | _Concurrency | {{.*}}
1112
// CHECK: Record | user | {{.*}}{{/|\\}}unit-one-file-multi-file-invocation.swift |
12-
// CHECK: DEPEND END (2)
13+
// CHECK: DEPEND END (3)
1314

1415
// CHECK: [[SWIFT]]
1516
// CHECK: DEPEND START

test/Index/Store/unit-pcm-dependency.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,14 @@ func test() {
5050
// FILE1-NOT: ClangModuleA.h
5151
// FILE1-NOT: Unit |{{.*}}ClangModuleA
5252
// FILE1: Unit | system | Swift | {{.*}}Swift.swiftmodule
53+
// FILE1: Unit | system | _Concurrency
5354
// FILE1-NOT: Unit |{{.*}}ClangModuleA
5455
// FILE1: Unit | user | ClangModuleB | {{.*}}ClangModuleB-{{[A-Z0-9]*}}.pcm | ClangModuleB-{{[A-Z0-9]*}}.pcm-
5556
// FILE1: Unit | user | ClangModuleC | {{.*}}ClangModuleC-{{[A-Z0-9]*}}.pcm | ClangModuleC-{{[A-Z0-9]*}}.pcm-
5657
// FILE1-NOT: Unit |{{.*}}ClangModuleA
5758
// FILE1: Record | user | {{.*}}unit-pcm-dependency.swift | unit-pcm-dependency.swift-
5859
// FILE1-NOT: Unit |{{.*}}ClangModuleA
59-
// FILE1: DEPEND END (4)
60+
// FILE1: DEPEND END (5)
6061

6162
// FILE2-NOT: main.swiftmodule-
6263

test/Index/Store/unit-with-bridging-header.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,16 @@
3232
// PCH-UNIT: DEPEND START
3333
// PCH-UNIT: Unit | system | {{.*}}Swift.swiftmodule
3434
// PCH-UNIT: Unit | user | {{.*}}bridge-head.pch | bridge-head.pch-
35+
// PCH-UNIT: Unit | system | _Concurrency |
3536
// PCH-UNIT: Record | user | {{.*}}unit-with-bridging-header.swift | unit-with-bridging-header.swift-
36-
// PCH-UNIT: DEPEND END (3)
37+
// PCH-UNIT: DEPEND END (4)
3738

3839
// TEXTUAL-UNIT: s1.o-
3940
// TEXTUAL-UNIT: --------
4041
// TEXTUAL-UNIT: has-main: 1
4142
// TEXTUAL-UNIT: DEPEND START
4243
// TEXTUAL-UNIT: Unit | system | {{.*}}Swift.swiftmodule
4344
// TEXTUAL-UNIT: Record | user | {{.*}}unit-with-bridging-header.swift | unit-with-bridging-header.swift-
44-
// TEXTUAL-UNIT: DEPEND END (2)
45+
// TEXTUAL-UNIT: DEPEND END (3)
4546

4647
func test() {}

test/ModuleInterface/ModuleCache/module-cache-diagnostics.swift

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@
2121
// Setup phase 2: build modules, pushing timestamps of inputs and intermediates into the past as we go.
2222
//
2323
// RUN: %{python} %S/Inputs/make-old.py %t/leaf.swift %t/other.swift
24-
// RUN: %target-swift-frontend -I %t -emit-module-interface-path %t/LeafModule.swiftinterface -module-name LeafModule %t/leaf.swift -emit-module -o /dev/null
24+
// RUN: %target-swift-frontend -disable-implicit-concurrency-module-import -I %t -emit-module-interface-path %t/LeafModule.swiftinterface -module-name LeafModule %t/leaf.swift -emit-module -o /dev/null
2525
// RUN: %{python} %S/Inputs/make-old.py %t/LeafModule.swiftinterface
26-
// RUN: %target-swift-frontend -I %t -module-cache-path %t/modulecache -emit-module-interface-path %t/OtherModule.swiftinterface -module-name OtherModule %t/other.swift -emit-module -o /dev/null
26+
// RUN: %target-swift-frontend -disable-implicit-concurrency-module-import -I %t -module-cache-path %t/modulecache -emit-module-interface-path %t/OtherModule.swiftinterface -module-name OtherModule %t/other.swift -emit-module -o /dev/null
2727
// RUN: %{python} %S/Inputs/make-old.py %t/modulecache/LeafModule-*.swiftmodule %t/OtherModule.swiftinterface
28-
// RUN: %target-swift-frontend -I %t -module-cache-path %t/modulecache -emit-module -o %t/TestModule.swiftmodule -module-name TestModule %s
28+
// RUN: %target-swift-frontend -disable-implicit-concurrency-module-import -I %t -module-cache-path %t/modulecache -emit-module -o %t/TestModule.swiftmodule -module-name TestModule %s
2929
// RUN: %{python} %S/Inputs/make-old.py %t/modulecache/OtherModule-*.swiftmodule
3030
//
3131
//
@@ -38,7 +38,7 @@
3838
// RUN: %{python} %S/Inputs/make-old.py %t/LeafModule.swiftinterface
3939
// RUN: %{python} %S/Inputs/check-is-old.py %t/LeafModule.swiftinterface
4040
// RUN: rm %t/TestModule.swiftmodule
41-
// RUN: %target-swift-frontend -I %t -module-cache-path %t/modulecache -emit-module -o %t/TestModule.swiftmodule -module-name TestModule %s 2>&1 | sed '/WARNING: TRYING Scope exclusively/d' >%t/warn.txt
41+
// RUN: %target-swift-frontend -disable-implicit-concurrency-module-import -I %t -module-cache-path %t/modulecache -emit-module -o %t/TestModule.swiftmodule -module-name TestModule %s 2>&1 | sed '/WARNING: TRYING Scope exclusively/d' >%t/warn.txt
4242
// RUN: %{python} %S/Inputs/check-is-new.py %t/modulecache/OtherModule-*.swiftmodule %t/modulecache/LeafModule-*.swiftmodule
4343
// "check warn.txt exists and is empty"
4444
// RUN: test -e %t/warn.txt -a ! -s %t/warn.txt
@@ -53,7 +53,7 @@
5353
// RUN: %{python} %S/Inputs/make-old.py %t/LeafModule.swiftinterface
5454
// RUN: %{python} %S/Inputs/check-is-old.py %t/LeafModule.swiftinterface
5555
// RUN: rm %t/TestModule.swiftmodule
56-
// RUN: not %target-swift-frontend -I %t -module-cache-path %t/modulecache -emit-module -o %t/TestModule.swiftmodule -module-name TestModule %s >%t/err.txt 2>&1
56+
// RUN: not %target-swift-frontend -disable-implicit-concurrency-module-import -I %t -module-cache-path %t/modulecache -emit-module -o %t/TestModule.swiftmodule -module-name TestModule %s >%t/err.txt 2>&1
5757
// RUN: %{python} %S/Inputs/check-is-old.py %t/modulecache/OtherModule-*.swiftmodule %t/modulecache/LeafModule-*.swiftmodule
5858
// RUN: %FileCheck %s -check-prefix=CHECK-ERROR <%t/err.txt
5959
// CHECK-ERROR: LeafModule.swiftinterface:7:8: error: no such module 'NotAModule'
@@ -66,7 +66,7 @@
6666
//
6767
// RUN: %{python} %S/Inputs/check-is-old.py %t/OtherModule.swiftinterface %t/LeafModule.swiftinterface
6868
// RUN: %{python} %S/Inputs/check-is-old.py %t/modulecache/OtherModule-*.swiftmodule %t/modulecache/LeafModule-*.swiftmodule
69-
// RUN: not %target-swift-frontend -I %t -module-cache-path %t/modulecache -serialize-diagnostics -serialize-diagnostics-path %t/err.dia -emit-module -o %t/TestModule.swiftmodule -module-name TestModule %s
69+
// RUN: not %target-swift-frontend -disable-implicit-concurrency-module-import -I %t -module-cache-path %t/modulecache -serialize-diagnostics -serialize-diagnostics-path %t/err.dia -emit-module -o %t/TestModule.swiftmodule -module-name TestModule %s
7070
// RUN: %{python} %S/Inputs/check-is-old.py %t/modulecache/OtherModule-*.swiftmodule %t/modulecache/LeafModule-*.swiftmodule
7171
// RUN: c-index-test -read-diagnostics %t/err.dia 2>&1 | %FileCheck %s -check-prefix=CHECK-ERROR
7272
//
@@ -78,7 +78,7 @@
7878
// RUN: %{python} %S/Inputs/make-old.py %t/LeafModule.swiftinterface
7979
// RUN: %{python} %S/Inputs/check-is-old.py %t/OtherModule.swiftinterface %t/LeafModule.swiftinterface
8080
// RUN: %{python} %S/Inputs/check-is-old.py %t/modulecache/OtherModule-*.swiftmodule %t/modulecache/LeafModule-*.swiftmodule
81-
// RUN: not %target-swift-frontend -I %t -module-cache-path %t/modulecache -emit-module -o %t/TestModule.swiftmodule -module-name TestModule %s >%t/err-inline.txt 2>&1
81+
// RUN: not %target-swift-frontend -disable-implicit-concurrency-module-import -I %t -module-cache-path %t/modulecache -emit-module -o %t/TestModule.swiftmodule -module-name TestModule %s >%t/err-inline.txt 2>&1
8282
// RUN: %{python} %S/Inputs/check-is-old.py %t/modulecache/OtherModule-*.swiftmodule %t/modulecache/LeafModule-*.swiftmodule
8383
// RUN: %FileCheck %s -check-prefix=CHECK-ERROR-INLINE <%t/err-inline.txt
8484
// CHECK-ERROR-INLINE: LeafModule.swiftinterface:6:33: error: cannot find 'unresolved' in scope
@@ -91,7 +91,7 @@
9191
//
9292
// RUN: %{python} %S/Inputs/check-is-old.py %t/OtherModule.swiftinterface %t/LeafModule.swiftinterface
9393
// RUN: %{python} %S/Inputs/check-is-old.py %t/modulecache/OtherModule-*.swiftmodule %t/modulecache/LeafModule-*.swiftmodule
94-
// RUN: not %target-swift-frontend -I %t -module-cache-path %t/modulecache -serialize-diagnostics -serialize-diagnostics-path %t/err-inline.dia -emit-module -o %t/TestModule.swiftmodule -module-name TestModule %s
94+
// RUN: not %target-swift-frontend -disable-implicit-concurrency-module-import -I %t -module-cache-path %t/modulecache -serialize-diagnostics -serialize-diagnostics-path %t/err-inline.dia -emit-module -o %t/TestModule.swiftmodule -module-name TestModule %s
9595
// RUN: %{python} %S/Inputs/check-is-old.py %t/modulecache/OtherModule-*.swiftmodule %t/modulecache/LeafModule-*.swiftmodule
9696
// RUN: c-index-test -read-diagnostics %t/err-inline.dia 2>&1 | %FileCheck %s -check-prefix=CHECK-ERROR-INLINE
9797

0 commit comments

Comments
 (0)