]> git.kaiwu.me - njs.git/commitdiff
Improved unit test for Math.exp(1).
authorValentin Bartenev <vbart@nginx.com>
Fri, 18 Nov 2016 14:25:45 +0000 (17:25 +0300)
committerValentin Bartenev <vbart@nginx.com>
Fri, 18 Nov 2016 14:25:45 +0000 (17:25 +0300)
njs/test/njs_unit_test.c

index 75bbf4044b5b964da0c8930fe557fa4a7ae94174..d8c14013e13c17a8795a2701f1b504d80b0f1fed 100644 (file)
@@ -5868,7 +5868,7 @@ static njs_unit_test_t  njs_test[] =
      * The difference is 2 * Number.EPSILON on FreeBSD
      * and zero on other platforms.
      */
-    { nxt_string("Math.exp(1) - Math.E <= 2 * Number.EPSILON"),
+    { nxt_string("Math.abs(Math.exp(1) - Math.E) <= 2 * Number.EPSILON"),
       nxt_string("true") },
 
     { nxt_string("Math.expm1()"),