mirror of https://github.com/tc39/test262.git
change assert to not assume a sorted list of arguments indices for Bugzilla 1159
This commit is contained in:
parent
9b669da66c
commit
d7446f811a
|
@ -12,19 +12,19 @@ function testcase() {
|
|||
function testArgs2(x, y, z) {
|
||||
// Properties of the arguments object are enumerable.
|
||||
var a = Object.keys(arguments);
|
||||
if (a.length === 2 && a[0] === "0" && a[1] === "1")
|
||||
if (a.length === 2 && a[0] in arguments && a[1] in arguments)
|
||||
return true;
|
||||
}
|
||||
function testArgs3(x, y, z) {
|
||||
// Properties of the arguments object are enumerable.
|
||||
var a = Object.keys(arguments);
|
||||
if (a.length === 3 && a[0] === "0" && a[1] === "1" && a[2] === "2")
|
||||
if (a.length === 3 && a[0] in arguments && a[1] in arguments && a[2] in arguments)
|
||||
return true;
|
||||
}
|
||||
function testArgs4(x, y, z) {
|
||||
// Properties of the arguments object are enumerable.
|
||||
var a = Object.keys(arguments);
|
||||
if (a.length === 4 && a[0] === "0" && a[1] === "1" && a[2] === "2" && a[3] === "3")
|
||||
if (a.length === 4 && a[0] in arguments && a[1] in arguments && a[2] in arguments && a[3] in arguments)
|
||||
return true;
|
||||
}
|
||||
return testArgs2(1, 2) && testArgs3(1, 2, 3) && testArgs4(1, 2, 3, 4);
|
||||
|
|
Loading…
Reference in New Issue