From 2cc1cacf73a5573eb33e436cc886c4ecb01adfbf Mon Sep 17 00:00:00 2001 From: Sami Vaarala Date: Wed, 30 Jan 2013 00:26:46 +0200 Subject: [PATCH] test case fixes for arithmetic ops test --- testcases/test-expr-arithop.js | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/testcases/test-expr-arithop.js b/testcases/test-expr-arithop.js index dc5cdba3..03978654 100644 --- a/testcases/test-expr-arithop.js +++ b/testcases/test-expr-arithop.js @@ -352,42 +352,54 @@ print (t, typeof t); /* rounding to zero and infinity */ /*=== -0 number Infinity Infinity number +Infinity number +Infinity number +0 number Infinity ===*/ -t = 1e200 * 1e-200 * 1e-200 * 1e-200; -print (t, typeof t, 1 / t); - t = 1e200 * 1e200; print (t, typeof t); +t = 1e200; +t *= 1e200; +t *= 1e-200; +t *= 1e-200; +print (t, typeof t); + +// same thing as above, '*' is left associative +t = 1e200 * 1e200 * 1e-200 * 1e-200; +print (t, typeof t); + +// (1e200 * 1e-200) == 1, then goes to zero +t = 1e200 * 1e-200 * 1e-200 * 1e-200; +print (t, typeof t, 1 / t); /*** DIVISION ***/ /*=== -FIXME ===*/ +/*FIXME*/ /*** MODULO ***/ /*=== -FIXME ===*/ +/*FIXME*/ /*** ADDITION ***/ /*=== -FIXME ===*/ +/*FIXME*/ /*** SUBTRACTION ***/ /*=== -FIXME ===*/ +/*FIXME*/