@@ -485,16 +485,16 @@ final class ExplicitModuleBuildTests: XCTestCase {
485485
486486 let linkJob = try jobs. findJob ( . link)
487487 if driver. targetTriple. isDarwin {
488- XCTAssertTrue ( linkJob. commandLine. contains ( " -possible-lswiftCore " ) )
489- XCTAssertTrue ( linkJob. commandLine. contains ( " -possible-lswift_StringProcessing " ) )
490- XCTAssertTrue ( linkJob. commandLine. contains ( " -possible-lobjc " ) )
491- XCTAssertTrue ( linkJob. commandLine. contains ( " -possible-lswift_Concurrency " ) )
492- XCTAssertTrue ( linkJob. commandLine. contains ( " -possible-lswiftSwiftOnoneSupport " ) )
488+ XCTAssertCommandLineContains ( linkJob. commandLine, . flag ( " -possible-lswiftCore " ) )
489+ XCTAssertCommandLineContains ( linkJob. commandLine, . flag ( " -possible-lswift_StringProcessing " ) )
490+ XCTAssertCommandLineContains ( linkJob. commandLine, . flag ( " -possible-lobjc " ) )
491+ XCTAssertCommandLineContains ( linkJob. commandLine, . flag ( " -possible-lswift_Concurrency " ) )
492+ XCTAssertCommandLineContains ( linkJob. commandLine, . flag ( " -possible-lswiftSwiftOnoneSupport " ) )
493493 } else {
494- XCTAssertTrue ( linkJob. commandLine. contains ( " -lswiftCore " ) )
495- XCTAssertTrue ( linkJob. commandLine. contains ( " -lswift_StringProcessing " ) )
496- XCTAssertTrue ( linkJob. commandLine. contains ( " -lswift_Concurrency " ) )
497- XCTAssertTrue ( linkJob. commandLine. contains ( " -lswiftSwiftOnoneSupport " ) )
494+ XCTAssertCommandLineContains ( linkJob. commandLine, . flag ( " -lswiftCore " ) )
495+ XCTAssertCommandLineContains ( linkJob. commandLine, . flag ( " -lswift_StringProcessing " ) )
496+ XCTAssertCommandLineContains ( linkJob. commandLine, . flag ( " -lswift_Concurrency " ) )
497+ XCTAssertCommandLineContains ( linkJob. commandLine, . flag ( " -lswiftSwiftOnoneSupport " ) )
498498 }
499499 }
500500 }
@@ -2736,7 +2736,7 @@ final class ExplicitModuleBuildTests: XCTestCase {
27362736 main. pathString] )
27372737 let plannedJobs = try driver. planBuild ( ) . removingAutolinkExtractJobs ( )
27382738 let emitModuleJob = try XCTUnwrap ( plannedJobs. findJobs ( . emitModule) . spm_only)
2739- XCTAssertTrue ( emitModuleJob. commandLine. contains ( subsequence : [ . flag( " -sdk " ) , . path( . absolute( mockSDKPath) ) ] ) )
2739+ XCTAssertCommandLineContains ( emitModuleJob. commandLine, . flag( " -sdk " ) , . path( . absolute( mockSDKPath) ) )
27402740 XCTAssertTrue ( emitModuleJob. commandLine. contains ( subsequence: [ . flag( " -clang-target " ) , . flag( " x86_64-apple-macosx10.15 " ) ] ) )
27412741 }
27422742 }
@@ -2766,7 +2766,7 @@ final class ExplicitModuleBuildTests: XCTestCase {
27662766 main. pathString] )
27672767 let plannedJobs = try driver. planBuild ( ) . removingAutolinkExtractJobs ( )
27682768 let emitModuleJob = try XCTUnwrap ( plannedJobs. findJobs ( . emitModule) . spm_only)
2769- XCTAssertTrue ( emitModuleJob. commandLine. contains ( subsequence : [ . flag( " -sdk " ) , . path( . absolute( mockSDKPath) ) ] ) )
2769+ XCTAssertCommandLineContains ( emitModuleJob. commandLine, . flag( " -sdk " ) , . path( . absolute( mockSDKPath) ) )
27702770 XCTAssertTrue ( emitModuleJob. commandLine. contains ( subsequence: [ . flag( " -clang-target " ) , . flag( " x86_64-apple-macosx10.12 " ) ] ) )
27712771 }
27722772 }
@@ -2797,7 +2797,7 @@ final class ExplicitModuleBuildTests: XCTestCase {
27972797 main. pathString] )
27982798 let plannedJobs = try driver. planBuild ( ) . removingAutolinkExtractJobs ( )
27992799 let emitModuleJob = try XCTUnwrap ( plannedJobs. findJobs ( . emitModule) . spm_only)
2800- XCTAssertTrue ( emitModuleJob. commandLine. contains ( subsequence : [ . flag( " -sdk " ) , . path( . absolute( mockSDKPath) ) ] ) )
2800+ XCTAssertCommandLineContains ( emitModuleJob. commandLine, . flag( " -sdk " ) , . path( . absolute( mockSDKPath) ) )
28012801 XCTAssertTrue ( emitModuleJob. commandLine. contains ( subsequence: [ . flag( " -clang-target " ) , . flag( " x86_64-apple-macosx10.15 " ) ] ) )
28022802 XCTAssertTrue ( emitModuleJob. commandLine. contains ( subsequence: [ . flag( " -clang-target-variant " ) , . flag( " x86_64-apple-ios13.1-macabi " ) ] ) )
28032803 }
@@ -2830,7 +2830,7 @@ final class ExplicitModuleBuildTests: XCTestCase {
28302830 main. pathString] )
28312831 let plannedJobs = try driver. planBuild ( ) . removingAutolinkExtractJobs ( )
28322832 let emitModuleJob = try XCTUnwrap ( plannedJobs. findJobs ( . emitModule) . spm_only)
2833- XCTAssertTrue ( emitModuleJob. commandLine. contains ( subsequence : [ . flag( " -sdk " ) , . path( . absolute( mockSDKPath) ) ] ) )
2833+ XCTAssertCommandLineContains ( emitModuleJob. commandLine, . flag( " -sdk " ) , . path( . absolute( mockSDKPath) ) )
28342834 XCTAssertTrue ( emitModuleJob. commandLine. contains ( subsequence: [ . flag( " -clang-target " ) , . flag( " x86_64-apple-macosx10.12 " ) ] ) )
28352835 XCTAssertTrue ( emitModuleJob. commandLine. contains ( subsequence: [ . flag( " -clang-target-variant " ) , . flag( " x86_64-apple-ios14.0-macabi " ) ] ) )
28362836 }
0 commit comments