Skip to content

Commit 747f286

Browse files
committed
ModuleInterface: Adopt new swiftinterface verification lit substitutions pervasively in tests where they can be adopted by simply updating or adding a few RUN: lines.
1 parent 922af42 commit 747f286

File tree

54 files changed

+137
-69
lines changed

Some content is hidden

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

54 files changed

+137
-69
lines changed

test/ClangImporter/clang-function-types.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
// RUN: %target-swift-frontend -typecheck -swift-version 5 -emit-module-interface-path - -sdk %clang-importer-sdk -enable-library-evolution %s -experimental-print-full-convention -use-clang-function-types | %FileCheck %s
1+
// RUN: %target-swift-emit-module-interface(%t.swiftinterface) %s -sdk %clang-importer-sdk -experimental-print-full-convention -use-clang-function-types
2+
// RUN: %target-swift-typecheck-module-from-interface(%t.swiftinterface) -sdk %clang-importer-sdk
3+
// RUN: %FileCheck %s < %t.swiftinterface
24

35
import ctypes
46

test/CrossImport/module-interface.swift

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,22 @@
77
// Should pass with -enable-cross-import-overlays
88
//
99

10-
// RUN: %target-swift-frontend -enable-cross-import-overlays -I %t/lib/swift -typecheck -emit-module-interface-path %t.swiftinterface %s -module-name ClientLibrary -swift-version 5 -enable-library-evolution
10+
// RUN: %target-swift-emit-module-interface(%t.swiftinterface) %s -enable-cross-import-overlays -I %t/lib/swift -module-name ClientLibrary
11+
// RUN: %target-swift-typecheck-module-from-interface(%t.swiftinterface) -enable-cross-import-overlays -I %t/lib/swift -module-name ClientLibrary
1112
// RUN: %FileCheck %s < %t.swiftinterface
1213
// RUN: %FileCheck -check-prefix NEGATIVE %s < %t.swiftinterface
1314

1415
//
1516
// Should fail with -disable-cross-import-overlays
1617
//
1718

18-
// RUN: not %target-swift-frontend -disable-cross-import-overlays -I %t/lib/swift -typecheck -emit-module-interface-path %t.swiftinterface %s -module-name ClientLibrary -swift-version 5 -enable-library-evolution 2>/dev/null
19+
// RUN: not %target-swift-emit-module-interface(%t.swiftinterface) %s -disable-cross-import-overlays -I %t/lib/swift -module-name ClientLibrary 2>/dev/null
1920

2021
//
2122
// Should fail by default
2223
//
2324

24-
// RUN: not %target-swift-frontend -I %t/lib/swift -typecheck -emit-module-interface-path %t.swiftinterface %s -module-name ClientLibrary -swift-version 5 -enable-library-evolution 2>/dev/null
25+
// RUN: not %target-swift-emit-module-interface(%t.swiftinterface) %s -I %t/lib/swift -module-name ClientLibrary -swift-version 5 2>/dev/null
2526

2627

2728
import DeclaringLibrary

test/ModuleInterface/ConstKeyword.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
// RUN: %empty-directory(%t)
22

33
// Ensure the attribute is printed in swiftinterface files
4-
// RUN: %target-swift-frontend-typecheck -emit-module-interface-path %t/Foo.swiftinterface %s -module-name Foo
4+
// RUN: %target-swift-emit-module-interface(%t/Foo.swiftinterface) %s -module-name Foo
5+
// RUN: %target-swift-typecheck-module-from-interface(%t/Foo.swiftinterface) -module-name Foo
56
// RUN: %FileCheck %s < %t/Foo.swiftinterface
67

78
// Ensure the attribute is in .swiftmodule files

