Skip to content

Commit 81d27a1

Browse files
#485: Add test for consistent atStartOfDay instance production between regular and foundation time zones
1 parent c01dabb commit 81d27a1

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

core/darwin/test/TimeZoneNativeTest.kt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,4 +371,17 @@ class TimeZoneNativeTest {
371371
}
372372
}
373373
}
374+
375+
// timeZone.atStartOfDay(LocalDate) tests
376+
377+
@Test
378+
fun shouldProduceConsistentInstanceBetweenRegularAndFoundationTimeZones() {
379+
for ((zoneId, localDateTimes) in timeZoneRulesTestCases) {
380+
for (ldt in localDateTimes) {
381+
val expected = timeZoneById(zoneId).atStartOfDay(ldt.date)
382+
val actual = timeZoneByIdFoundation(zoneId).atStartOfDay(ldt.date)
383+
assertEquals(expected, actual)
384+
}
385+
}
386+
}
374387
}

0 commit comments

Comments
 (0)