diff options
-rw-r--r-- | tests/016/arith.tl | 22 | ||||
-rw-r--r-- | tests/common.tl | 3 |
2 files changed, 14 insertions, 11 deletions
diff --git a/tests/016/arith.tl b/tests/016/arith.tl index d785afb2..ad919e6b 100644 --- a/tests/016/arith.tl +++ b/tests/016/arith.tl @@ -223,17 +223,17 @@ (< '(1 2 3) #(1 2 3 4)) t (< '(1 2 3) #(1 2 4)) t) -(test - (let ((q (quantile 0.5))) - [q 0.02 0.5 0.74 3.39 0.83] - [mapcar q '(22.37 10.15 15.43 38.62 15.92 - 34.60 10.28 1.47 0.40 0.05 11.39 - 0.27 0.42 0.09 11.37)]) - (0.73999999999999999 0.73999999999999999 2.0616666666666665 - 4.5517592592592591 4.5517592592592591 9.1519618055555547 - 9.1519618055555547 9.1519618055555547 9.1519618055555547 - 6.1797614914021164 6.1797614914021164 6.1797614914021164 - 6.1797614914021164 4.2462394088036453 4.2462394088036453)) +(let ((*print-flo-precision* 14)) + (sstest + (let ((q (quantile 0.5))) + [q 0.02 0.5 0.74 3.39 0.83] + [mapcar q '(22.37 10.15 15.43 38.62 15.92 + 34.60 10.28 1.47 0.40 0.05 11.39 + 0.27 0.42 0.09 11.37)]) + (0.74 0.74 2.0616666666667 4.5517592592593 4.5517592592593 9.1519618055556 + 9.1519618055556 9.1519618055556 9.1519618055556 6.1797614914021 + 6.1797614914021 6.1797614914021 6.1797614914021 4.2462394088036 + 4.2462394088036))) (test (let ((q (quantile 0))) diff --git a/tests/common.tl b/tests/common.tl index 5ad35935..dbd4ef24 100644 --- a/tests/common.tl +++ b/tests/common.tl @@ -56,6 +56,9 @@ (defmacro stest (expr expected) ^(vtest ,^(tostring ,expr) ,expected)) +(defmacro sstest (expr expected) + ^(vtest ,^(tostring ,expr) ,(tostring expected))) + (defmacro mtest (. pairs) ^(progn ,*(mapcar (op cons 'test) (tuples 2 pairs)))) |