Welcome! Log In Create A New Profile

Advanced

[njs] Tolerate epsilon difference in the previous unit test change.

Sergey Kandaurov
November 13, 2018 11:14AM
details: http://hg.nginx.org/njs/rev/52e540f16740
branches:
changeset: 651:52e540f16740
user: Sergey Kandaurov <pluknet@nginx.com>
date: Tue Nov 13 15:25:00 2018 +0300
description:
Tolerate epsilon difference in the previous unit test change.

diffstat:

njs/test/njs_unit_test.c | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)

diffs (21 lines):

diff -r 19a9743c00c8 -r 52e540f16740 njs/test/njs_unit_test.c
--- a/njs/test/njs_unit_test.c Tue Nov 13 14:16:54 2018 +0300
+++ b/njs/test/njs_unit_test.c Tue Nov 13 15:25:00 2018 +0300
@@ -9071,10 +9071,13 @@ static njs_unit_test_t njs_test[] =
{ nxt_string("Math.sinh(-Infinity)"),
nxt_string("-Infinity") },

-#ifndef __SUNPRO_C /* Sun C 5.15: round error */
- { nxt_string("Math.sinh(1) - (Math.E - 1/Math.E)/2"),
- nxt_string("0") },
-#endif
+ /*
+ * The difference is Number.EPSILON on Solaris
+ * and zero on other platforms.
+ */
+ { nxt_string("Math.abs(Math.sinh(1) - (Math.E - 1/Math.E)/2)"
+ " <= Number.EPSILON"),
+ nxt_string("true") },

{ nxt_string("Math.sqrt()"),
nxt_string("NaN") },
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[njs] Tolerate epsilon difference in the previous unit test change.

Sergey Kandaurov 297 November 13, 2018 11:14AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 312
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready