Skip to content

Commit e5acce7

Browse files
author
David Ungar
authored
Merge pull request #397 from davidungar/add-date-accuracy-test
Add test for date accuracy.
2 parents aafcd93 + 7cc8433 commit e5acce7

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Tests/SwiftDriverTests/IncrementalCompilationTests.swift

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,16 @@ final class IncrementalCompilationTests: XCTestCase {
366366
try testIncremental(checkDiagnostics: false)
367367
}
368368

369+
/// Ensure that the mod date of the input comes back exactly the same via the build-record.
370+
/// Otherwise the up-to-date calculation in `IncrementalCompilationState` will fail.
371+
func testBuildRecordDateAccuracy() throws {
372+
tryInitial(false)
373+
(1...10).forEach { n in
374+
tryNoChange(true)
375+
}
376+
}
377+
378+
369379

370380
func testIncremental(checkDiagnostics: Bool) throws {
371381
tryInitial(checkDiagnostics)

0 commit comments

Comments
 (0)