Skip to content
Snippets Groups Projects
Commit 5920e4e9 authored by Brian Terlson's avatar Brian Terlson
Browse files

Merge pull request #6 from JaimeLynSchatz/JaimeLynSchatz/fixBugz1159

change assert to not assume a sorted list of arguments indices (Fixes bugzilla 1159)
parents 019a62a8 d7446f81
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment