From: Ján Tomko Date: Thu, 11 Jan 2018 13:41:58 +0000 (+0100) Subject: virjsontest: Use a more stable floating point number for testing X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=3487973ee0c730b6fbfc6183af798c46ae3b85ff;p=libvirt.git virjsontest: Use a more stable floating point number for testing We store all JSON numbers as strings. To allow using json libraries that store them in numeric types, use a more predictable and normalized value. Signed-off-by: Ján Tomko --- diff --git a/tests/virjsontest.c b/tests/virjsontest.c index fe72b84340..d42413d11d 100644 --- a/tests/virjsontest.c +++ b/tests/virjsontest.c @@ -585,7 +585,7 @@ mymain(void) DO_TEST_PARSE("number without garbage", "[ 234545 ]", "[234545]"); DO_TEST_PARSE_FAIL("number with garbage", "[ 2345b45 ]"); - DO_TEST_PARSE("float without garbage", "[ 0.0314159e+100 ]", "[0.0314159e+100]"); + DO_TEST_PARSE("float without garbage", "[ 1.024e19 ]", "[1.024e19]"); DO_TEST_PARSE_FAIL("float with garbage", "[ 0.0314159ee+100 ]"); DO_TEST_PARSE("string", "[ \"The meaning of life\" ]",