From: Sergey Kandaurov Date: Tue, 13 Nov 2018 12:25:00 +0000 (+0300) Subject: Tolerate epsilon difference in the previous unit test change. X-Git-Url: http://www.kaiwu.me/postgresql/commit/?a=commitdiff_plain;h=095766ddb25258624914465f58e4453d2e5fe6d9;p=njs.git Tolerate epsilon difference in the previous unit test change. --- diff --git a/njs/test/njs_unit_test.c b/njs/test/njs_unit_test.c index e0b81cfe..89e32871 100644 --- a/njs/test/njs_unit_test.c +++ b/njs/test/njs_unit_test.c @@ -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") },