From 095766ddb25258624914465f58e4453d2e5fe6d9 Mon Sep 17 00:00:00 2001 From: Sergey Kandaurov Date: Tue, 13 Nov 2018 15:25:00 +0300 Subject: [PATCH] Tolerate epsilon difference in the previous unit test change. --- njs/test/njs_unit_test.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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") }, -- 2.47.3