test/ModuleInterface/actor_isolation.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
// RUN: %target-swift-frontend -emit-module -o %t/Test.swiftmodule -emit-module-interface-path %t/Test.swiftinterface -module-name Test -enable-experimental-concurrency -I %t %s
55
// RUN: %FileCheck %s < %t/Test.swiftinterface
66
// RUN: %FileCheck %s -check-prefix SYNTHESIZED < %t/Test.swiftinterface
7-
// RUN: %target-swift-frontend -typecheck-module-from-interface -module-name Test %t/Test.swiftinterface -I %t
7+
// RUN: %target-swift-typecheck-module-from-interface(%t/Test.swiftinterface) -module-name Test -I %t
88

99
// RUN: %target-swift-frontend -emit-module -o /dev/null -merge-modules %t/Test.swiftmodule -disable-objc-attr-requires-foundation-module -emit-module-interface-path %t/TestFromModule.swiftinterface -module-name Test -enable-experimental-concurrency -I %t
1010
// RUN: %FileCheck %s < %t/TestFromModule.swiftinterface
11-
// RUN: %target-swift-frontend -typecheck-module-from-interface -module-name Test %t/TestFromModule.swiftinterface -I %t
11+
// RUN: %target-swift-typecheck-module-from-interface(%t/TestFromModule.swiftinterface) -module-name Test -I %t
1212

1313
// REQUIRES: concurrency
1414
import Preconcurrency

test/ModuleInterface/actor_objc.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-swift-frontend -emit-module -o %t/Test.swiftmodule -emit-module-interface-path %t/Test.swiftinterface -module-name Test %s
33
// RUN: %FileCheck %s < %t/Test.swiftinterface
4-
// RUN: %target-swift-frontend -typecheck-module-from-interface -module-name Test %t/Test.swiftinterface
4+
// RUN: %target-swift-typecheck-module-from-interface(%t/Test.swiftinterface) -module-name Test
55

66
// RUN: %target-swift-frontend -emit-module -o /dev/null -merge-modules %t/Test.swiftmodule -disable-objc-attr-requires-foundation-module -emit-module-interface-path %t/TestFromModule.swiftinterface -module-name Test
77
// RUN: %FileCheck %s < %t/TestFromModule.swiftinterface
8-
// RUN: %target-swift-frontend -typecheck-module-from-interface -module-name Test %t/TestFromModule.swiftinterface
8+
// RUN: %target-swift-typecheck-module-from-interface(%t/TestFromModule.swiftinterface) -module-name Test
99

1010
// REQUIRES: concurrency
1111
// REQUIRES: objc_interop

test/ModuleInterface/actor_protocol.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// RUN: %empty-directory(%t)
2-
// RUN: %target-swift-frontend -typecheck -enable-library-evolution -disable-availability-checking -emit-module-interface-path %t/Library.swiftinterface -module-name Library %s
2+
// RUN: %target-swift-emit-module-interface(%t/Library.swiftinterface) %s -disable-availability-checking -module-name Library
3+
// RUN: %target-swift-typecheck-module-from-interface(%t/Library.swiftinterface) -disable-availability-checking -module-name Library
34
// RUN: %FileCheck --check-prefix CHECK-EXTENSION %s <%t/Library.swiftinterface
45
// RUN: %FileCheck --check-prefix CHECK %s <%t/Library.swiftinterface
56
// REQUIRES: concurrency

test/ModuleInterface/availability-expansion.swift

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
// RUN: %empty-directory(%t)
22

3-
// RUN: %target-swift-frontend -swift-version 5 -enable-library-evolution -typecheck -module-name Test -emit-module-interface-path %t/Test.swiftinterface %s -define-availability "_iOS8Aligned:macOS 10.10, iOS 8.0" -define-availability "_iOS9Aligned:macOS 10.11, iOS 9.0" -define-availability "_iOS9:iOS 9.0" -define-availability "_macOS10_11:macOS 10.11" -define-availability "_myProject 1.0:macOS 10.11" -define-availability "_myProject 2.5:macOS 10.12"
3+
// RUN: %target-swift-emit-module-interface(%t/Test.swiftinterface) %s \
4+
// RUN: -define-availability "_iOS8Aligned:macOS 10.10, iOS 8.0" \
5+
// RUN: -define-availability "_iOS9Aligned:macOS 10.11, iOS 9.0" \
6+
// RUN: -define-availability "_iOS9:iOS 9.0" \
7+
// RUN: -define-availability "_macOS10_11:macOS 10.11" \
8+
// RUN: -define-availability "_myProject 1.0:macOS 10.11" \
9+
// RUN: -define-availability "_myProject 2.5:macOS 10.12"
10+
// RUN: %target-swift-typecheck-module-from-interface(%t/Test.swiftinterface)
411
// RUN: %FileCheck %s < %t/Test.swiftinterface
512

