Skip to content

Commit 0faceac

Browse files
Fix a non-deterministic failure in testPrintingExplicitDependencyGraph
When JSONEncoder puts `mainModuleName` in the end of the JSON dictionary, it does not have `,` in the end. Remove the trailing `,` to avoid such failures.
1 parent ba8ed95 commit 0faceac

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Tests/SwiftDriverTests/ExplicitModuleBuildTests.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -1480,7 +1480,7 @@ final class ExplicitModuleBuildTests: XCTestCase {
14801480
diagnosticsEngine: diagnosticEngine)
14811481
let _ = try driver.planBuild()
14821482
}
1483-
XCTAssertTrue(output.contains("\"mainModuleName\" : \"testPrintingExplicitDependencyGraph\","))
1483+
XCTAssertTrue(output.contains("\"mainModuleName\" : \"testPrintingExplicitDependencyGraph\""))
14841484

14851485
let output2 = try withHijackedOutputStream {
14861486
let diagnosticEngine = DiagnosticsEngine()
@@ -1499,7 +1499,7 @@ final class ExplicitModuleBuildTests: XCTestCase {
14991499
diagnosticsEngine: diagnosticEngine)
15001500
let _ = try driver.planBuild()
15011501
}
1502-
XCTAssertTrue(output3.contains("\"mainModuleName\" : \"testPrintingExplicitDependencyGraph\","))
1502+
XCTAssertTrue(output3.contains("\"mainModuleName\" : \"testPrintingExplicitDependencyGraph\""))
15031503
}
15041504
}
15051505

0 commit comments

Comments
 (0)