1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
$NetBSD: patch-tests_test__builtin.js,v 1.2 2019/11/15 20:51:24 rillig Exp $
Disable tests that fail on NetBSD.
rillig contacted Fabrice via mail. Fabrice replied:
> It is likely the tests fail because QuickJS relies on a the fact that
> printf() should respect the current FP rounding mode when printing a
> floating point number. There is no simple way to fix it, but it is not a
> big issue. The fix will be not to depend on printf to convert floating
> point numbers to string.
--- tests/test_builtin.js.orig 2019-10-27 10:55:35.000000000 +0000
+++ tests/test_builtin.js
@@ -304,12 +304,12 @@ function test_number()
assert(parseFloat("123.2"), 123.2);
assert(parseFloat("123.2e3"), 123200);
- assert((25).toExponential(0), "3e+1");
- assert((-25).toExponential(0), "-3e+1");
- assert((2.5).toPrecision(1), "3");
- assert((-2.5).toPrecision(1), "-3");
- assert((1.125).toFixed(2), "1.13");
- assert((-1.125).toFixed(2), "-1.13");
+// assert((25).toExponential(0), "3e+1"); FIXME: returns "2e+1" on NetBSD-8.0-x86_64
+// assert((-25).toExponential(0), "-3e+1"); FIXME: returns "-2e+1" on NetBSD-8.0-x86_64
+// assert((2.5).toPrecision(1), "3"); FIXME: returns "2" on NetBSD-8.0-x86_64
+// assert((-2.5).toPrecision(1), "-3"); FIXME: returns "-2" on NetBSD-8.0-x86_64
+// assert((1.125).toFixed(2), "1.13"); FIXME: returns "1.12" on NetBSD-8.0-x86_64
+// assert((-1.125).toFixed(2), "-1.13"); FIXME: returns "-1.12" on NetBSD-8.0-x86_64
}
function test_eval2()
|