Skip to content

Commit 1a600f4

Browse files
authored
Merge pull request #42351 from tshortli/adopt-interface-verification-in-more-tests
ModuleInterface: Enable interface verification in more tests
2 parents 9365af6 + 747f286 commit 1a600f4

File tree

70 files changed

+260
-151
lines changed

Some content is hidden

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

70 files changed

+260
-151
lines changed

docs/Testing.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,17 @@ code for the target that is not the build machine:
338338
* ``%target-swift-autolink-extract``: run ``swift-autolink-extract`` for the
339339
target to extract its autolink flags on platforms that support them (when the
340340
autolink-extract feature flag is set)
341+
342+
* ``%target-swift-emit-module-interface(`` *swift interface path* ``)``
343+
*other arguments*: run ``swift-frontend`` for the target, emitting a
344+
swiftinterface to the given path and passing additional default flags
345+
appropriate for resilient frameworks.
346+
347+
* ``%target-swift-typecheck-module-from-interface(`` *swift interface path*
348+
``)`` *other arguments*: run ``swift-frontend`` for the target, verifying
349+
the swiftinterface at the given path and passing additional default flags
350+
appropriate for resilient frameworks. Designed to be used in combination with
351+
``%target-swift-emit-module-interface()``.
341352

342353
* ``%target-clang``: run the system's ``clang++`` for the target.
343354

test/AutoDiff/ModuleInterface/differentiation.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
// RUN: %target-swift-frontend -typecheck -emit-module-interface-path %t.swiftinterface -enable-library-evolution %s
1+
// RUN: %target-swift-emit-module-interface(%t.swiftinterface) %s
2+
// RUN: %target-swift-typecheck-module-from-interface(%t.swiftinterface)
23
// RUN: %FileCheck %s < %t.swiftinterface
34

45
import _Differentiation

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/access-filter.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
// RUN: %target-swift-frontend -typecheck -emit-module-interface-path %t.swiftinterface %s -module-name AccessFilter -requirement-machine-inferred-signatures=on
1+
// RUN: %target-swift-emit-module-interface(%t.swiftinterface) %s -module-name AccessFilter -requirement-machine-inferred-signatures=on
2+
// RUN: %target-swift-typecheck-module-from-interface(%t.swiftinterface) -module-name AccessFilter
23
// RUN: %FileCheck %s < %t.swiftinterface
34
// RUN: %FileCheck -check-prefix NEGATIVE %s < %t.swiftinterface
45

