Skip to content

Commit d2a9dca

Browse files
#430: Remove exception message checks
1 parent f64b3bd commit d2a9dca

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

core/linux/test/TimeZoneNativeTest.kt

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -35,26 +35,16 @@ class TimeZoneNativeTest {
3535

3636
@Test
3737
fun missingTimezoneWhenLocaltimeIsNotSymlinkTest() = withFakeRoot("${RESOURCES}missing-timezone/") {
38-
val exception = assertFailsWith<IllegalTimeZoneException> {
38+
assertFailsWith<IllegalTimeZoneException> {
3939
TimeZone.currentSystemDefault()
4040
}
41-
42-
assertTrue(
43-
exception.message?.startsWith("Could not determine the timezone ID") == true,
44-
"Exception message did not match"
45-
)
4641
}
4742

4843
@Test
4944
fun incorrectTimezoneTest() = withFakeRoot("${RESOURCES}incorrect-timezone/") {
50-
val exception = assertFailsWith<IllegalTimeZoneException> {
45+
assertFailsWith<IllegalTimeZoneException> {
5146
TimeZone.currentSystemDefault()
5247
}
53-
54-
assertTrue(
55-
exception.message?.startsWith("Could not determine the timezone ID") == true,
56-
"Exception message did not match"
57-
)
5848
}
5949

6050
@Test

0 commit comments

Comments
 (0)