mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[Tests] Remove the flag AccessLevelOnImport from all tests but one
This commit is contained in:
@@ -22,8 +22,7 @@
|
||||
// RUN: -package-name TestPackage \
|
||||
// RUN: -enable-library-evolution -swift-version 5 \
|
||||
// RUN: -emit-module-interface-path %t/Client.swiftinterface \
|
||||
// RUN: -emit-private-module-interface-path %t/Client.private.swiftinterface \
|
||||
// RUN: -enable-experimental-feature AccessLevelOnImport
|
||||
// RUN: -emit-private-module-interface-path %t/Client.private.swiftinterface
|
||||
|
||||
// RUN: %target-swift-typecheck-module-from-interface(%t/Client.swiftinterface) -I %t
|
||||
// RUN: %target-swift-typecheck-module-from-interface(%t/Client.private.swiftinterface) -I %t \
|
||||
@@ -37,8 +36,7 @@
|
||||
// RUN: -package-name TestPackage \
|
||||
// RUN: -enable-library-evolution -swift-version 5 \
|
||||
// RUN: -emit-module-interface-path %t/MultiFiles.swiftinterface \
|
||||
// RUN: -emit-private-module-interface-path %t/MultiFiles.private.swiftinterface \
|
||||
// RUN: -enable-experimental-feature AccessLevelOnImport
|
||||
// RUN: -emit-private-module-interface-path %t/MultiFiles.private.swiftinterface
|
||||
|
||||
// RUN: %target-swift-typecheck-module-from-interface(%t/MultiFiles.swiftinterface) -I %t
|
||||
// RUN: %target-swift-typecheck-module-from-interface(%t/MultiFiles.private.swiftinterface) -I %t \
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
@testable import Foo
|
||||
|
||||
// Step 1: build swift interface and swift module side by side, make them testable
|
||||
// RUN: %target-swift-frontend -emit-module %t/Foo.swift -emit-module-path %t/Foo.swiftmodule/%target-swiftmodule-name -module-name Foo -emit-module-interface-path %t/Foo.swiftmodule/%target-swiftinterface-name -I %S/Inputs/CHeaders -I %S/Inputs/Swift -enable-testing -enable-experimental-feature AccessLevelOnImport
|
||||
// RUN: %target-swift-frontend -emit-module %t/Foo.swift -emit-module-path %t/Foo.swiftmodule/%target-swiftmodule-name -module-name Foo -emit-module-interface-path %t/Foo.swiftmodule/%target-swiftinterface-name -I %S/Inputs/CHeaders -I %S/Inputs/Swift -enable-testing
|
||||
|
||||
// Step 2: scan dependencies
|
||||
// RUN: %target-swift-frontend -scan-dependencies %s -o %t/deps.json -I %t -sdk %t -prebuilt-module-cache-path %t/clang-module-cache -I %S/Inputs/CHeaders -I %S/Inputs/Swift
|
||||
|
||||
@@ -6,8 +6,7 @@
|
||||
// RUN: %target-swift-frontend -emit-module %t/ConformanceDefinition.swift -o %t -I %t
|
||||
|
||||
/// Check diagnostics.
|
||||
// RUN: %target-swift-frontend -typecheck -verify %t/Client.swift -I %t \
|
||||
// RUN: -enable-experimental-feature AccessLevelOnImport
|
||||
// RUN: %target-swift-frontend -typecheck -verify %t/Client.swift -I %t
|
||||
|
||||
//--- ConformanceBaseTypes.swift
|
||||
public protocol Proto {}
|
||||
|
||||
@@ -14,14 +14,11 @@
|
||||
|
||||
/// Check diagnostics.
|
||||
// RUN: %target-swift-frontend -typecheck %t/Client.swift -I %t \
|
||||
// RUN: -enable-experimental-feature AccessLevelOnImport -verify \
|
||||
// RUN: -package-name pkg
|
||||
// RUN: -package-name pkg -verify
|
||||
// RUN: %target-swift-frontend -typecheck %t/PackageTypeImportedAsPackageClient.swift -I %t \
|
||||
// RUN: -enable-experimental-feature AccessLevelOnImport -verify \
|
||||
// RUN: -package-name pkg
|
||||
// RUN: -package-name pkg -verify
|
||||
// RUN: %target-swift-frontend -typecheck %t/LocalVsImportClient.swift -I %t \
|
||||
// RUN: -enable-experimental-feature AccessLevelOnImport -verify \
|
||||
// RUN: -package-name pkg
|
||||
// RUN: -package-name pkg -verify
|
||||
|
||||
//--- PublicLib.swift
|
||||
public struct PublicImportType {}
|
||||
|
||||
@@ -15,21 +15,17 @@
|
||||
|
||||
/// Check diagnostics.
|
||||
// RUN: %target-swift-frontend -typecheck %t/MinimalClient.swift -I %t \
|
||||
// RUN: -package-name TestPackage -swift-version 5 \
|
||||
// RUN: -enable-experimental-feature AccessLevelOnImport -verify
|
||||
// RUN: -package-name TestPackage -swift-version 5 -verify
|
||||
// RUN: %target-swift-frontend -typecheck %t/CompletenessClient.swift -I %t \
|
||||
// RUN: -package-name TestPackage -swift-version 5 \
|
||||
// RUN: -enable-experimental-feature AccessLevelOnImport -verify
|
||||
// RUN: -package-name TestPackage -swift-version 5 -verify
|
||||
|
||||
/// Check diagnostics with library-evolution.
|
||||
// RUN: %target-swift-frontend -typecheck %t/MinimalClient.swift -I %t \
|
||||
// RUN: -package-name TestPackage -swift-version 5 \
|
||||
// RUN: -enable-library-evolution \
|
||||
// RUN: -enable-experimental-feature AccessLevelOnImport -verify
|
||||
// RUN: -enable-library-evolution -verify
|
||||
// RUN: %target-swift-frontend -typecheck %t/CompletenessClient.swift -I %t \
|
||||
// RUN: -package-name TestPackage -swift-version 5 \
|
||||
// RUN: -enable-library-evolution \
|
||||
// RUN: -enable-experimental-feature AccessLevelOnImport -verify
|
||||
// RUN: -enable-library-evolution -verify
|
||||
|
||||
//--- PublicLib.swift
|
||||
public protocol PublicImportProto {
|
||||
|
||||
@@ -21,8 +21,7 @@
|
||||
public struct LibType {}
|
||||
|
||||
// RUN: %target-swift-frontend -typecheck %t/OneFile_AllExplicit.swift -I %t \
|
||||
// RUN: -enable-experimental-feature AccessLevelOnImport -verify \
|
||||
// RUN: -package-name package
|
||||
// RUN: -package-name package -verify
|
||||
//--- OneFile_AllExplicit.swift
|
||||
public import Lib // expected-warning {{public import of 'Lib' was not used in public declarations or inlinable code}}
|
||||
package import Lib // expected-warning {{package import of 'Lib' was not used in package declarations}}
|
||||
@@ -31,8 +30,7 @@ fileprivate import Lib
|
||||
private import Lib
|
||||
|
||||
// RUN: %target-swift-frontend -typecheck %t/ManyFiles_AllExplicit_File?.swift -I %t \
|
||||
// RUN: -enable-experimental-feature AccessLevelOnImport -verify \
|
||||
// RUN: -package-name package
|
||||
// RUN: -package-name package -verify
|
||||
//--- ManyFiles_AllExplicit_FileA.swift
|
||||
public import Lib // expected-warning {{public import of 'Lib' was not used in public declarations or inlinable code}}
|
||||
//--- ManyFiles_AllExplicit_FileB.swift
|
||||
@@ -45,23 +43,21 @@ fileprivate import Lib
|
||||
private import Lib
|
||||
|
||||
// RUN: %target-swift-frontend -typecheck %t/ManyFiles_ImplicitVsInternal_FileB.swift -I %t \
|
||||
// RUN: -enable-experimental-feature AccessLevelOnImport -verify \
|
||||
// RUN: -primary-file %t/ManyFiles_ImplicitVsInternal_FileA.swift
|
||||
// RUN: -primary-file %t/ManyFiles_ImplicitVsInternal_FileA.swift -verify
|
||||
//--- ManyFiles_ImplicitVsInternal_FileA.swift
|
||||
import Lib // expected-error {{ambiguous implicit access level for import of 'Lib'; it is imported as 'internal' elsewhere}}
|
||||
//--- ManyFiles_ImplicitVsInternal_FileB.swift
|
||||
internal import Lib // expected-note {{imported 'internal' here}}
|
||||
|
||||
// RUN: %target-swift-frontend -typecheck %t/ManyFiles_ImplicitVsPackage_FileB.swift -I %t \
|
||||
// RUN: -enable-experimental-feature AccessLevelOnImport -verify \
|
||||
// RUN: -primary-file %t/ManyFiles_ImplicitVsPackage_FileA.swift
|
||||
// RUN: -primary-file %t/ManyFiles_ImplicitVsPackage_FileA.swift -verify
|
||||
//--- ManyFiles_ImplicitVsPackage_FileA.swift
|
||||
import Lib // expected-error {{ambiguous implicit access level for import of 'Lib'; it is imported as 'package' elsewhere}}
|
||||
//--- ManyFiles_ImplicitVsPackage_FileB.swift
|
||||
package import Lib // expected-note {{imported 'package' here}} @:1
|
||||
|
||||
// RUN: %target-swift-frontend -typecheck %t/ManyFiles_AmbiguitySwift6_File?.swift -I %t \
|
||||
// RUN: -enable-experimental-feature AccessLevelOnImport -verify -swift-version 6
|
||||
// RUN: -verify -swift-version 6
|
||||
// RUN: %target-swift-frontend -typecheck %t/ManyFiles_AmbiguitySwift6_File?.swift -I %t \
|
||||
// RUN: -enable-upcoming-feature InternalImportsByDefault -verify
|
||||
//--- ManyFiles_AmbiguitySwift6_FileA.swift
|
||||
|
||||
@@ -18,8 +18,7 @@
|
||||
|
||||
/// Check diagnostics.
|
||||
// RUN: %target-swift-frontend -typecheck %t/Client.swift -I %t \
|
||||
// RUN: -enable-library-evolution -swift-version 5 \
|
||||
// RUN: -enable-experimental-feature AccessLevelOnImport -verify \
|
||||
// RUN: -enable-library-evolution -swift-version 5 -verify \
|
||||
// RUN: -package-name package
|
||||
|
||||
//--- PublicLib.swift
|
||||
|
||||
@@ -11,8 +11,7 @@
|
||||
|
||||
/// Check that all access levels are accepted, except for 'open'.
|
||||
// RUN: %target-swift-frontend -typecheck %t/Client.swift -I %t \
|
||||
// RUN: -enable-experimental-feature AccessLevelOnImport -verify \
|
||||
// RUN: -package-name package
|
||||
// RUN: -package-name package -verify
|
||||
|
||||
//--- PublicLib.swift
|
||||
//--- PackageLib.swift
|
||||
|
||||
@@ -8,8 +8,7 @@
|
||||
// RUN: %target-swift-typecheck-module-from-interface(%t/Aliases.swiftinterface) -I %t
|
||||
|
||||
// RUN: %target-swift-frontend -typecheck -verify %t/UsesAliasesNoImport.swift -I %t \
|
||||
// RUN: -swift-version 5 -enable-library-evolution \
|
||||
// RUN: -enable-experimental-feature AccessLevelOnImport
|
||||
// RUN: -swift-version 5 -enable-library-evolution
|
||||
// RUN: %target-swift-frontend -typecheck -verify %t/UsesAliasesNoImport.swift -I %t \
|
||||
// RUN: -swift-version 5 -enable-library-evolution \
|
||||
// RUN: -enable-upcoming-feature InternalImportsByDefault
|
||||
|
||||
@@ -38,20 +38,15 @@
|
||||
|
||||
/// Access levels on imports
|
||||
// RUN: %target-swift-frontend -typecheck %t/Public_Exported.swift -I %t -verify \
|
||||
// RUN: -experimental-spi-only-imports -verify \
|
||||
// RUN: -enable-experimental-feature AccessLevelOnImport
|
||||
// RUN: -experimental-spi-only-imports -verify
|
||||
// RUN: %target-swift-frontend -typecheck %t/Package_Exported.swift -I %t -verify \
|
||||
// RUN: -experimental-spi-only-imports -verify \
|
||||
// RUN: -enable-experimental-feature AccessLevelOnImport
|
||||
// RUN: -experimental-spi-only-imports -verify
|
||||
// RUN: %target-swift-frontend -typecheck %t/Internal_Exported.swift -I %t -verify \
|
||||
// RUN: -experimental-spi-only-imports -verify \
|
||||
// RUN: -enable-experimental-feature AccessLevelOnImport
|
||||
// RUN: -experimental-spi-only-imports -verify
|
||||
// RUN: %target-swift-frontend -typecheck %t/Fileprivate_Exported.swift -I %t -verify \
|
||||
// RUN: -experimental-spi-only-imports -verify \
|
||||
// RUN: -enable-experimental-feature AccessLevelOnImport
|
||||
// RUN: -experimental-spi-only-imports -verify
|
||||
// RUN: %target-swift-frontend -typecheck %t/Private_Exported.swift -I %t -verify \
|
||||
// RUN: -experimental-spi-only-imports -verify \
|
||||
// RUN: -enable-experimental-feature AccessLevelOnImport
|
||||
// RUN: -experimental-spi-only-imports -verify
|
||||
|
||||
//--- Public_Exported.swift
|
||||
@_exported public import Lib // expected-warning {{public import of 'Lib' was not used in public declarations or inlinable code}}
|
||||
|
||||
@@ -102,7 +102,6 @@ import LocalClang
|
||||
@_exported import MainLib
|
||||
|
||||
// RUN: %target-swift-frontend -typecheck -sdk %t/sdk %t/InternalImports.swift \
|
||||
// RUN: -enable-experimental-feature AccessLevelOnImport \
|
||||
// RUN: -module-name MainLib -module-cache-path %t \
|
||||
// RUN: -F %t/sdk/System/Library/PrivateFrameworks/ \
|
||||
// RUN: -library-level api -verify
|
||||
@@ -116,7 +115,6 @@ internal import FullyPrivateClang
|
||||
internal import LocalClang
|
||||
|
||||
// RUN: %target-swift-frontend -typecheck -sdk %t/sdk %t/FileprivateImports.swift \
|
||||
// RUN: -enable-experimental-feature AccessLevelOnImport \
|
||||
// RUN: -module-name MainLib -module-cache-path %t \
|
||||
// RUN: -F %t/sdk/System/Library/PrivateFrameworks/ \
|
||||
// RUN: -library-level api -verify
|
||||
@@ -130,7 +128,6 @@ fileprivate import FullyPrivateClang
|
||||
fileprivate import LocalClang
|
||||
|
||||
// RUN: %target-swift-frontend -typecheck -sdk %t/sdk %t/PrivateImports.swift \
|
||||
// RUN: -enable-experimental-feature AccessLevelOnImport \
|
||||
// RUN: -module-name MainLib -module-cache-path %t \
|
||||
// RUN: -F %t/sdk/System/Library/PrivateFrameworks/ \
|
||||
// RUN: -library-level api -verify
|
||||
@@ -144,7 +141,6 @@ private import FullyPrivateClang
|
||||
private import LocalClang
|
||||
|
||||
// RUN: %target-swift-frontend -typecheck -sdk %t/sdk %t/ExplicitlyPublicImports.swift \
|
||||
// RUN: -enable-experimental-feature AccessLevelOnImport \
|
||||
// RUN: -module-name MainLib -module-cache-path %t \
|
||||
// RUN: -F %t/sdk/System/Library/PrivateFrameworks/ \
|
||||
// RUN: -library-level api -verify
|
||||
|
||||
@@ -5,27 +5,22 @@
|
||||
|
||||
/// Build the libraries.
|
||||
// RUN: %target-swift-frontend -emit-module %t/PackageImportedLib.swift -o %t \
|
||||
// RUN: -swift-version 5 -enable-library-evolution \
|
||||
// RUN: -enable-experimental-feature AccessLevelOnImport
|
||||
// RUN: -swift-version 5 -enable-library-evolution
|
||||
// RUN: %target-swift-frontend -emit-module %t/PackageLib.swift -o %t \
|
||||
// RUN: -swift-version 5 -enable-library-evolution -I %t \
|
||||
// RUN: -enable-experimental-feature AccessLevelOnImport \
|
||||
// RUN: -package-name MyPackage
|
||||
|
||||
/// A client in the same package builds fine.
|
||||
// RUN: %target-swift-frontend -typecheck %t/Client.swift -I %t \
|
||||
// RUN: -package-name MyPackage -I %t \
|
||||
// RUN: -enable-experimental-feature AccessLevelOnImport
|
||||
// RUN: -package-name MyPackage -I %t
|
||||
|
||||
// RUN: %target-swift-frontend -typecheck %t/Client.swift -I %t \
|
||||
// RUN: -package-name MyPackage -I %t \
|
||||
// RUN: -enable-deserialization-safety \
|
||||
// RUN: -enable-experimental-feature AccessLevelOnImport
|
||||
// RUN: -enable-deserialization-safety
|
||||
|
||||
/// A client outside of the package raises errors.
|
||||
// RUN: %target-swift-frontend -typecheck %t/Client.swift -I %t \
|
||||
// RUN: -package-name NotMyPackage -I %t \
|
||||
// RUN: -enable-experimental-feature AccessLevelOnImport -verify
|
||||
// RUN: -package-name NotMyPackage -I %t -verify
|
||||
|
||||
//--- PackageImportedLib.swift
|
||||
public struct IndirectType {
|
||||
|
||||
@@ -23,11 +23,9 @@
|
||||
|
||||
/// Check diagnostics.
|
||||
// RUN: %target-swift-frontend -typecheck %t/Client.swift -I %t \
|
||||
// RUN: -enable-experimental-feature AccessLevelOnImport -verify \
|
||||
// RUN: -package-name pkg -Rmodule-api-import -swift-version 6
|
||||
// RUN: -package-name pkg -Rmodule-api-import -swift-version 6 -verify
|
||||
// RUN: %target-swift-frontend -typecheck %t/Client_Swift5.swift -I %t \
|
||||
// RUN: -enable-experimental-feature AccessLevelOnImport -verify \
|
||||
// RUN: -swift-version 5
|
||||
// RUN: -swift-version 5 -verify
|
||||
|
||||
//--- DepUsedFromInlinableCode.swift
|
||||
public struct TypeUsedFromInlinableCode {}
|
||||
|
||||
@@ -26,20 +26,15 @@ private import HiddenDep
|
||||
|
||||
/// With resilience, non-public dependencies should be hidden.
|
||||
// RUN: %target-swift-frontend -emit-module %t/PublicDep.swift -o %t -I %t \
|
||||
// RUN: -enable-library-evolution \
|
||||
// RUN: -enable-experimental-feature AccessLevelOnImport
|
||||
// RUN: -enable-library-evolution
|
||||
// RUN: %target-swift-frontend -emit-module %t/PackageDep.swift -o %t -I %t \
|
||||
// RUN: -enable-library-evolution -package-name MyPackage \
|
||||
// RUN: -enable-experimental-feature AccessLevelOnImport
|
||||
// RUN: -enable-library-evolution -package-name MyPackage
|
||||
// RUN: %target-swift-frontend -emit-module %t/InternalDep.swift -o %t -I %t \
|
||||
// RUN: -enable-library-evolution \
|
||||
// RUN: -enable-experimental-feature AccessLevelOnImport
|
||||
// RUN: -enable-library-evolution
|
||||
// RUN: %target-swift-frontend -emit-module %t/FileprivateDep.swift -o %t -I %t \
|
||||
// RUN: -enable-library-evolution \
|
||||
// RUN: -enable-experimental-feature AccessLevelOnImport
|
||||
// RUN: -enable-library-evolution
|
||||
// RUN: %target-swift-frontend -emit-module %t/PrivateDep.swift -o %t -I %t \
|
||||
// RUN: -enable-library-evolution \
|
||||
// RUN: -enable-experimental-feature AccessLevelOnImport
|
||||
// RUN: -enable-library-evolution
|
||||
|
||||
// RUN: %target-swift-frontend -typecheck %t/ClientOfPublic.swift -I %t \
|
||||
// RUN: -package-name MyOtherPackage \
|
||||
@@ -59,17 +54,12 @@ import FileprivateDep
|
||||
import PrivateDep
|
||||
|
||||
/// Without resilience, all access-level dependencies are visible to clients.
|
||||
// RUN: %target-swift-frontend -emit-module %t/PublicDep.swift -o %t -I %t \
|
||||
// RUN: -enable-experimental-feature AccessLevelOnImport
|
||||
// RUN: %target-swift-frontend -emit-module %t/PublicDep.swift -o %t -I %t
|
||||
// RUN: %target-swift-frontend -emit-module %t/PackageDep.swift -o %t -I %t \
|
||||
// RUN: -package-name MyPackage \
|
||||
// RUN: -enable-experimental-feature AccessLevelOnImport
|
||||
// RUN: %target-swift-frontend -emit-module %t/InternalDep.swift -o %t -I %t \
|
||||
// RUN: -enable-experimental-feature AccessLevelOnImport
|
||||
// RUN: %target-swift-frontend -emit-module %t/FileprivateDep.swift -o %t -I %t \
|
||||
// RUN: -enable-experimental-feature AccessLevelOnImport
|
||||
// RUN: %target-swift-frontend -emit-module %t/PrivateDep.swift -o %t -I %t \
|
||||
// RUN: -enable-experimental-feature AccessLevelOnImport
|
||||
// RUN: -package-name MyPackage
|
||||
// RUN: %target-swift-frontend -emit-module %t/InternalDep.swift -o %t -I %t
|
||||
// RUN: %target-swift-frontend -emit-module %t/FileprivateDep.swift -o %t -I %t
|
||||
// RUN: %target-swift-frontend -emit-module %t/PrivateDep.swift -o %t -I %t
|
||||
|
||||
// RUN: %target-swift-frontend -typecheck %t/ClientOfPublic.swift -I %t \
|
||||
// RUN: -Rmodule-loading 2>&1 | %FileCheck -check-prefix=VISIBLE-DEP %s
|
||||
@@ -79,20 +69,15 @@ import PrivateDep
|
||||
/// Even with resilience and testing enabled, all non-public dependencies are
|
||||
/// hidden if there are no testable imports.
|
||||
// RUN: %target-swift-frontend -emit-module %t/PublicDep.swift -o %t -I %t \
|
||||
// RUN: -enable-library-evolution -enable-testing \
|
||||
// RUN: -enable-experimental-feature AccessLevelOnImport
|
||||
// RUN: -enable-library-evolution -enable-testing
|
||||
// RUN: %target-swift-frontend -emit-module %t/PackageDep.swift -o %t -I %t \
|
||||
// RUN: -enable-library-evolution -enable-testing -package-name MyPackage \
|
||||
// RUN: -enable-experimental-feature AccessLevelOnImport
|
||||
// RUN: -enable-library-evolution -enable-testing -package-name MyPackage
|
||||
// RUN: %target-swift-frontend -emit-module %t/InternalDep.swift -o %t -I %t \
|
||||
// RUN: -enable-library-evolution -enable-testing \
|
||||
// RUN: -enable-experimental-feature AccessLevelOnImport
|
||||
// RUN: -enable-library-evolution -enable-testing
|
||||
// RUN: %target-swift-frontend -emit-module %t/FileprivateDep.swift -o %t -I %t \
|
||||
// RUN: -enable-library-evolution -enable-testing \
|
||||
// RUN: -enable-experimental-feature AccessLevelOnImport
|
||||
// RUN: -enable-library-evolution -enable-testing
|
||||
// RUN: %target-swift-frontend -emit-module %t/PrivateDep.swift -o %t -I %t \
|
||||
// RUN: -enable-library-evolution -enable-testing \
|
||||
// RUN: -enable-experimental-feature AccessLevelOnImport
|
||||
// RUN: -enable-library-evolution -enable-testing
|
||||
|
||||
// RUN: %target-swift-frontend -typecheck %t/ClientOfPublic.swift -I %t \
|
||||
// RUN: -Rmodule-loading 2>&1 | %FileCheck -check-prefix=VISIBLE-DEP %s
|
||||
@@ -120,8 +105,7 @@ import PrivateDep
|
||||
/// Non-public imports from the reexported modules are not loaded, we could
|
||||
/// revisit this if desired.
|
||||
// RUN: %target-swift-frontend -emit-module %t/Exporter.swift -o %t -I %t \
|
||||
// RUN: -enable-library-evolution -enable-testing \
|
||||
// RUN: -enable-experimental-feature AccessLevelOnImport
|
||||
// RUN: -enable-library-evolution -enable-testing
|
||||
// RUN: %target-swift-frontend -typecheck %t/ExporterClient.swift -I %t \
|
||||
// RUN: -index-system-modules -index-ignore-stdlib -index-store-path %t/idx \
|
||||
// RUN: -Rmodule-loading 2>&1 | %FileCheck -check-prefixes=CHECK-EXPORTER,HIDDEN-DEP %s
|
||||
|
||||
@@ -5,11 +5,9 @@
|
||||
// RUN: %target-swift-frontend -emit-module %t/PackageDep.swift -o %t
|
||||
// RUN: %target-swift-frontend -emit-module %t/ResilientDep.swift -o %t \
|
||||
// RUN: -package-name MyPackage -I %t \
|
||||
// RUN: -enable-library-evolution \
|
||||
// RUN: -enable-experimental-feature AccessLevelOnImport
|
||||
// RUN: -enable-library-evolution
|
||||
// RUN: %target-swift-frontend -emit-module %t/NonResilientDep.swift -o %t \
|
||||
// RUN: -package-name MyPackage -I %t \
|
||||
// RUN: -enable-experimental-feature AccessLevelOnImport
|
||||
// RUN: -package-name MyPackage -I %t
|
||||
|
||||
//--- PackageDep.swift
|
||||
|
||||
@@ -23,13 +21,11 @@ package import PackageDep
|
||||
/// is only visible to modules from the same package.
|
||||
// RUN: %target-swift-frontend -typecheck %t/ResilientClient.swift \
|
||||
// RUN: -package-name MyPackage -I %t \
|
||||
// RUN: -enable-experimental-feature AccessLevelOnImport \
|
||||
// RUN: -Rmodule-loading 2>&1 | %FileCheck -check-prefix=VISIBLE-PACKAGE-DEP %s
|
||||
// VISIBLE-PACKAGE-DEP: loaded module 'PackageDep'
|
||||
|
||||
// RUN: %target-swift-frontend -typecheck %t/ResilientClient.swift \
|
||||
// RUN: -package-name NotMyPackage -I %t \
|
||||
// RUN: -enable-experimental-feature AccessLevelOnImport \
|
||||
// RUN: -Rmodule-loading 2>&1 | %FileCheck -check-prefix=HIDDEN-PACKAGE-DEP %s
|
||||
// HIDDEN-PACKAGE-DEP-NOT: loaded module 'PackageDep'
|
||||
|
||||
@@ -40,7 +36,6 @@ import ResilientDep
|
||||
/// see the package dependency.
|
||||
// RUN: %target-swift-frontend -typecheck %t/NonResilientClient.swift \
|
||||
// RUN: -package-name NotMyPackage -I %t \
|
||||
// RUN: -enable-experimental-feature AccessLevelOnImport \
|
||||
// RUN: -Rmodule-loading 2>&1 | %FileCheck -check-prefix=VISIBLE-PACKAGE-DEP %s
|
||||
|
||||
//--- NonResilientClient.swift
|
||||
|
||||
@@ -27,7 +27,7 @@ package struct S: P {
|
||||
package import DocBriefTest
|
||||
|
||||
func test() {
|
||||
// RUN: %sourcekitd-test -req=complete -pos=%(line+1):7 %t/User.swift -- %t/User.swift -I %t/Modules -target %target-triple -module-name DocBriefUser -package-name DocPackage -enable-experimental-feature AccessLevelOnImport | %FileCheck %s -check-prefix=CHECK
|
||||
// RUN: %sourcekitd-test -req=complete -pos=%(line+1):7 %t/User.swift -- %t/User.swift -I %t/Modules -target %target-triple -module-name DocBriefUser -package-name DocPackage | %FileCheck %s -check-prefix=CHECK
|
||||
S().foo()
|
||||
|
||||
// CHECK: {
|
||||
|
||||
@@ -101,7 +101,7 @@ var unterminatedEmptySubject = 0
|
||||
duplicateAttr(1) // expected-error{{argument passed to call that takes no arguments}}
|
||||
|
||||
// CHECK ALLOWED DECLS
|
||||
private import Swift // expected-error {{Access level on imports require '-enable-experimental-feature AccessLevelOnImport}}
|
||||
private import Swift
|
||||
private(set) infix operator ~~~ // expected-error {{unexpected attribute private in operator declaration}} {{1-14=}}
|
||||
|
||||
private typealias MyInt = Int
|
||||
|
||||
@@ -4,10 +4,8 @@
|
||||
// RUN: split-file --leading-lines %s %t
|
||||
|
||||
// RUN: %target-swift-frontend -emit-module %t/PackageLib.swift -o %t
|
||||
// RUN: %target-swift-frontend -typecheck %t/Client.swift -I %t -verify
|
||||
// RUN: %target-swift-frontend -typecheck %t/Client.swift -I %t \
|
||||
// RUN: -enable-experimental-feature AccessLevelOnImport -verify
|
||||
// RUN: %target-swift-frontend -typecheck %t/Client.swift -I %t \
|
||||
// RUN: -enable-experimental-feature AccessLevelOnImport \
|
||||
// RUN: -package-name pkg
|
||||
|
||||
//--- PackageLib.swift
|
||||
|
||||
Reference in New Issue
Block a user