@@ -50,7 +50,7 @@ class ReferencePackageTests: XCTestCase {
5050 try ? FileManager . default. removeItem ( at: newReferencePackageDirectory)
5151 }
5252
53- func test_swiftInterface_public ( ) async throws {
53+ func test_swiftInterfaceType_public ( ) async throws {
5454
5555 let interfaceType : InterfaceType = . public
5656
@@ -75,8 +75,36 @@ class ReferencePackageTests: XCTestCase {
7575 }
7676 }
7777 }
78+
79+ func test_swiftInterfaceType_package( ) async throws {
7880
79- func test_swiftInterface_private( ) async throws {
81+ let interfaceType : InterfaceType = . package
82+
83+ let expectedOutput = try expectedOutput ( for: interfaceType)
84+ let pipelineOutput = try await runPipeline ( for: interfaceType)
85+
86+ let markdownOutput = MarkdownOutputGenerator ( ) . generate (
87+ from: pipelineOutput,
88+ allTargets: [ " ReferencePackage " ] ,
89+ oldVersionName: " old_package " ,
90+ newVersionName: " new_package " ,
91+ warnings: [ ]
92+ )
93+
94+ let expectedLines = sanitizeOutput ( expectedOutput) . components ( separatedBy: " \n " )
95+ let markdownOutputLines = sanitizeOutput ( markdownOutput) . components ( separatedBy: " \n " )
96+
97+ print ( markdownOutput)
98+
99+ for i in 0 ..< expectedLines. count {
100+ if expectedLines [ i] != markdownOutputLines [ i] {
101+ XCTAssertEqual ( expectedLines [ i] , markdownOutputLines [ i] )
102+ return
103+ }
104+ }
105+ }
106+
107+ func test_swiftInterfaceType_private( ) async throws {
80108
81109 let interfaceType : InterfaceType = . private
82110
@@ -117,12 +145,15 @@ private extension ReferencePackageTests {
117145
118146 enum InterfaceType {
119147 case `public`
148+ case `package`
120149 case `private`
121150
122151 var expectedOutputFileName : String {
123152 switch self {
124153 case . public:
125154 " expected-reference-changes-swift-interface-public "
155+ case . package :
156+ " expected-reference-changes-swift-interface-package "
126157 case . private:
127158 " expected-reference-changes-swift-interface-private "
128159 }
@@ -132,6 +163,8 @@ private extension ReferencePackageTests {
132163 switch self {
133164 case . public:
134165 " \( XcodeTools . Constants. derivedDataPath) /Build/Products/Debug-iphoneos/ReferencePackage.swiftmodule/arm64-apple-ios.swiftinterface "
166+ case . package :
167+ " \( XcodeTools . Constants. derivedDataPath) /Build/Products/Debug-iphoneos/ReferencePackage.swiftmodule/arm64-apple-ios.package.swiftinterface "
135168 case . private:
136169 " \( XcodeTools . Constants. derivedDataPath) /Build/Products/Debug-iphoneos/ReferencePackage.swiftmodule/arm64-apple-ios.private.swiftinterface "
137170 }
0 commit comments