diff options
author | Florian Frank <flori@ping.de> | 2010-04-25 15:43:47 +0200 |
---|---|---|
committer | Florian Frank <flori@ping.de> | 2010-04-25 15:43:47 +0200 |
commit | d34d8a2195b480abae68ea427be60767793b6196 (patch) | |
tree | 26b4fb066740b31d0b05a2b65a404e4797957784 /tests | |
parent | 590ac112a95dd5ce30e52fcf4db17df3a1ed6721 (diff) | |
download | json-d34d8a2195b480abae68ea427be60767793b6196.tar.gz |
Fixed T_FIXNUM bug on 64bit architectures.v1.4.1
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/test_json.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/test_json.rb b/tests/test_json.rb index 3d26ddb..f5a432f 100755 --- a/tests/test_json.rb +++ b/tests/test_json.rb @@ -324,4 +324,17 @@ EOT JSON.dump(eval(too_deep), output, 20) assert_equal too_deep, output.string end + + def test_big_integers + json1 = JSON([orig = (1 << 31) - 1]) + assert_equal orig, JSON[json1][0] + json2 = JSON([orig = 1 << 31]) + assert_equal orig, JSON[json2][0] + json3 = JSON([orig = (1 << 62) - 1]) + assert_equal orig, JSON[json3][0] + json4 = JSON([orig = 1 << 62]) + assert_equal orig, JSON[json4][0] + json5 = JSON([orig = 1 << 64]) + assert_equal orig, JSON[json5][0] + end end |