@@ -109,7 +110,7 @@ extension UFIProto {
109110

110111
// CHECK: extension AccessFilter.PublicStruct {{[{]$}}
111112
extension PublicStruct {
112-
// CHECK: @_hasInitialValue public static var secretlySettable: Swift.Int {
113+
// CHECK: public static var secretlySettable: Swift.Int {
113114
// CHECK-NEXT: get
114115
// CHECK-NEXT: }
115116
public private(set) static var secretlySettable: Int = 0
@@ -123,12 +124,11 @@ extension InternalStruct_BAD: PublicProto {
123124
// CHECK: extension AccessFilter.UFIStruct : AccessFilter.PublicProto {{[{]$}}
124125
extension UFIStruct: PublicProto {
125126
// CHECK-NEXT: @usableFromInline
126-
// CHECK-NEXT: internal typealias Assoc = Swift.Int
127-
128-
// FIXME: Is it okay for this non-@usableFromInline implementation to satisfy
129-
// the protocol?
130-
func requirement() {}
127+
// CHECK-NEXT: internal func requirement()
128+
@usableFromInline func requirement() {}
131129
internal static var dummy: Int { return 0 }
130+
// CHECK-NEXT: @usableFromInline
131+
// CHECK-NEXT: internal typealias Assoc = Swift.Int
132132
} // CHECK-NEXT: {{^[}]$}}
133133

134134
// CHECK: public enum PublicEnum {{[{]$}}

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/attrs.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
// RUN: %target-swift-frontend -typecheck -emit-module-interface-path %t.swiftinterface -enable-library-evolution %s
1+
// RUN: %target-swift-emit-module-interface(%t.swiftinterface) %s -module-name attrs
2+
// RUN: %target-swift-typecheck-module-from-interface(%t.swiftinterface) -module-name attrs
23
// RUN: %FileCheck %s < %t.swiftinterface
34

45
// CHECK: @_transparent public func glass() -> Swift.Int { return 0 }{{$}}

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/Frontend/emit-interface-macos-canonical-version.swift renamed to test/ModuleInterface/availability-macos-canonical-version.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// RUN: %empty-directory(%t)
2-
// RUN: %target-swift-frontend -typecheck %s -enable-library-evolution -emit-module-interface-path %t/Module.swiftinterface -experimental-skip-non-inlinable-function-bodies
3-
// RUN: %FileCheck %s --check-prefixes CHECK < %t/Module.swiftinterface
2+
// RUN: %target-swift-emit-module-interface(%t/Module.swiftinterface) %s
3+
// RUN: %target-swift-typecheck-module-from-interface(%t/Module.swiftinterface)
4+
// RUN: %FileCheck %s < %t/Module.swiftinterface
45

56
// REQUIRES: OS=macosx
67

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// RUN: %empty-directory(%t)
2-
// RUN: echo '@available(macOS 12.0, iOS 15.0, macCatalyst 15.0, *)' > %t/Foo.swift
3-
// RUN: echo 'public struct Foo {}' >> %t/Foo.swift
4-
5-
// RUN: %target-swift-frontend -emit-module -emit-module-interface-path %t/Foo.swiftinterface -enable-library-evolution %t/Foo.swift
2+
// RUN: %target-swift-emit-module-interface(%t/Foo.swiftinterface) %s
3+
// RUN: %target-swift-typecheck-module-from-interface(%t/Foo.swiftinterface)
64
// RUN: %FileCheck %s < %t/Foo.swiftinterface
75

86
// CHECK: macCatalyst
7+
@available(macOS 12.0, iOS 15.0, macCatalyst 15.0, *)
8+
public struct Foo {}
Lines changed: 17 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,46 @@
11
// RUN: %empty-directory(%t)
2-
3-
// Ensure @_backDeploy attributes and function bodies are printed in
4-
// swiftinterface files.
5-
// RUN: %target-swiftc_driver -emit-module -o %t/Test.swiftmodule -emit-module-interface-path %t/Test.swiftinterface %s -enable-library-evolution -verify-emitted-module-interface -module-name Test \
6-
// RUN: -Xfrontend -define-availability -Xfrontend "_macOS12_1:macOS 12.1" \
7-
// RUN: -Xfrontend -define-availability -Xfrontend "_myProject 1.0:macOS 12.1, iOS 15.1"
8-
// RUN: %FileCheck %s --check-prefix FROMSOURCE --check-prefix CHECK < %t/Test.swiftinterface
9-
10-
// FIXME(backDeploy): Remove this step in favor of a test that exercises using
11-
// a back deployed API from a test library so that we can avoid -merge-modules
12-
13-
// Ensure @_backDeploy attributes and function bodies are present after
14-
// deserializing .swiftmodule files.
15-
// 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 \
2+
// RUN: %target-swift-emit-module-interface(%t/Test.swiftinterface) %s \
163
// RUN: -define-availability "_macOS12_1:macOS 12.1" \
174
// RUN: -define-availability "_myProject 1.0:macOS 12.1, iOS 15.1"
18-
// RUN: %FileCheck %s --check-prefix FROMMODULE --check-prefix CHECK < %t/TestFromModule.swiftinterface
5+
// RUN: %target-swift-typecheck-module-from-interface(%t/Test.swiftinterface)
6+
// RUN: %FileCheck %s < %t/Test.swiftinterface
197

208
public struct TopLevelStruct {
219
// CHECK: @_backDeploy(before: macOS 12.0)
22-
// FROMSOURCE: public func backDeployedFunc_SinglePlatform() -> Swift.Int { return 42 }
23-
// FROMMODULE: public func backDeployedFunc_SinglePlatform() -> Swift.Int
10+
// CHECK: public func backDeployedFunc_SinglePlatform() -> Swift.Int { return 42 }
2411
@available(macOS 11.0, *)
2512
@_backDeploy(before: macOS 12.0)
2613
public func backDeployedFunc_SinglePlatform() -> Int { return 42 }
2714

2815
// CHECK: @_backDeploy(before: macOS 12.0)
2916
// CHECK: @_backDeploy(before: iOS 15.0)
30-
// FROMSOURCE: public func backDeployedFunc_MultiPlatform() -> Swift.Int { return 43 }
31-
// FROMMODULE: public func backDeployedFunc_MultiPlatform() -> Swift.Int
17+
// CHECK: public func backDeployedFunc_MultiPlatform() -> Swift.Int { return 43 }
3218
@available(macOS 11.0, iOS 14.0, *)
3319
@_backDeploy(before: macOS 12.0, iOS 15.0)
3420
public func backDeployedFunc_MultiPlatform() -> Int { return 43 }
3521

3622
// CHECK: @_backDeploy(before: macOS 12.0)
37-
// FROMSOURCE: public var backDeployedComputedProperty: Swift.Int {
38-
// FROMSOURCE: get { 44 }
39-
// FROMSOURCE: }
40-
// FROMMODULE: public var backDeployedComputedProperty: Swift.Int
23+
// CHECK: public var backDeployedComputedProperty: Swift.Int {
24+
// CHECK: get { 44 }
25+
// CHECK: }
4126
@available(macOS 11.0, *)
4227
@_backDeploy(before: macOS 12.0)
4328
public var backDeployedComputedProperty: Int { 44 }
4429

4530
// CHECK: @_backDeploy(before: macOS 12.0)
46-
// FROMSOURCE: public var backDeployedPropertyWithAccessors: Swift.Int {
47-
// FROMSOURCE: get { 45 }
48-
// FROMSOURCE: }
49-
// FROMMODULE: public var backDeployedPropertyWithAccessors: Swift.Int
31+
// CHECK: public var backDeployedPropertyWithAccessors: Swift.Int {
32+
// CHECK: get { 45 }
33+
// CHECK: }
5034
@available(macOS 11.0, *)
5135
@_backDeploy(before: macOS 12.0)
5236
public var backDeployedPropertyWithAccessors: Int {
5337
get { 45 }
5438
}
5539

5640
// CHECK: @_backDeploy(before: macOS 12.0)
57-
// FROMSOURCE: public subscript(index: Swift.Int) -> Swift.Int {
58-
// FROMSOURCE: get { 46 }
59-
// FROMSOURCE: }
60-
// FROMMODULE: public subscript(index: Swift.Int) -> Swift.Int
41+
// CHECK: public subscript(index: Swift.Int) -> Swift.Int {
42+
// CHECK: get { 46 }
43+
// CHECK: }
6144
@available(macOS 11.0, *)
6245
@_backDeploy(before: macOS 12.0)
6346
public subscript(index: Int) -> Int {
@@ -66,25 +49,22 @@ public struct TopLevelStruct {
6649
}
6750

6851
// CHECK: @_backDeploy(before: macOS 12.0)
69-
// FROMSOURCE: public func backDeployTopLevelFunc1() -> Swift.Int { return 47 }
70-
// FROMMODULE: public func backDeployTopLevelFunc1() -> Swift.Int
52+
// CHECK: public func backDeployTopLevelFunc1() -> Swift.Int { return 47 }
7153
@available(macOS 11.0, *)
7254
@_backDeploy(before: macOS 12.0)
7355
public func backDeployTopLevelFunc1() -> Int { return 47 }
7456

7557
// MARK: - Availability macros
7658

7759
// CHECK: @_backDeploy(before: macOS 12.1)
78-
// FROMSOURCE: public func backDeployTopLevelFunc2() -> Swift.Int { return 48 }
79-
// FROMMODULE: public func backDeployTopLevelFunc2() -> Swift.Int
60+
// CHECK: public func backDeployTopLevelFunc2() -> Swift.Int { return 48 }
8061
@available(macOS 11.0, *)
8162
@_backDeploy(before: _macOS12_1)
8263
public func backDeployTopLevelFunc2() -> Int { return 48 }
8364

8465
// CHECK: @_backDeploy(before: macOS 12.1)
8566
// CHECK: @_backDeploy(before: iOS 15.1)
86-
// FROMSOURCE: public func backDeployTopLevelFunc3() -> Swift.Int { return 49 }
87-
// FROMMODULE: public func backDeployTopLevelFunc3() -> Swift.Int
67+
// CHECK: public func backDeployTopLevelFunc3() -> Swift.Int { return 49 }
8868
@available(macOS 11.0, iOS 14.0, *)
8969
@_backDeploy(before: _myProject 1.0)
9070
public func backDeployTopLevelFunc3() -> Int { return 49 }

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/conformances.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
// RUN: %target-swift-frontend-typecheck -emit-module-interface-path %t.swiftinterface %s
1+
// RUN: %target-swift-emit-module-interface(%t.swiftinterface) %s -module-name conformances
2+
// RUN: %target-swift-typecheck-module-from-interface(%t.swiftinterface) -module-name conformances
23
// RUN: %FileCheck %s < %t.swiftinterface
34
// RUN: %FileCheck -check-prefix CHECK-END %s < %t.swiftinterface
45
// RUN: %FileCheck -check-prefix NEGATIVE %s < %t.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

test/ModuleInterface/effectful_properties.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
// RUN: %target-swift-frontend -typecheck -swift-version 5 -enable-library-evolution -emit-module-interface-path %t.swiftinterface %s -module-name EffProps -disable-availability-checking
1+
// RUN: %target-swift-emit-module-interface(%t.swiftinterface) %s -module-name EffProps -disable-availability-checking
2+
// RUN: %target-swift-typecheck-module-from-interface(%t.swiftinterface) -module-name EffProps -disable-availability-checking
23
// RUN: %FileCheck %s < %t.swiftinterface
34

45
public struct MyStruct {}

0 commit comments

Comments
 (0)