diff options
author | Fabrice Bellard <fabrice@bellard.org> | 2025-04-21 15:33:47 +0200 |
---|---|---|
committer | Fabrice Bellard <fabrice@bellard.org> | 2025-04-21 15:33:47 +0200 |
commit | dbbca3dbf3856938120071225a5e4c906d3177e8 (patch) | |
tree | 92553d3e7f7b882e093a267a0729b0d803baa362 /tests/test_builtin.js | |
parent | 37cde16ba2939cbc0d4624dcdf01099ae682743a (diff) | |
download | quickjs-dbbca3dbf3856938120071225a5e4c906d3177e8.tar.gz quickjs-dbbca3dbf3856938120071225a5e4c906d3177e8.zip |
dtoa fix for minus zero
Diffstat (limited to 'tests/test_builtin.js')
-rw-r--r-- | tests/test_builtin.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/test_builtin.js b/tests/test_builtin.js index 2fd3c41..174f216 100644 --- a/tests/test_builtin.js +++ b/tests/test_builtin.js @@ -393,6 +393,7 @@ function test_number() assert((-1.125).toFixed(2), "-1.13"); assert((0.5).toFixed(0), "1"); assert((-0.5).toFixed(0), "-1"); + assert((-1e-10).toFixed(0), "-0"); assert((1.3).toString(7), "1.2046204620462046205"); assert((1.3).toString(35), "1.ahhhhhhhhhm"); |