Dmitry Volyntsev
November 22, 2017 12:42PM
details: http://hg.nginx.org/njs/rev/c69b48375b90
branches:
changeset: 434:c69b48375b90
user: Dmitry Volyntsev <xeioex@nginx.com>
date: Wed Nov 22 20:38:10 2017 +0300
description:
Fixed unit tests for NetBSD 7.

diffstat:

njs/test/njs_unit_test.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)

diffs (69 lines):

diff -r 22cc52416e84 -r c69b48375b90 njs/test/njs_unit_test.c
--- a/njs/test/njs_unit_test.c Wed Nov 22 18:55:57 2017 +0300
+++ b/njs/test/njs_unit_test.c Wed Nov 22 20:38:10 2017 +0300
@@ -538,8 +538,10 @@ static njs_unit_test_t njs_test[] =
{ nxt_string("'0' ** 0.1"),
nxt_string("0") },

+#ifndef __NetBSD__ /* NetBSD 7: pow(0, negative) == -Infinity. */
{ nxt_string("0 ** '-0.1'"),
nxt_string("Infinity") },
+#endif

{ nxt_string("(-0) ** 3"),
nxt_string("-0") },
@@ -550,8 +552,10 @@ static njs_unit_test_t njs_test[] =
{ nxt_string("(-0) ** '-3'"),
nxt_string("-Infinity") },

+#ifndef __NetBSD__ /* NetBSD 7: pow(0, negative) == -Infinity. */
{ nxt_string("'-0' ** -2"),
nxt_string("Infinity") },
+#endif

{ nxt_string("(-3) ** 0.1"),
nxt_string("NaN") },
@@ -604,8 +608,10 @@ static njs_unit_test_t njs_test[] =
{ nxt_string("var a = '0'; a **= 0.1"),
nxt_string("0") },

+#ifndef __NetBSD__ /* NetBSD 7: pow(0, negative) == -Infinity. */
{ nxt_string("var a = 0; a **= '-0.1'"),
nxt_string("Infinity") },
+#endif

{ nxt_string("var a = -0; a **= 3"),
nxt_string("-0") },
@@ -616,8 +622,10 @@ static njs_unit_test_t njs_test[] =
{ nxt_string("var a = -0; a **= '-3'"),
nxt_string("-Infinity") },

+#ifndef __NetBSD__ /* NetBSD 7: pow(0, negative) == -Infinity. */
{ nxt_string("var a = '-0'; a **= -2"),
nxt_string("Infinity") },
+#endif

{ nxt_string("var a = -3; a **= 0.1"),
nxt_string("NaN") },
@@ -7799,8 +7807,10 @@ static njs_unit_test_t njs_test[] =
{ nxt_string("Math.pow('0', 0.1)"),
nxt_string("0") },

+#ifndef __NetBSD__ /* NetBSD 7: pow(0, negative) == -Infinity. */
{ nxt_string("Math.pow(0, '-0.1')"),
nxt_string("Infinity") },
+#endif

{ nxt_string("Math.pow(-0, 3)"),
nxt_string("-0") },
@@ -7811,8 +7821,10 @@ static njs_unit_test_t njs_test[] =
{ nxt_string("Math.pow(-0, '-3')"),
nxt_string("-Infinity") },

+#ifndef __NetBSD__ /* NetBSD 7: pow(0, negative) == -Infinity. */
{ nxt_string("Math.pow('-0', -2)"),
nxt_string("Infinity") },
+#endif

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

[njs] Fixed unit tests for NetBSD 7.

Dmitry Volyntsev 540 November 22, 2017 12:42PM



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

Online Users

Guests: 118
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