mirror of
https://github.com/tc39/test262.git
synced 2025-07-28 08:24:23 +02:00
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.
This commit is contained in:
parent
87fd4e5699
commit
10d6e7ce0c
@ -14,7 +14,7 @@ if (isFinite.propertyIsEnumerable('length') !== false) {
|
|||||||
|
|
||||||
//CHECK#2
|
//CHECK#2
|
||||||
var result = true;
|
var result = true;
|
||||||
for (p in isFinite){
|
for (var p in isFinite){
|
||||||
if (p === "length") {
|
if (p === "length") {
|
||||||
result = false;
|
result = false;
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,6 @@
|
|||||||
info: The length property of isFinite does not have the attribute DontDelete
|
info: The length property of isFinite does not have the attribute DontDelete
|
||||||
es5id: 15.1.2.5_A2.2
|
es5id: 15.1.2.5_A2.2
|
||||||
description: Checking use hasOwnProperty, delete
|
description: Checking use hasOwnProperty, delete
|
||||||
flags: [noStrict]
|
|
||||||
includes: [$FAIL.js]
|
includes: [$FAIL.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ if (this.propertyIsEnumerable('isFinite') !== false) {
|
|||||||
|
|
||||||
//CHECK#2
|
//CHECK#2
|
||||||
var result = true;
|
var result = true;
|
||||||
for (p in this){
|
for (var p in this){
|
||||||
if (p === "isFinite") {
|
if (p === "isFinite") {
|
||||||
result = false;
|
result = false;
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,7 @@ if (isNaN.propertyIsEnumerable('length') !== false) {
|
|||||||
|
|
||||||
//CHECK#2
|
//CHECK#2
|
||||||
var result = true;
|
var result = true;
|
||||||
for (p in isNaN){
|
for (var p in isNaN){
|
||||||
if (p === "length") {
|
if (p === "length") {
|
||||||
result = false;
|
result = false;
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,6 @@
|
|||||||
info: The length property of isNaN does not have the attribute DontDelete
|
info: The length property of isNaN does not have the attribute DontDelete
|
||||||
es5id: 15.1.2.4_A2.2
|
es5id: 15.1.2.4_A2.2
|
||||||
description: Checking use hasOwnProperty, delete
|
description: Checking use hasOwnProperty, delete
|
||||||
flags: [noStrict]
|
|
||||||
includes: [$FAIL.js]
|
includes: [$FAIL.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ if (this.propertyIsEnumerable('isNaN') !== false) {
|
|||||||
|
|
||||||
//CHECK#2
|
//CHECK#2
|
||||||
var result = true;
|
var result = true;
|
||||||
for (p in this){
|
for (var p in this){
|
||||||
if (p === "isNaN") {
|
if (p === "isNaN") {
|
||||||
result = false;
|
result = false;
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,6 @@
|
|||||||
info: The length property of parseFloat does not have the attribute DontDelete
|
info: The length property of parseFloat does not have the attribute DontDelete
|
||||||
es5id: 15.1.2.3_A7.2
|
es5id: 15.1.2.3_A7.2
|
||||||
description: Checking use hasOwnProperty, delete
|
description: Checking use hasOwnProperty, delete
|
||||||
flags: [noStrict]
|
|
||||||
includes: [$FAIL.js]
|
includes: [$FAIL.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
|
@ -5,7 +5,6 @@
|
|||||||
info: The length property of parseInt does not have the attribute DontDelete
|
info: The length property of parseInt does not have the attribute DontDelete
|
||||||
es5id: 15.1.2.2_A9.2
|
es5id: 15.1.2.2_A9.2
|
||||||
description: Checking use hasOwnProperty, delete
|
description: Checking use hasOwnProperty, delete
|
||||||
flags: [noStrict]
|
|
||||||
includes: [$FAIL.js]
|
includes: [$FAIL.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
|
@ -9,6 +9,7 @@ es5id: 15.1.1.3-3
|
|||||||
description: >
|
description: >
|
||||||
undefined is not writable, simple assignment should return the
|
undefined is not writable, simple assignment should return the
|
||||||
rval value (11.13.1-6)
|
rval value (11.13.1-6)
|
||||||
|
flags: [noStrict]
|
||||||
includes: [runTestCase.js]
|
includes: [runTestCase.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ description: Use for-in statement
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
// CHECK#1
|
// CHECK#1
|
||||||
for (prop in this) {
|
for (var prop in this) {
|
||||||
if (prop === "undefined") {
|
if (prop === "undefined") {
|
||||||
$ERROR('#1: The undefined is DontEnum');
|
$ERROR('#1: The undefined is DontEnum');
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user