mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-21 20:15:17 +00:00
Test parsing of large numbers in JSON
We expect to get numbers as big as ULLONG_MAX from QEMU, add a test for them. Signed-off-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
c61e729382
commit
7d6c58ed12
@ -589,6 +589,9 @@ mymain(void)
|
||||
DO_TEST_PARSE("float without garbage", "[ 1.024e19 ]", "[1.024e19]");
|
||||
DO_TEST_PARSE_FAIL("float with garbage", "[ 0.0314159ee+100 ]");
|
||||
|
||||
DO_TEST_PARSE("unsigned minus one", "[ 18446744073709551615 ]", "[18446744073709551615]");
|
||||
DO_TEST_PARSE("another big number", "[ 9223372036854775808 ]", "[9223372036854775808]");
|
||||
|
||||
DO_TEST_PARSE("string", "[ \"The meaning of life\" ]",
|
||||
"[\"The meaning of life\"]");
|
||||
DO_TEST_PARSE_FAIL("unterminated string", "[ \"The meaning of lif ]");
|
||||
|
Loading…
x
Reference in New Issue
Block a user