@@ -2789,10 +2789,10 @@ final class SwiftDriverTests: XCTestCase {
2789
2789
// A .package.swiftinterface should only be generated if package-name is passed.
2790
2790
do {
2791
2791
var driver = try Driver ( args: [ " swiftc " , " foo.swift " , " -emit-module " , " -module-name " , " foo " ,
2792
- " -package-name " , " mypkg " ,
2792
+ " -package-name " , " mypkg " , " -library-level " , " api " ,
2793
2793
" -emit-module-interface " , " -enable-library-evolution " ] , env: envVars)
2794
2794
let plannedJobs = try driver. planBuild ( )
2795
- XCTAssertEqual ( plannedJobs. count, 2 )
2795
+ XCTAssertEqual ( plannedJobs. count, 3 )
2796
2796
let emitInterfaceJob = plannedJobs [ 0 ]
2797
2797
XCTAssertTrue ( emitInterfaceJob. commandLine. contains ( . flag( " -emit-module-interface-path " ) ) )
2798
2798
XCTAssertTrue ( emitInterfaceJob. commandLine. contains ( . flag( " -emit-private-module-interface-path " ) ) )
@@ -2801,10 +2801,10 @@ final class SwiftDriverTests: XCTestCase {
2801
2801
2802
2802
// package-name is not passed, so package interface should not be generated.
2803
2803
do {
2804
- var driver = try Driver ( args: [ " swiftc " , " foo.swift " , " -emit-module " , " -module-name " , " foo " ,
2804
+ var driver = try Driver ( args: [ " swiftc " , " foo.swift " , " -emit-module " , " -module-name " , " foo " , " -library-level " , " api " ,
2805
2805
" -emit-module-interface " , " -enable-library-evolution " ] , env: envVars)
2806
2806
let plannedJobs = try driver. planBuild ( )
2807
- XCTAssertEqual ( plannedJobs. count, 2 )
2807
+ XCTAssertEqual ( plannedJobs. count, 3 )
2808
2808
let emitInterfaceJob = plannedJobs [ 0 ]
2809
2809
XCTAssertTrue ( emitInterfaceJob. commandLine. contains ( . flag( " -emit-module-interface-path " ) ) )
2810
2810
XCTAssertTrue ( emitInterfaceJob. commandLine. contains ( . flag( " -emit-private-module-interface-path " ) ) )
@@ -2814,11 +2814,11 @@ final class SwiftDriverTests: XCTestCase {
2814
2814
// package-name is not passed, so specifying emit-package-module-interface-path should be a no-op.
2815
2815
do {
2816
2816
var driver = try Driver ( args: [ " swiftc " , " foo.swift " , " -emit-module " , " -module-name " , " foo " ,
2817
- " -emit-module-interface " ,
2817
+ " -emit-module-interface " , " -library-level " , " api " ,
2818
2818
" -emit-package-module-interface-path " , " foo.package.swiftinterface " ,
2819
2819
" -enable-library-evolution " ] , env: envVars)
2820
2820
let plannedJobs = try driver. planBuild ( )
2821
- XCTAssertEqual ( plannedJobs. count, 2 )
2821
+ XCTAssertEqual ( plannedJobs. count, 3 )
2822
2822
let emitInterfaceJob = plannedJobs [ 0 ]
2823
2823
XCTAssertTrue ( emitInterfaceJob. commandLine. contains ( . flag( " -emit-module-interface-path " ) ) )
2824
2824
XCTAssertTrue ( emitInterfaceJob. commandLine. contains ( . flag( " -emit-private-module-interface-path " ) ) )
0 commit comments