613
@available(_iOS8Aligned, *)

test/ModuleInterface/closure.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// RUN: %empty-directory(%t)
22

3-
// RUN: %target-swift-frontend -typecheck %s -emit-module-interface-path %t/main.swiftinterface -enable-library-evolution
3+
// RUN: %target-swift-emit-module-interface(%t/main.swiftinterface) %s
4+
// RUN: %target-swift-typecheck-module-from-interface(%t/main.swiftinterface)
45
// RUN: %FileCheck %s < %t/main.swiftinterface
56

67
// CHECK: import Swift

test/ModuleInterface/concurrency.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// RUN: %empty-directory(%t)
2-
// RUN: %target-swift-frontend -typecheck -enable-library-evolution -enable-experimental-concurrency -emit-module-interface-path %t/Library.swiftinterface -DLIBRARY -module-name Library %s
2+
// RUN: %target-swift-emit-module-interface(%t/Library.swiftinterface) %s -enable-experimental-concurrency -DLIBRARY -module-name Library
3+
// RUN: %target-swift-typecheck-module-from-interface(%t/Library.swiftinterface) -enable-experimental-concurrency
34

45
// REQUIRES: concurrency
56

@@ -36,5 +37,6 @@ func callFn() async {
3637
// CHECK: public func reasyncFn(_: () async -> ()) reasync
3738
// CHECK: public func takesSendable(_ block: @escaping @Sendable () async throws ->
3839

39-
// RUN: %target-swift-frontend -typecheck -enable-library-evolution -enable-experimental-concurrency -emit-module-interface-path %t/Library.swiftinterface -DLIBRARY -module-name Library %s -module-interface-preserve-types-as-written
40+
// RUN: %target-swift-emit-module-interface(%t/Library.swiftinterface) %s -enable-experimental-concurrency -DLIBRARY -module-name Library -module-interface-preserve-types-as-written
41+
// RUN: %target-swift-typecheck-module-from-interface(%t/Library.swiftinterface) -enable-experimental-concurrency
4042
// RUN: %FileCheck %s <%t/Library.swiftinterface

test/ModuleInterface/consuming.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %empty-directory(%t/missing)
33
// RUN: %empty-directory(%t/inputs)
4-
// RUN: %target-swift-frontend -emit-module-path %t/missing/Foo.swiftmodule -enable-library-evolution -emit-module-interface-path %t/inputs/Foo.swiftinterface -enable-objc-interop -disable-objc-attr-requires-foundation-module -module-name Foo %s
5-
// RUN: %FileCheck --input-file %t/inputs/Foo.swiftinterface %s
4+
// RUN: %target-swift-frontend -emit-module-path %t/missing/Foo.swiftmodule -swift-version 5 -enable-library-evolution -emit-module-interface-path %t/inputs/Foo.swiftinterface -enable-objc-interop -disable-objc-attr-requires-foundation-module -module-name Foo %s
5+
// RUN: %target-swift-typecheck-module-from-interface(%t/inputs/Foo.swiftinterface)
6+
// RUN: %FileCheck %s < %t/inputs/Foo.swiftinterface
67

78
// RUN: touch %t/Bar.swift
89
// RUN: echo "import Foo" > %t/Bar.swift

0 commit comments

Comments
 (0)