@@ -4203,13 +4203,12 @@ final class SwiftDriverTests: XCTestCase {
4203
4203
" -enable-library-evolution " ] )
4204
4204
let plannedJobs = try driver. planBuild ( )
4205
4205
XCTAssertEqual ( plannedJobs. count, 2 )
4206
- let emitJob = plannedJobs [ 0 ]
4207
- let verifyJob = plannedJobs [ 1 ]
4208
- XCTAssertEqual ( emitJob . kind , . emitModule )
4206
+ let emitJob = plannedJobs. first ( where : { $0 . kind == . emitModule } ) !
4207
+ let verifyJob = plannedJobs. first ( where : { $0 . kind == . verifyModuleInterface } ) !
4208
+
4209
4209
let mergeInterfaceOutputs = emitJob. outputs. filter { $0. type == . swiftInterface }
4210
4210
XCTAssertTrue ( mergeInterfaceOutputs. count == 1 ,
4211
4211
" Merge module job should only have one swiftinterface output " )
4212
- XCTAssertEqual ( verifyJob. kind, . verifyModuleInterface)
4213
4212
XCTAssertTrue ( verifyJob. inputs. count == 1 )
4214
4213
XCTAssertTrue ( verifyJob. inputs [ 0 ] == mergeInterfaceOutputs [ 0 ] )
4215
4214
XCTAssertTrue ( verifyJob. outputs. isEmpty)
@@ -4262,13 +4261,11 @@ final class SwiftDriverTests: XCTestCase {
4262
4261
" -experimental-emit-module-separately " ] , env: envVars)
4263
4262
let plannedJobs = try driver. planBuild ( )
4264
4263
XCTAssertEqual ( plannedJobs. count, 2 )
4265
- let emitJob = plannedJobs [ 0 ]
4266
- let verifyJob = plannedJobs [ 1 ]
4267
- XCTAssertEqual ( emitJob. kind, . emitModule)
4264
+ let emitJob = plannedJobs. first ( where: { $0. kind == . emitModule } ) !
4265
+ let verifyJob = plannedJobs. first ( where: { $0. kind == . verifyModuleInterface } ) !
4268
4266
let emitInterfaceOutput = emitJob. outputs. filter { $0. type == . swiftInterface }
4269
4267
XCTAssertTrue ( emitInterfaceOutput. count == 1 ,
4270
4268
" Emit module job should only have one swiftinterface output " )
4271
- XCTAssertEqual ( verifyJob. kind, . verifyModuleInterface)
4272
4269
XCTAssertTrue ( verifyJob. inputs. count == 1 )
4273
4270
XCTAssertTrue ( verifyJob. inputs [ 0 ] == emitInterfaceOutput [ 0 ] )
4274
4271
XCTAssertTrue ( verifyJob. commandLine. contains ( . path( emitInterfaceOutput [ 0 ] . file) ) )
0 commit comments