From: Igor Sysoev Date: Wed, 16 Nov 2016 12:21:03 +0000 (+0300) Subject: Fixed unit tests on FreeBSD. X-Git-Tag: 0.1.6~22 X-Git-Url: http://git.kaiwu.me/postgresql/log/contrib/postgres_fdw/static/gitweb.js?a=commitdiff_plain;h=62275e69c6484d0d55c5ee1398b4b1c21b4247af;p=njs.git Fixed unit tests on FreeBSD. --- 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") },