diff options
Diffstat (limited to 'tests/test-suite')
-rw-r--r-- | tests/test-suite/inprogress/math.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/test-suite/inprogress/math.js b/tests/test-suite/inprogress/math.js index 776fa3c..ae3ec7a 100644 --- a/tests/test-suite/inprogress/math.js +++ b/tests/test-suite/inprogress/math.js @@ -16,6 +16,10 @@ const prefix = ` local intbits = math.floor(math.log(maxint, 2) + 0.5) + 1 --assert((1 << intbits) == 0) + local function isNaN (x) + return (x ~= x) + end + local function checkerror (msg, f, ...) local s, err = pcall(f, ...) assert(not s and string.find(err, msg)) @@ -81,9 +85,6 @@ test("[test-suite] math: number of bits in the mantissa of a floating-point numb end end - local function isNaN (x) - return (x ~= x) - end assert(isNaN(0/0)) assert(not isNaN(1/0)) |