Skip to content

Commit 803fce9

Browse files
committed
Add error messages to the available() test
1 parent 4a71673 commit 803fce9

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

core/common/test/TimeZoneTest.kt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@ class TimeZoneTest {
3535
@Test
3636
fun available() {
3737
val allTzIds = TimeZone.availableZoneIds
38-
assertContains(allTzIds, "Europe/Berlin")
39-
assertContains(allTzIds, "Europe/Moscow")
40-
assertContains(allTzIds, "America/New_York")
38+
assertContains(allTzIds, "Europe/Berlin", "Europe/Berlin not in $allTzIds")
39+
assertContains(allTzIds, "Europe/Moscow", "Europe/Moscow not in $allTzIds")
40+
assertContains(allTzIds, "America/New_York", "America/New_York not in $allTzIds")
4141

42-
assertNotEquals(0, allTzIds.size)
43-
assertTrue(TimeZone.currentSystemDefault().id in allTzIds)
44-
assertTrue("UTC" in allTzIds)
42+
assertTrue(TimeZone.currentSystemDefault().id in allTzIds,
43+
"The current system timezone ${TimeZone.currentSystemDefault().id} is not in $allTzIds")
44+
assertTrue("UTC" in allTzIds, "The UTC timezone not in $allTzIds")
4545
}
4646

4747
@Test

0 commit comments

Comments
 (0)