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

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 {}

test/ModuleInterface/empty-extension.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
// RUN: %target-swift-frontend -emit-module %s -DEXPORTED_LIB -module-name IndirectLib -emit-module-path %t/IndirectLib.swiftmodule -I %t
77
// RUN: %target-swift-frontend -emit-module %s -DLIB -module-name Lib -emit-module-path %t/Lib.swiftmodule -I %t
88

9-
// RUN: %target-swift-frontend-typecheck -emit-module-interface-path %t/out.swiftinterface %s -I %t -swift-version 5 -enable-library-evolution
9+
// RUN: %target-swift-emit-module-interface(%t/out.swiftinterface) %s -I %t -module-name Test
10+
// RUN: %target-swift-typecheck-module-from-interface(%t/out.swiftinterface) -I %t -module-name Test
1011
// RUN: %FileCheck %s < %t/out.swiftinterface
1112

1213
// REQUIRES: OS=macosx

test/ModuleInterface/exported-module-name.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// RUN: %empty-directory(%t)
2-
// RUN: %target-swift-frontend -typecheck -emit-module-interface-path %t/CoreKitClient.swiftinterface -module-name CoreKitClient -I %S/Inputs/exported-module-name-before %s
2+
// RUN: %target-swift-emit-module-interface(%t/CoreKitClient.swiftinterface) %s -module-name CoreKitClient -I %S/Inputs/exported-module-name-before
33
// RUN: %FileCheck -implicit-check-not BAD %s < %t/CoreKitClient.swiftinterface
44

55
// Test that we can rebuild it even when the "export as" module goes away.
6-
// RUN: %target-swift-frontend -compile-module-from-interface -o %t/CoreKitClient.swiftmodule -I %S/Inputs/exported-module-name-after %t/CoreKitClient.swiftinterface
6+
// RUN: %target-swift-typecheck-module-from-interface(%t/CoreKitClient.swiftinterface) -module-name CoreKitClient -I %S/Inputs/exported-module-name-after
77

88
// CHECK: import CoreKit
99
import CoreKit

test/ModuleInterface/features.swift

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

3-
// RUN: %target-swift-frontend -typecheck -swift-version 5 -module-name FeatureTest -emit-module-interface-path %t/FeatureTest.swiftinterface -enable-library-evolution -disable-availability-checking %s
3+
// RUN: %target-swift-emit-module-interface(%t/FeatureTest.swiftinterface) %s -module-name FeatureTest -disable-availability-checking
4+
// RUN: %target-swift-typecheck-module-from-interface(%t/FeatureTest.swiftinterface) -module-name FeatureTest -disable-availability-checking
45
// RUN: %FileCheck %s < %t/FeatureTest.swiftinterface
5-
// RUN: %target-swift-frontend -typecheck-module-from-interface -disable-availability-checking -swift-version 5 -module-name FeatureTest %t/FeatureTest.swiftinterface
66

77
// REQUIRES: concurrency
88

test/ModuleInterface/iboutlet-private-set.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// REQUIRES: objc_interop
22

33
// RUN: %empty-directory(%t)
4-
// RUN: %target-swift-frontend -typecheck -enable-library-evolution -disable-objc-attr-requires-foundation-module -module-name Foo -emit-module-interface-path %t/Foo.swiftinterface %s
5-
// RUN: %FileCheck %s -input-file %t/Foo.swiftinterface
6-
// RUN: %target-swift-frontend -compile-module-from-interface %t/Foo.swiftinterface -o %t/Foo.swiftmodule -module-name Foo
4+
// RUN: %target-swift-emit-module-interface(%t/Foo.swiftinterface) %s -disable-objc-attr-requires-foundation-module -module-name Foo
5+
// RUN: %FileCheck %s < %t/Foo.swiftinterface
6+
// RUN: %target-swift-typecheck-module-from-interface(%t/Foo.swiftinterface) -module-name Foo
77

88
// Test the interface we generate for @IBOutlet private(set) properties is
99
// consumable.

test/ModuleInterface/if-configs.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
// RUN: %target-swift-frontend -merge-modules -emit-module -o %t/Test.swiftmodule %t/Test~partial.swiftmodule
44
// RUN: %target-swift-ide-test -print-module -module-to-print=Test -source-filename=x -I %t -prefer-type-repr=false -fully-qualified-types=true | %FileCheck %s
55

6-
// RUN: %target-swift-frontend -typecheck -emit-module-interface-path %t.swiftinterface -enable-library-evolution %s
6+
// RUN: %target-swift-emit-module-interface(%t.swiftinterface) %s
7+
// RUN: %target-swift-typecheck-module-from-interface(%t.swiftinterface)
78
// RUN: %FileCheck %s < %t.swiftinterface
89

910
// CHECK: func hasClosureDefaultArgWithComplexNestedPoundIfs(_ x: () -> Swift.Void = {

test/ModuleInterface/imports.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-swift-frontend -disable-implicit-concurrency-module-import -emit-module -o %t/empty.swiftmodule %S/../Inputs/empty.swift
33
// RUN: %target-swift-frontend -disable-implicit-concurrency-module-import -emit-module -o %t/emptyButWithLibraryEvolution.swiftmodule %S/../Inputs/empty.swift -enable-library-evolution
4-
// RUN: %target-swift-frontend -disable-implicit-concurrency-module-import -typecheck -emit-module-interface-path - %s %S/Inputs/imports-other.swift -I %S/Inputs/imports-clang-modules/ -I %t -verify -swift-version 5 -enable-library-evolution | %FileCheck -implicit-check-not BAD %s
4+
// RUN: %target-swift-emit-module-interface(%t.swiftinterface) %s %S/Inputs/imports-other.swift -disable-implicit-concurrency-module-import -I %S/Inputs/imports-clang-modules/ -I %t -verify
5+
// RUN: %target-swift-typecheck-module-from-interface(%t.swiftinterface) -I %S/Inputs/imports-clang-modules/ -I %t
6+
// RUN: %FileCheck -implicit-check-not BAD %s < %t.swiftinterface
57

68

79
@_exported import empty // expected-warning {{module 'empty' was not compiled with library evolution support; using it means binary compatibility for 'imports' can't be guaranteed}}

test/ModuleInterface/indirect-conformance-implementation-only.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
// RUN: %target-swift-frontend -emit-module %t/SecretLib.swift -o %t/SecretLib.swiftmodule
55
// RUN: %target-swift-frontend -emit-module %t/Client.swift -I %t -emit-module-interface-path %t/Client.swiftinterface -enable-library-evolution -swift-version 5
6+
// RUN: %target-swift-typecheck-module-from-interface(%t/Client.swiftinterface)
67

78
/// The indirect conformance of `s` to `_p` should not be printed. (rdar://78718838)
89
// RUN: cat %t/Client.swiftinterface | %FileCheck %s

test/ModuleInterface/inherited-defaults-execution.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,13 @@
88
//
99
// RUN: %target-build-swift-dylib(%t/%target-library-name(Inherited)) -emit-module-path %t/Inherited.swiftmodule -emit-module-interface-path %t/Inherited.swiftinterface -module-name Inherited %s
1010
// RUN: rm %t/Inherited.swiftmodule
11+
// RUN: %target-swift-typecheck-module-from-interface(%t/Inherited.swiftinterface)
1112

1213
// 2) Check the interface includes the synthesized initializers of the base
1314
// class in the derived class explicitly and uses the '= super' syntax to
1415
// inherit its default arguments.
1516
//
16-
// RUN: cat %t/Inherited.swiftinterface | %FileCheck --check-prefix=INTERFACE %s
17+
// RUN: %FileCheck --check-prefix=INTERFACE %s < %t/Inherited.swiftinterface
1718
//
1819
// INTERFACE: public class Base {
1920
// INTERFACE: public init(x: Swift.Int = 45, y: Swift.Int = 98)

test/ModuleInterface/inherits-superclass-initializers.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
// RUN: %empty-directory(%t)
44

5-
// RUN: %target-swift-frontend -typecheck %s -emit-module-interface-path %t/Module.swiftinterface -module-name Module -enable-library-evolution
5+
// RUN: %target-swift-emit-module-interface(%t/Module.swiftinterface) %s -module-name Module
6+
// RUN: %target-swift-typecheck-module-from-interface(%t/Module.swiftinterface) -module-name Module
67
// RUN: %FileCheck %s < %t/Module.swiftinterface
78

