diff options
author | Brandon <lordnynex@gmail.com> | 2015-11-01 01:51:30 -0700 |
---|---|---|
committer | Yichun Zhang (agentzh) <agentzh@gmail.com> | 2015-11-04 22:37:29 +0800 |
commit | f79aa68af865ae84b36c7e794beedd87fef2ed54 (patch) | |
tree | 882359f4bca0651aff399cb18c1779e65a3cc7a1 /tests/test.lua | |
parent | fab1440c3268fa415d098ff37bf0f929eeb53844 (diff) | |
download | lua-cjson-2.1.0.3.tar.gz lua-cjson-2.1.0.3.tar.bz2 lua-cjson-2.1.0.3.zip |
feature: now we allow up to 16 decimal places in JSON number encoding via cjson.encode_number_precision().2.1.0.3
thanks lordnynex for the patch in #4.
Test cases for changing precision
Diffstat (limited to 'tests/test.lua')
-rwxr-xr-x | tests/test.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/test.lua b/tests/test.lua index b8fce84..c96dd3d 100755 --- a/tests/test.lua +++ b/tests/test.lua | |||
@@ -361,7 +361,7 @@ local cjson_tests = { | |||
361 | -- Function is listed as '?' due to pcall | 361 | -- Function is listed as '?' due to pcall |
362 | { "Set encode_number_precision(0) [throw error]", | 362 | { "Set encode_number_precision(0) [throw error]", |
363 | json.encode_number_precision, { 0 }, | 363 | json.encode_number_precision, { 0 }, |
364 | false, { "bad argument #1 to '?' (expected integer between 1 and 14)" } }, | 364 | false, { "bad argument #1 to '?' (expected integer between 1 and 16)" } }, |
365 | { "Set encode_number_precision(\"five\") [throw error]", | 365 | { "Set encode_number_precision(\"five\") [throw error]", |
366 | json.encode_number_precision, { "five" }, | 366 | json.encode_number_precision, { "five" }, |
367 | false, { "bad argument #1 to '?' (number expected, got string)" } }, | 367 | false, { "bad argument #1 to '?' (number expected, got string)" } }, |