mirror of
https://github.com/ultrajson/ultrajson.git
synced 2024-11-24 05:12:02 +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
@ -588,6 +588,12 @@ class UltraJSONTests(TestCase):
|
||||
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):
|
||||
input = "X.Y"
|
||||
|
Loading…
Reference in New Issue
Block a user