summaryrefslogtreecommitdiff
path: root/tests/agentzh.t
diff options
context:
space:
mode:
Diffstat (limited to 'tests/agentzh.t')
-rw-r--r--tests/agentzh.t15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/agentzh.t b/tests/agentzh.t
index e65288f..0b546ff 100644
--- a/tests/agentzh.t
+++ b/tests/agentzh.t
@@ -50,3 +50,18 @@ print(cjson.encode(b))
50--- out 50--- out
51["a=1&b=2"] 51["a=1&b=2"]
52 52
53
54
55=== TEST 5: default and max precision
56--- lua
57local math = require "math"
58local cjson = require "cjson"
59local double = math.pow(2, 53)
60print(cjson.encode(double))
61cjson.encode_number_precision(16)
62print(cjson.encode(double))
63print(string.format("%16.0f", cjson.decode("9007199254740992")))
64--- out
659.007199254741e+15
669007199254740992
679007199254740992