From 62275e69c6484d0d55c5ee1398b4b1c21b4247af Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Wed, 16 Nov 2016 15:21:03 +0300 Subject: [PATCH] Fixed unit tests on FreeBSD. --- njs/test/njs_unit_test.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/njs/test/njs_unit_test.c b/njs/test/njs_unit_test.c index d8f759cf..4c8e37ce 100644 --- a/njs/test/njs_unit_test.c +++ b/njs/test/njs_unit_test.c @@ -5738,8 +5738,12 @@ static njs_unit_test_t njs_test[] = { nxt_string("Math.exp(-Infinity)"), nxt_string("0") }, - { nxt_string("Math.exp(1) - Math.E"), - nxt_string("0") }, + /* + * 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("true") }, { nxt_string("Math.floor()"), nxt_string("NaN") }, -- 2.47.3