[njs] Fixed njs_benchmark.

Dmitry Volyntsev xeioex at nginx.com
Wed Feb 20 18:18:36 UTC 2019


details:   https://hg.nginx.org/njs/rev/736cfe916b2b
branches:  
changeset: 792:736cfe916b2b
user:      hongzhidao <hongzhidao at gmail.com>
date:      Thu Feb 21 00:30:40 2019 +0800
description:
Fixed njs_benchmark.

diffstat:

 njs/test/njs_benchmark.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (48 lines):

diff -r 7bb252625b94 -r 736cfe916b2b njs/test/njs_benchmark.c
--- a/njs/test/njs_benchmark.c	Wed Feb 20 21:04:22 2019 +0300
+++ b/njs/test/njs_benchmark.c	Thu Feb 21 00:30:40 2019 +0800
@@ -54,7 +54,7 @@ njs_unit_test_benchmark(nxt_str_t *scrip
             goto done;
         }
 
-        (void) njs_vm_run(nvm);
+        (void) njs_vm_start(nvm);
 
         if (njs_vm_retval_to_ext_string(nvm, &s) != NXT_OK) {
             printf("njs_vm_retval_to_ext_string() failed\n");
@@ -112,7 +112,7 @@ main(int argc, char **argv)
     static nxt_str_t  fibo_number = nxt_string(
         "function fibo(n) {"
         "    if (n > 1)"
-        "        return fibo(n - 1) + fibo(n - 2)"
+        "        return fibo(n - 1) + fibo(n - 2);"
         "    return 1"
         "}"
         "fibo(32)");
@@ -120,7 +120,7 @@ main(int argc, char **argv)
     static nxt_str_t  fibo_ascii = nxt_string(
         "function fibo(n) {"
         "    if (n > 1)"
-        "        return fibo(n - 1) + fibo(n - 2)"
+        "        return fibo(n - 1) + fibo(n - 2);"
         "    return '.'"
         "}"
         "fibo(32).length");
@@ -129,7 +129,7 @@ main(int argc, char **argv)
         "var a = '\\x80'.toBytes();"
         "function fibo(n) {"
         "    if (n > 1)"
-        "        return fibo(n - 1) + fibo(n - 2)"
+        "        return fibo(n - 1) + fibo(n - 2);"
         "    return a"
         "}"
         "fibo(32).length");
@@ -137,7 +137,7 @@ main(int argc, char **argv)
     static nxt_str_t  fibo_utf8 = nxt_string(
         "function fibo(n) {"
         "    if (n > 1)"
-        "        return fibo(n - 1) + fibo(n - 2)"
+        "        return fibo(n - 1) + fibo(n - 2);"
         "    return 'α'"
         "}"
         "fibo(32).length");


More information about the nginx-devel mailing list