Skip to content

Commit 02e2874

Browse files
committed
[ModuleInterface] Test that we accept all access-level modifiers in swiftinterfaces
1 parent 3496a74 commit 02e2874

File tree

1 file changed

+17
-8
lines changed

1 file changed

+17
-8
lines changed

test/Sema/access-level-import-flag-check.swift

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,16 @@
22
// RUN: split-file %s %t
33

44
/// Build the libraries.
5-
// RUN: %target-swift-frontend -emit-module %t/PublicLib.swift -o %t
6-
// RUN: %target-swift-frontend -emit-module %t/PackageLib.swift -o %t
7-
// RUN: %target-swift-frontend -emit-module %t/InternalLib.swift -o %t
8-
// RUN: %target-swift-frontend -emit-module %t/FileprivateLib.swift -o %t
9-
// RUN: %target-swift-frontend -emit-module %t/PrivateLib.swift -o %t
5+
// RUN: %target-swift-frontend -emit-module %t/PublicLib.swift -o %t \
6+
// RUN: -enable-library-evolution
7+
// RUN: %target-swift-frontend -emit-module %t/PackageLib.swift -o %t \
8+
// RUN: -enable-library-evolution
9+
// RUN: %target-swift-frontend -emit-module %t/InternalLib.swift -o %t \
10+
// RUN: -enable-library-evolution
11+
// RUN: %target-swift-frontend -emit-module %t/FileprivateLib.swift -o %t \
12+
// RUN: -enable-library-evolution
13+
// RUN: %target-swift-frontend -emit-module %t/PrivateLib.swift -o %t \
14+
// RUN: -enable-library-evolution
1015

1116
/// Check flag requirement, without and with the flag.
1217
// RUN: %target-swift-frontend -typecheck %t/ClientWithoutTheFlag.swift -I %t -verify \
@@ -17,7 +22,7 @@
1722
// REQUIRES: asserts
1823

1924
/// swiftinterfaces don't need the flag.
20-
// RUN: %target-swift-typecheck-module-from-interface(%t/Client.swiftinterface)
25+
// RUN: %target-swift-typecheck-module-from-interface(%t/Client.swiftinterface) -I %t
2126

2227
//--- PublicLib.swift
2328
//--- PackageLib.swift
@@ -34,5 +39,9 @@ private import PrivateLib // expected-error@:1 {{Access level on imports require
3439

3540
//--- Client.swiftinterface
3641
// swift-interface-format-version: 1.0
37-
// swift-module-flags: -enable-library-evolution
38-
public import Swift
42+
// swift-module-flags: -enable-library-evolution -package-name MyPackage
43+
public import PublicLib
44+
package import PackageLib
45+
internal import InternalLib
46+
fileprivate import FileprivateLib
47+
private import PrivateLib

0 commit comments

Comments
 (0)