From 10d6e7ce0cf2237c7aa8fdf5cffde39684626eff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Bargull?= Date: Wed, 29 Apr 2015 17:43:55 +0200 Subject: [PATCH] Fix strict mode errors in built-ins/{isFinite, isNaN, parseFloat, parseInt, undefined} - Add missing "var" declarations and noStrict flags - Remove invalid noStrict flags Part of issue #35. --- test/built-ins/isFinite/S15.1.2.5_A2.1.js | 2 +- test/built-ins/isFinite/S15.1.2.5_A2.2.js | 1 - test/built-ins/isFinite/S15.1.2.5_A2.5.js | 2 +- test/built-ins/isNaN/S15.1.2.4_A2.1.js | 2 +- test/built-ins/isNaN/S15.1.2.4_A2.2.js | 1 - test/built-ins/isNaN/S15.1.2.4_A2.5.js | 2 +- test/built-ins/parseFloat/S15.1.2.3_A7.2.js | 1 - test/built-ins/parseInt/S15.1.2.2_A9.2.js | 1 - test/built-ins/undefined/15.1.1.3-3.js | 1 + test/built-ins/undefined/S15.1.1.3_A3.2.js | 2 +- 10 files changed, 6 insertions(+), 9 deletions(-) diff --git a/test/built-ins/isFinite/S15.1.2.5_A2.1.js b/test/built-ins/isFinite/S15.1.2.5_A2.1.js index d682f7621b..a409f4ebb5 100644 --- a/test/built-ins/isFinite/S15.1.2.5_A2.1.js +++ b/test/built-ins/isFinite/S15.1.2.5_A2.1.js @@ -14,7 +14,7 @@ if (isFinite.propertyIsEnumerable('length') !== false) { //CHECK#2 var result = true; -for (p in isFinite){ +for (var p in isFinite){ if (p === "length") { result = false; } diff --git a/test/built-ins/isFinite/S15.1.2.5_A2.2.js b/test/built-ins/isFinite/S15.1.2.5_A2.2.js index d29d44118f..aa36e80d3a 100644 --- a/test/built-ins/isFinite/S15.1.2.5_A2.2.js +++ b/test/built-ins/isFinite/S15.1.2.5_A2.2.js @@ -5,7 +5,6 @@ info: The length property of isFinite does not have the attribute DontDelete es5id: 15.1.2.5_A2.2 description: Checking use hasOwnProperty, delete -flags: [noStrict] includes: [$FAIL.js] ---*/ diff --git a/test/built-ins/isFinite/S15.1.2.5_A2.5.js b/test/built-ins/isFinite/S15.1.2.5_A2.5.js index 2a67381011..42057474c9 100644 --- a/test/built-ins/isFinite/S15.1.2.5_A2.5.js +++ b/test/built-ins/isFinite/S15.1.2.5_A2.5.js @@ -14,7 +14,7 @@ if (this.propertyIsEnumerable('isFinite') !== false) { //CHECK#2 var result = true; -for (p in this){ +for (var p in this){ if (p === "isFinite") { result = false; } diff --git a/test/built-ins/isNaN/S15.1.2.4_A2.1.js b/test/built-ins/isNaN/S15.1.2.4_A2.1.js index f79d203121..820f918b71 100644 --- a/test/built-ins/isNaN/S15.1.2.4_A2.1.js +++ b/test/built-ins/isNaN/S15.1.2.4_A2.1.js @@ -14,7 +14,7 @@ if (isNaN.propertyIsEnumerable('length') !== false) { //CHECK#2 var result = true; -for (p in isNaN){ +for (var p in isNaN){ if (p === "length") { result = false; } diff --git a/test/built-ins/isNaN/S15.1.2.4_A2.2.js b/test/built-ins/isNaN/S15.1.2.4_A2.2.js index cb9c5bb849..6d1e9663c6 100644 --- a/test/built-ins/isNaN/S15.1.2.4_A2.2.js +++ b/test/built-ins/isNaN/S15.1.2.4_A2.2.js @@ -5,7 +5,6 @@ info: The length property of isNaN does not have the attribute DontDelete es5id: 15.1.2.4_A2.2 description: Checking use hasOwnProperty, delete -flags: [noStrict] includes: [$FAIL.js] ---*/ diff --git a/test/built-ins/isNaN/S15.1.2.4_A2.5.js b/test/built-ins/isNaN/S15.1.2.4_A2.5.js index dcccf83668..645cd549f5 100644 --- a/test/built-ins/isNaN/S15.1.2.4_A2.5.js +++ b/test/built-ins/isNaN/S15.1.2.4_A2.5.js @@ -14,7 +14,7 @@ if (this.propertyIsEnumerable('isNaN') !== false) { //CHECK#2 var result = true; -for (p in this){ +for (var p in this){ if (p === "isNaN") { result = false; } diff --git a/test/built-ins/parseFloat/S15.1.2.3_A7.2.js b/test/built-ins/parseFloat/S15.1.2.3_A7.2.js index e5a00f1bde..08ad6282a2 100644 --- a/test/built-ins/parseFloat/S15.1.2.3_A7.2.js +++ b/test/built-ins/parseFloat/S15.1.2.3_A7.2.js @@ -5,7 +5,6 @@ info: The length property of parseFloat does not have the attribute DontDelete es5id: 15.1.2.3_A7.2 description: Checking use hasOwnProperty, delete -flags: [noStrict] includes: [$FAIL.js] ---*/ diff --git a/test/built-ins/parseInt/S15.1.2.2_A9.2.js b/test/built-ins/parseInt/S15.1.2.2_A9.2.js index 6e6be2f6b5..ee9e30390c 100644 --- a/test/built-ins/parseInt/S15.1.2.2_A9.2.js +++ b/test/built-ins/parseInt/S15.1.2.2_A9.2.js @@ -5,7 +5,6 @@ info: The length property of parseInt does not have the attribute DontDelete es5id: 15.1.2.2_A9.2 description: Checking use hasOwnProperty, delete -flags: [noStrict] includes: [$FAIL.js] ---*/ diff --git a/test/built-ins/undefined/15.1.1.3-3.js b/test/built-ins/undefined/15.1.1.3-3.js index cc55115cf5..0ad7d68ba0 100644 --- a/test/built-ins/undefined/15.1.1.3-3.js +++ b/test/built-ins/undefined/15.1.1.3-3.js @@ -9,6 +9,7 @@ es5id: 15.1.1.3-3 description: > undefined is not writable, simple assignment should return the rval value (11.13.1-6) +flags: [noStrict] includes: [runTestCase.js] ---*/ diff --git a/test/built-ins/undefined/S15.1.1.3_A3.2.js b/test/built-ins/undefined/S15.1.1.3_A3.2.js index e1699de130..abbb847b02 100644 --- a/test/built-ins/undefined/S15.1.1.3_A3.2.js +++ b/test/built-ins/undefined/S15.1.1.3_A3.2.js @@ -8,7 +8,7 @@ description: Use for-in statement ---*/ // CHECK#1 -for (prop in this) { +for (var prop in this) { if (prop === "undefined") { $ERROR('#1: The undefined is DontEnum'); }