@@ -207,6 +207,11 @@ final class ExplicitModuleBuildTests: XCTestCase {
207
207
moduleId: . swift( " _Concurrency " ) ,
208
208
dependencyGraph: moduleDependencyGraph,
209
209
pcmFileEncoder: pcmFileEncoder)
210
+ case . relative( RelativePath ( " _StringProcessing.swiftmodule " ) ) :
211
+ try checkExplicitModuleBuildJob ( job: job, pcmArgs: pcmArgs,
212
+ moduleId: . swift( " _StringProcessing " ) ,
213
+ dependencyGraph: moduleDependencyGraph,
214
+ pcmFileEncoder: pcmFileEncoder)
210
215
case . relative( RelativePath ( " SwiftOnoneSupport.swiftmodule " ) ) :
211
216
try checkExplicitModuleBuildJob ( job: job, pcmArgs: pcmArgs,
212
217
moduleId: . swift( " SwiftOnoneSupport " ) ,
@@ -376,6 +381,10 @@ final class ExplicitModuleBuildTests: XCTestCase {
376
381
try checkExplicitModuleBuildJob ( job: job, pcmArgs: pcmArgsCurrent, moduleId: . swift( " _Concurrency " ) ,
377
382
dependencyGraph: dependencyGraph,
378
383
pcmFileEncoder: pcmFileEncoder)
384
+ } else if pathMatchesSwiftModule ( path: outputFilePath, " _StringProcessing " ) {
385
+ try checkExplicitModuleBuildJob ( job: job, pcmArgs: pcmArgsCurrent, moduleId: . swift( " _StringProcessing " ) ,
386
+ dependencyGraph: dependencyGraph,
387
+ pcmFileEncoder: pcmFileEncoder)
379
388
} else if pathMatchesSwiftModule ( path: outputFilePath, " SwiftOnoneSupport " ) {
380
389
try checkExplicitModuleBuildJob ( job: job, pcmArgs: pcmArgsCurrent, moduleId: . swift( " SwiftOnoneSupport " ) ,
381
390
dependencyGraph: dependencyGraph,
@@ -528,6 +537,10 @@ final class ExplicitModuleBuildTests: XCTestCase {
528
537
try checkExplicitModuleBuildJob ( job: job, pcmArgs: pcmArgsCurrent, moduleId: . swift( " _Concurrency " ) ,
529
538
dependencyGraph: dependencyGraph,
530
539
pcmFileEncoder: pcmFileEncoder)
540
+ } else if pathMatchesSwiftModule ( path: outputFilePath, " _StringProcessing " ) {
541
+ try checkExplicitModuleBuildJob ( job: job, pcmArgs: pcmArgsCurrent, moduleId: . swift( " _StringProcessing " ) ,
542
+ dependencyGraph: dependencyGraph,
543
+ pcmFileEncoder: pcmFileEncoder)
531
544
} else if pathMatchesSwiftModule ( path: outputFilePath, " SwiftOnoneSupport " ) {
532
545
try checkExplicitModuleBuildJob ( job: job, pcmArgs: pcmArgsCurrent, moduleId: . swift( " SwiftOnoneSupport " ) ,
533
546
dependencyGraph: dependencyGraph,
@@ -1013,9 +1026,14 @@ final class ExplicitModuleBuildTests: XCTestCase {
1013
1026
try ! dependencyOracle. getImports ( workingDirectory: path,
1014
1027
commandLine: scannerCommand)
1015
1028
let expectedImports = [ " C " , " E " , " G " , " Swift " , " SwiftOnoneSupport " ]
1016
- // Dependnig on how recent the platform we are running on, the Concurrency module may or may not be present.
1029
+ // Dependnig on how recent the platform we are running on, the _Concurrency module may or may not be present.
1017
1030
let expectedImports2 = [ " C " , " E " , " G " , " Swift " , " SwiftOnoneSupport " , " _Concurrency " ]
1018
- XCTAssertTrue ( Set ( imports. imports) == Set ( expectedImports) || Set ( imports. imports) == Set ( expectedImports2) )
1031
+ // Dependnig on how recent the platform we are running on, the _StringProcessing module may or may not be present.
1032
+ let expectedImports3 = [ " C " , " E " , " G " , " Swift " , " SwiftOnoneSupport " , " _Concurrency " , " _StringProcessing " ]
1033
+ XCTAssertTrue (
1034
+ Set ( imports. imports) == Set ( expectedImports) ||
1035
+ Set ( imports. imports) == Set ( expectedImports2) ||
1036
+ Set ( imports. imports) == Set ( expectedImports3) )
1019
1037
}
1020
1038
}
1021
1039
@@ -1124,14 +1142,18 @@ final class ExplicitModuleBuildTests: XCTestCase {
1124
1142
try ! dependencyOracle. getDependencies ( workingDirectory: path,
1125
1143
commandLine: iterationCommand)
1126
1144
1127
- // The _Concurrency module is automatically imported in newer versions
1128
- // of the Swift compiler. If it happened to be provided, adjust
1129
- // our expectations accordingly.
1145
+ // The _Concurrency and _StringProcessing modules are automatically
1146
+ // imported in newer versions of the Swift compiler. If they happened to
1147
+ // be provided, adjust our expectations accordingly.
1130
1148
let hasConcurrencyModule = dependencyGraph. modules. keys. contains {
1131
1149
$0. moduleName == " _Concurrency "
1132
1150
}
1151
+ let hasStringProcessingModule = dependencyGraph. modules. keys. contains {
1152
+ $0. moduleName == " _StringProcessing "
1153
+ }
1133
1154
let adjustedExpectedNumberOfDependencies =
1134
- expectedNumberOfDependencies + ( hasConcurrencyModule ? 1 : 0 )
1155
+ expectedNumberOfDependencies + ( hasConcurrencyModule ? 1 : 0 ) +
1156
+ ( hasStringProcessingModule ? 1 : 0 )
1135
1157
1136
1158
if ( dependencyGraph. modules. count != adjustedExpectedNumberOfDependencies) {
1137
1159
lock. lock ( )
0 commit comments