@@ -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,
@@ -1028,9 +1041,14 @@ final class ExplicitModuleBuildTests: XCTestCase {
1028
1041
try ! dependencyOracle. getImports ( workingDirectory: path,
1029
1042
commandLine: scannerCommand)
1030
1043
let expectedImports = [ " C " , " E " , " G " , " Swift " , " SwiftOnoneSupport " ]
1031
- // Dependnig on how recent the platform we are running on, the Concurrency module may or may not be present.
1044
+ // Dependnig on how recent the platform we are running on, the _Concurrency module may or may not be present.
1032
1045
let expectedImports2 = [ " C " , " E " , " G " , " Swift " , " SwiftOnoneSupport " , " _Concurrency " ]
1033
- XCTAssertTrue ( Set ( imports. imports) == Set ( expectedImports) || Set ( imports. imports) == Set ( expectedImports2) )
1046
+ // Dependnig on how recent the platform we are running on, the _StringProcessing module may or may not be present.
1047
+ let expectedImports3 = [ " C " , " E " , " G " , " Swift " , " SwiftOnoneSupport " , " _Concurrency " , " _StringProcessing " ]
1048
+ XCTAssertTrue (
1049
+ Set ( imports. imports) == Set ( expectedImports) ||
1050
+ Set ( imports. imports) == Set ( expectedImports2) ||
1051
+ Set ( imports. imports) == Set ( expectedImports3) )
1034
1052
}
1035
1053
}
1036
1054
@@ -1139,14 +1157,18 @@ final class ExplicitModuleBuildTests: XCTestCase {
1139
1157
try ! dependencyOracle. getDependencies ( workingDirectory: path,
1140
1158
commandLine: iterationCommand)
1141
1159
1142
- // The _Concurrency module is automatically imported in newer versions
1143
- // of the Swift compiler. If it happened to be provided, adjust
1144
- // our expectations accordingly.
1160
+ // The _Concurrency and _StringProcessing modules are automatically
1161
+ // imported in newer versions of the Swift compiler. If they happened to
1162
+ // be provided, adjust our expectations accordingly.
1145
1163
let hasConcurrencyModule = dependencyGraph. modules. keys. contains {
1146
1164
$0. moduleName == " _Concurrency "
1147
1165
}
1166
+ let hasStringProcessingModule = dependencyGraph. modules. keys. contains {
1167
+ $0. moduleName == " _StringProcessing "
1168
+ }
1148
1169
let adjustedExpectedNumberOfDependencies =
1149
- expectedNumberOfDependencies + ( hasConcurrencyModule ? 1 : 0 )
1170
+ expectedNumberOfDependencies + ( hasConcurrencyModule ? 1 : 0 ) +
1171
+ ( hasStringProcessingModule ? 1 : 0 )
1150
1172
1151
1173
if ( dependencyGraph. modules. count != adjustedExpectedNumberOfDependencies) {
1152
1174
lock. lock ( )
0 commit comments