mirror of
https://github.com/ultrajson/ultrajson.git
synced 2024-11-24 01:04:19 +01:00
add a test to check for the sign bit bug in ujson 1.9
This commit is contained in:
parent
506f789add
commit
5fa6d7be25
@ -587,6 +587,12 @@ class UltraJSONTests(TestCase):
|
||||
pass
|
||||
else:
|
||||
assert False, "expected OverflowError"
|
||||
|
||||
def test_decodeNumberWith32bitSignBit(self):
|
||||
"""Test that numbers that fit within 32 bits but would have the
|
||||
sign bit set (2**31 < x < 2**32) are decoded properly."""
|
||||
doc = '{"id": 3590016419}'
|
||||
self.assertEqual(ujson.decode(doc)['id'], 3590016419)
|
||||
|
||||
"""
|
||||
def test_decodeNumericIntFrcOverflow(self):
|
||||
|
Loading…
Reference in New Issue
Block a user