From d7446f811a6bc8e2bf3d6d4fbb77c7906fbab954 Mon Sep 17 00:00:00 2001 From: JaimeLynSchatz Date: Sun, 26 Jan 2014 14:25:38 -0800 Subject: [PATCH] change assert to not assume a sorted list of arguments indices for Bugzilla 1159 --- test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-4.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-4.js b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-4.js index 49b65b109f..d998bb0ef7 100644 --- a/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-4.js +++ b/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-4.js @@ -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);