Skip to content

Commit 59234f5

Browse files
Refine assertions in TimeZoneNativeTest to check for timezone prefixes instead of containment.
1 parent 8fa63ae commit 59234f5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/darwin/test/TimeZoneNativeTest.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ class TimeZoneNativeTest {
5050
assertTrue(zoneIds.isNotEmpty(), "Zone IDs should not be empty")
5151
assertTrue(zoneIds.all { it.isNotBlank() }, "All zone IDs should be non-blank")
5252
assertTrue("UTC" in zoneIds || "GMT" in zoneIds, "Should contain UTC or GMT")
53-
assertTrue(zoneIds.any { it.contains("America") }, "Should contain America timezones")
54-
assertTrue(zoneIds.any { it.contains("Europe") }, "Should contain Europe timezones")
53+
assertTrue(zoneIds.any { it.startsWith("America") }, "Should contain America timezones")
54+
assertTrue(zoneIds.any { it.startsWith("Europe") }, "Should contain Europe timezones")
5555
}
5656

5757
private val validTimeZones = listOf("America/New_York", "Europe/London", "Asia/Tokyo", "Australia/Sydney")

0 commit comments

Comments
 (0)