[njs] Test for right-associativity of exponential operator.

Valentin Bartenev vbart at nginx.com
Fri Dec 23 16:46:24 UTC 2016


details:   http://hg.nginx.org/njs/rev/58342f302de3
branches:  
changeset: 289:58342f302de3
user:      Valentin Bartenev <vbart at nginx.com>
date:      Fri Dec 23 19:42:15 2016 +0300
description:
Test for right-associativity of exponential operator.

diffstat:

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

diffs (13 lines):

diff -r f5225d9cc97b -r 58342f302de3 njs/test/njs_unit_test.c
--- a/njs/test/njs_unit_test.c	Mon Dec 19 14:19:59 2016 +0300
+++ b/njs/test/njs_unit_test.c	Fri Dec 23 19:42:15 2016 +0300
@@ -226,6 +226,9 @@ static njs_unit_test_t  njs_test[] =
 
     /* Exponentiation. */
 
+    { nxt_string("2 ** 3 ** 2"),
+      nxt_string("512") },
+
     { nxt_string("2 ** (3 ** 2)"),
       nxt_string("512") },
 


More information about the nginx-devel mailing list