mirror of
https://github.com/bellard/quickjs.git
synced 2025-09-30 15:04:24 +03:00
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:
@@ -420,8 +420,12 @@ function test_argument_scope()
|
||||
var f;
|
||||
var c = "global";
|
||||
|
||||
f = function(a = eval("var arguments")) {};
|
||||
assert_throws(SyntaxError, f);
|
||||
(function() {
|
||||
"use strict";
|
||||
// XXX: node only throws in strict mode
|
||||
f = function(a = eval("var arguments")) {};
|
||||
assert_throws(SyntaxError, f);
|
||||
})();
|
||||
|
||||
f = function(a = eval("1"), b = arguments[0]) { return b; };
|
||||
assert(f(12), 12);
|
||||
|
Reference in New Issue
Block a user