diff options
| author | Damien George <damien.p.george@gmail.com> | 2018-05-21 13:05:40 +1000 |
|---|---|---|
| committer | Damien George <damien.p.george@gmail.com> | 2018-05-21 13:05:40 +1000 |
| commit | 1ad0013decb42418ca667c2d9994198b537fa778 (patch) | |
| tree | 2647bd161006438865a89dfd3f9fc4b814501752 /tests/float | |
| parent | 95e43efc994af7d7ff85ef1722eac163be9cc5fd (diff) | |
tests: Add some tests for bigint hash, float hash and float parsing.
Following outcome of recent fuzz testing and sanitizing by @jepler.
Diffstat (limited to 'tests/float')
| -rw-r--r-- | tests/float/builtin_float_hash.py | 2 | ||||
| -rw-r--r-- | tests/float/float_parse.py | 6 |
2 files changed, 8 insertions, 0 deletions
diff --git a/tests/float/builtin_float_hash.py b/tests/float/builtin_float_hash.py index dd184595f..7a7e37401 100644 --- a/tests/float/builtin_float_hash.py +++ b/tests/float/builtin_float_hash.py @@ -3,6 +3,7 @@ # these should hash to an integer with a specific value for val in ( '0.0', + '-0.0', '1.0', '2.0', '-12.0', @@ -15,6 +16,7 @@ for val in ( '0.1', '-0.1', '10.3', + '0.4e3', '1e16', 'inf', '-inf', diff --git a/tests/float/float_parse.py b/tests/float/float_parse.py index ae6b114f0..4b026de1c 100644 --- a/tests/float/float_parse.py +++ b/tests/float/float_parse.py @@ -24,3 +24,9 @@ print(float('.' + '0' * 60 + '9e40') == float('9e-21')) print(float('1.00000000000000000000e-37')) print(float('10.0000000000000000000e-38')) print(float('100.000000000000000000e-39')) + +# very large exponent literal +print(float('1e4294967301')) +print(float('1e-4294967301')) +print(float('1e18446744073709551621')) +print(float('1e-18446744073709551621')) |
