Improve tests

- split test_bigfloat.js from test_bignum.js
- make test_date() compatible with node
- document Date constructor string argument format:
  should add test cases for invalid strings
- test_argument_scope(): only test this syntax error in strict mode:
  `var f = function(a = eval("var arguments")) {};`
This commit is contained in:
Charlie Gordon
2024-02-17 21:54:19 +01:00
parent 85fb2caeae
commit 74bdb4967c
5 changed files with 310 additions and 226 deletions

View File

@@ -441,6 +441,7 @@ test: qjs
./qjs tests/test_language.js
./qjs tests/test_builtin.js
./qjs tests/test_loop.js
./qjs tests/test_bignum.js
./qjs tests/test_std.js
./qjs tests/test_worker.js
ifdef CONFIG_SHARED_LIBS
@@ -453,7 +454,7 @@ endif
endif
ifdef CONFIG_BIGNUM
./qjs --bignum tests/test_op_overloading.js
./qjs --bignum tests/test_bignum.js
./qjs --bignum tests/test_bigfloat.js
./qjs --qjscalc tests/test_qjscalc.js
endif
ifdef CONFIG_M32
@@ -461,11 +462,12 @@ ifdef CONFIG_M32
./qjs32 tests/test_language.js
./qjs32 tests/test_builtin.js
./qjs32 tests/test_loop.js
./qjs32 tests/test_bignum.js
./qjs32 tests/test_std.js
./qjs32 tests/test_worker.js
ifdef CONFIG_BIGNUM
./qjs32 --bignum tests/test_op_overloading.js
./qjs32 --bignum tests/test_bignum.js
./qjs32 --bignum tests/test_bigfloat.js
./qjs32 --qjscalc tests/test_qjscalc.js
endif
endif