Skip to content

Commit bd82ccc

Browse files
authored
Add missing assertion for too large long values in JSON keys
1 parent 5102380 commit bd82ccc

File tree

1 file changed

+3
-1
lines changed
  • jsoniter-scala-core/shared/src/test/scala/com/github/plokhotnyuk/jsoniter_scala/core

1 file changed

+3
-1
lines changed

jsoniter-scala-core/shared/src/test/scala/com/github/plokhotnyuk/jsoniter_scala/core/JsonReaderSpec.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2585,6 +2585,8 @@ class JsonReaderSpec extends AnyWordSpec with Matchers with ScalaCheckPropertyCh
25852585
checkError("x", "illegal number, offset: 0x00000000", "illegal number, offset: 0x00000001")
25862586
}
25872587
"throw parsing exception on long overflow" in {
2588+
checkError("0000009223372036854775809", "illegal number with leading zero, offset: 0x00000000",
2589+
"value is too large for long, offset: 0x00000014")
25882590
checkError("9223372036854775808", "value is too large for long, offset: 0x00000012",
25892591
"value is too large for long, offset: 0x00000013")
25902592
checkError("9223372036854775808.", "value is too large for long, offset: 0x00000012",
@@ -3272,4 +3274,4 @@ class JsonReaderSpec extends AnyWordSpec with Matchers with ScalaCheckPropertyCh
32723274
}
32733275
sb.toString
32743276
}
3275-
}
3277+
}

0 commit comments

Comments
 (0)