Skip to content

Commit 8af38c9

Browse files
authored
dataconnect: fix flaky test that ensures deserialize() throws IllegalArgumentException on invalid input (#6839)
1 parent a0a02a7 commit 8af38c9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

firebase-dataconnect/src/test/kotlin/com/google/firebase/dataconnect/serializers/LocalDateSerializerUnitTest.kt

+5-1
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,11 @@ class LocalDateSerializerUnitTest {
205205
}
206206

207207
fun Arb.Companion.unparseableDash(): Arb<String> {
208-
val invalidString = string(1..5, codepoints.filterNot { it.value == '-'.code })
208+
val invalidString =
209+
string(
210+
1..5,
211+
codepoints.filterNot { it.value == '-'.code || it.value in '0'.code..'9'.code }
212+
)
209213
return arbitrary { rs ->
210214
val flags = Array(3) { rs.random.nextBoolean() }
211215
if (!flags[0]) {

0 commit comments

Comments
 (0)