89
// CHECK: @_hasMissingDesignatedInitializers open class Base {

test/ModuleInterface/inlinable-function.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
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 --check-prefix FROMSOURCE --check-prefix CHECK < %t/Test.swiftinterface
4+
// RUN: %target-swift-typecheck-module-from-interface(%t/Test.swiftinterface) -module-name Test
45
// 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
6+
// RUN: %target-swift-typecheck-module-from-interface(%t/TestFromModule.swiftinterface) -module-name Test
57
// RUN: %FileCheck %s --check-prefix FROMMODULE --check-prefix CHECK < %t/TestFromModule.swiftinterface
68

79
// CHECK-LABEL: public struct Foo : Swift.Hashable {

test/ModuleInterface/loading-remarks.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
/// Create a simple module and interface.
55
// RUN: echo 'public func publicFunction() {}' > %t/TestModule.swift
6-
// RUN: %target-swift-frontend -typecheck %t/TestModule.swift -emit-module-interface-path %t/TestModule.swiftinterface -swift-version 5
6+
// RUN: %target-swift-emit-module-interface(%t/TestModule.swiftinterface) %t/TestModule.swift
77

88
/// Use -Rmodule-loading in a client and look for the diagnostics output.
99
// RUN: %target-swift-frontend -typecheck %s -I %t -Rmodule-loading 2>&1 | %FileCheck %s

test/ModuleInterface/member-typealias.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 -emit-module-interface-path - %s -enable-library-evolution -module-name MyModule | %FileCheck %s --check-prefix CHECK
1+
// RUN: %target-swift-emit-module-interface(%t.swiftinterface) %s -module-name MyModule
2+
// RUN: %target-swift-typecheck-module-from-interface(%t.swiftinterface) -module-name MyModule
3+
// RUN: %FileCheck %s < %t.swiftinterface
24

35
public struct MyStruct<T> {
46
// CHECK-LABEL: public struct MyStruct<T> {

test/ModuleInterface/modifiers.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
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 -disable-objc-attr-requires-foundation-module -enable-objc-interop %s
3+
// RUN: %target-swift-typecheck-module-from-interface(%t/Test.swiftinterface) -module-name Test
34
// RUN: %FileCheck %s --check-prefix FROMSOURCE --check-prefix CHECK < %t/Test.swiftinterface
45
// RUN: %target-swift-frontend -emit-module -o /dev/null -merge-modules %t/Test.swiftmodule -disable-objc-attr-requires-foundation-module -emit-module-interface-path - -module-name Test -enable-objc-interop | %FileCheck %s --check-prefix FROMMODULE --check-prefix CHECK
56

test/ModuleInterface/module_shadowing.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@
22

33
// Build modules imported by this file.
44
// RUN: %empty-directory(%t/lib)
5-
// RUN: %target-swift-frontend -typecheck -parse-stdlib -module-cache-path %t/mcp -emit-module-interface-path %t/lib/ShadowyHorror.swiftinterface %S/Inputs/ShadowyHorror.swift -enable-library-evolution -module-name ShadowyHorror -swift-version 5
6-
// RUN: %target-swift-frontend -typecheck -parse-stdlib -emit-module-interface-path %t/lib/TestModule.swiftinterface %S/Inputs/TestModule.swift -enable-library-evolution -module-name TestModule -swift-version 5
5+
// RUN: %target-swift-emit-module-interface(%t/lib/ShadowyHorror.swiftinterface) %S/Inputs/ShadowyHorror.swift -parse-stdlib -module-cache-path %t/mcp -module-name ShadowyHorror
6+
// RUN: %target-swift-typecheck-module-from-interface(%t/lib/ShadowyHorror.swiftinterface) -module-name ShadowyHorror
7+
// RUN: %target-swift-emit-module-interface(%t/lib/TestModule.swiftinterface) %S/Inputs/TestModule.swift -parse-stdlib -module-name TestModule
8+
// RUN: %target-swift-typecheck-module-from-interface(%t/lib/TestModule.swiftinterface) -module-name TestModule
79

810
// Build this file as a module and check that it emits the expected warnings.
911
// RUN: %empty-directory(%t/subtest-1)

0 commit comments

Comments
 (0)