mirror of https://github.com/tc39/test262.git
Merge pull request #272 from anba/no-strict-tests
Enable strict mode for more built-in tests
This commit is contained in:
commit
cd53869494
|
@ -41,8 +41,7 @@ function isWritable(obj, name, verifyProp, value) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
writeSucceeded = (verifyProp && isEqualTo(obj, verifyProp, newValue)) ||
|
writeSucceeded = isEqualTo(obj, verifyProp || name, newValue);
|
||||||
isEqualTo(obj, name, newValue);
|
|
||||||
|
|
||||||
// Revert the change only if it was successful (in other cases, reverting
|
// Revert the change only if it was successful (in other cases, reverting
|
||||||
// is unnecessary and may trigger exceptions for certain property
|
// is unnecessary and may trigger exceptions for certain property
|
||||||
|
|
|
@ -5,12 +5,12 @@
|
||||||
info: The length property of Array has the attribute ReadOnly
|
info: The length property of Array has the attribute ReadOnly
|
||||||
es5id: 15.4.3_A2.3
|
es5id: 15.4.3_A2.3
|
||||||
description: Checking if varying the length property fails
|
description: Checking if varying the length property fails
|
||||||
flags: [noStrict]
|
includes: [propertyHelper.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
var x = Array.length;
|
var x = Array.length;
|
||||||
Array.length = Infinity;
|
verifyNotWritable(Array, "length", null, Infinity);
|
||||||
if (Array.length !== x) {
|
if (Array.length !== x) {
|
||||||
$ERROR('#1: x = Array.length; Array.length = Infinity; Array.length === x. Actual: ' + (Array.length));
|
$ERROR('#1: x = Array.length; Array.length = Infinity; Array.length === x. Actual: ' + (Array.length));
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,8 +5,7 @@
|
||||||
info: The Array.prototype property has the attribute DontDelete
|
info: The Array.prototype property has the attribute DontDelete
|
||||||
es5id: 15.4.3.1_A3
|
es5id: 15.4.3.1_A3
|
||||||
description: Checking if deleting the Array.prototype property fails
|
description: Checking if deleting the Array.prototype property fails
|
||||||
flags: [noStrict]
|
includes: [$FAIL.js, propertyHelper.js]
|
||||||
includes: [$FAIL.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
|
@ -14,14 +13,24 @@ if (Array.hasOwnProperty('prototype') !== true) {
|
||||||
$FAIL('#1: Array.hasOwnProperty(\'prototype\') === true. Actual: ' + (Array.hasOwnProperty('prototype')));
|
$FAIL('#1: Array.hasOwnProperty(\'prototype\') === true. Actual: ' + (Array.hasOwnProperty('prototype')));
|
||||||
}
|
}
|
||||||
|
|
||||||
delete Array.prototype;
|
verifyNotConfigurable(Array, "prototype");
|
||||||
|
|
||||||
//CHECK#2
|
//CHECK#2
|
||||||
if (Array.hasOwnProperty('prototype') !== true) {
|
try {
|
||||||
$ERROR('#2: delete Array.prototype; Array.hasOwnProperty(\'prototype\') === true. Actual: ' + (Array.hasOwnProperty('prototype')));
|
if((delete Array.prototype) !== false){
|
||||||
|
$ERROR('#2: Array.prototype has the attribute DontDelete');
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
if (e instanceof Test262Error) throw e;
|
||||||
|
assert(e instanceof TypeError);
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#3
|
//CHECK#3
|
||||||
if (Array.prototype === undefined) {
|
if (Array.hasOwnProperty('prototype') !== true) {
|
||||||
$ERROR('#3: delete Array.prototype; Array.prototype !== undefined');
|
$ERROR('#3: delete Array.prototype; Array.hasOwnProperty(\'prototype\') === true. Actual: ' + (Array.hasOwnProperty('prototype')));
|
||||||
|
}
|
||||||
|
|
||||||
|
//CHECK#4
|
||||||
|
if (Array.prototype === undefined) {
|
||||||
|
$ERROR('#4: delete Array.prototype; Array.prototype !== undefined');
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,12 +5,12 @@
|
||||||
info: The Array.prototype property has the attribute ReadOnly
|
info: The Array.prototype property has the attribute ReadOnly
|
||||||
es5id: 15.4.3.1_A4
|
es5id: 15.4.3.1_A4
|
||||||
description: Checking if varying the Array.prototype property fails
|
description: Checking if varying the Array.prototype property fails
|
||||||
flags: [noStrict]
|
includes: [propertyHelper.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
var x = Array.prototype;
|
var x = Array.prototype;
|
||||||
Array.prototype = 1;
|
verifyNotWritable(Array, "prototype", null, 1);
|
||||||
if (Array.prototype !== x) {
|
if (Array.prototype !== x) {
|
||||||
$ERROR('#1: x = Array.prototype; Array.prototype = 1; Array.prototype === x. Actual: ' + (Array.prototype));
|
$ERROR('#1: x = Array.prototype; Array.prototype = 1; Array.prototype === x. Actual: ' + (Array.prototype));
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
info: The length property of concat does not have the attribute DontDelete
|
info: The length property of concat does not have the attribute DontDelete
|
||||||
es5id: 15.4.4.4_A4.2
|
es5id: 15.4.4.4_A4.2
|
||||||
description: Checking use hasOwnProperty, delete
|
description: Checking use hasOwnProperty, delete
|
||||||
flags: [noStrict]
|
|
||||||
includes: [$FAIL.js]
|
includes: [$FAIL.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
|
|
|
@ -5,12 +5,12 @@
|
||||||
info: The length property of concat has the attribute ReadOnly
|
info: The length property of concat has the attribute ReadOnly
|
||||||
es5id: 15.4.4.4_A4.3
|
es5id: 15.4.4.4_A4.3
|
||||||
description: Checking if varying the length property fails
|
description: Checking if varying the length property fails
|
||||||
flags: [noStrict]
|
includes: [propertyHelper.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
var x = Array.prototype.concat.length;
|
var x = Array.prototype.concat.length;
|
||||||
Array.prototype.concat.length = Infinity;
|
verifyNotWritable(Array.prototype.concat, "length", null, Infinity);
|
||||||
if (Array.prototype.concat.length !== x) {
|
if (Array.prototype.concat.length !== x) {
|
||||||
$ERROR('#1: x = Array.prototype.concat.length; Array.prototype.concat.length = Infinity; Array.prototype.concat.length === x. Actual: ' + (Array.prototype.concat.length));
|
$ERROR('#1: x = Array.prototype.concat.length; Array.prototype.concat.length = Infinity; Array.prototype.concat.length === x. Actual: ' + (Array.prototype.concat.length));
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
info: The length property of join does not have the attribute DontDelete
|
info: The length property of join does not have the attribute DontDelete
|
||||||
es5id: 15.4.4.5_A6.2
|
es5id: 15.4.4.5_A6.2
|
||||||
description: Checking use hasOwnProperty, delete
|
description: Checking use hasOwnProperty, delete
|
||||||
flags: [noStrict]
|
|
||||||
includes: [$FAIL.js]
|
includes: [$FAIL.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
|
|
|
@ -5,12 +5,12 @@
|
||||||
info: The length property of join has the attribute ReadOnly
|
info: The length property of join has the attribute ReadOnly
|
||||||
es5id: 15.4.4.5_A6.3
|
es5id: 15.4.4.5_A6.3
|
||||||
description: Checking if varying the length property fails
|
description: Checking if varying the length property fails
|
||||||
flags: [noStrict]
|
includes: [propertyHelper.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
var x = Array.prototype.join.length;
|
var x = Array.prototype.join.length;
|
||||||
Array.prototype.join.length = Infinity;
|
verifyNotWritable(Array.prototype.join, "length", null, Infinity);
|
||||||
if (Array.prototype.join.length !== x) {
|
if (Array.prototype.join.length !== x) {
|
||||||
$ERROR('#1: x = Array.prototype.join.length; Array.prototype.join.length = Infinity; Array.prototype.join.length === x. Actual: ' + (Array.prototype.join.length));
|
$ERROR('#1: x = Array.prototype.join.length; Array.prototype.join.length = Infinity; Array.prototype.join.length === x. Actual: ' + (Array.prototype.join.length));
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
info: The length property of pop does not have the attribute DontDelete
|
info: The length property of pop does not have the attribute DontDelete
|
||||||
es5id: 15.4.4.6_A5.2
|
es5id: 15.4.4.6_A5.2
|
||||||
description: Checking use hasOwnProperty, delete
|
description: Checking use hasOwnProperty, delete
|
||||||
flags: [noStrict]
|
|
||||||
includes: [$FAIL.js]
|
includes: [$FAIL.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
|
|
|
@ -5,12 +5,12 @@
|
||||||
info: The length property of pop has the attribute ReadOnly
|
info: The length property of pop has the attribute ReadOnly
|
||||||
es5id: 15.4.4.6_A5.3
|
es5id: 15.4.4.6_A5.3
|
||||||
description: Checking if varying the length property fails
|
description: Checking if varying the length property fails
|
||||||
flags: [noStrict]
|
includes: [propertyHelper.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
var x = Array.prototype.pop.length;
|
var x = Array.prototype.pop.length;
|
||||||
Array.prototype.pop.length = Infinity;
|
verifyNotWritable(Array.prototype.pop, "length", null, Infinity);
|
||||||
if (Array.prototype.pop.length !== x) {
|
if (Array.prototype.pop.length !== x) {
|
||||||
$ERROR('#1: x = Array.prototype.pop.length; Array.prototype.pop.length = Infinity; Array.prototype.pop.length === x. Actual: ' + (Array.prototype.pop.length));
|
$ERROR('#1: x = Array.prototype.pop.length; Array.prototype.pop.length = Infinity; Array.prototype.pop.length === x. Actual: ' + (Array.prototype.pop.length));
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
info: The length property of push does not have the attribute DontDelete
|
info: The length property of push does not have the attribute DontDelete
|
||||||
es5id: 15.4.4.7_A6.2
|
es5id: 15.4.4.7_A6.2
|
||||||
description: Checking use hasOwnProperty, delete
|
description: Checking use hasOwnProperty, delete
|
||||||
flags: [noStrict]
|
|
||||||
includes: [$FAIL.js]
|
includes: [$FAIL.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
|
|
|
@ -5,12 +5,12 @@
|
||||||
info: The length property of push has the attribute ReadOnly
|
info: The length property of push has the attribute ReadOnly
|
||||||
es5id: 15.4.4.7_A6.3
|
es5id: 15.4.4.7_A6.3
|
||||||
description: Checking if varying the length property fails
|
description: Checking if varying the length property fails
|
||||||
flags: [noStrict]
|
includes: [propertyHelper.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
var x = Array.prototype.push.length;
|
var x = Array.prototype.push.length;
|
||||||
Array.prototype.push.length = Infinity;
|
verifyNotWritable(Array.prototype.push, "length", null, Infinity);
|
||||||
if (Array.prototype.push.length !== x) {
|
if (Array.prototype.push.length !== x) {
|
||||||
$ERROR('#1: x = Array.prototype.push.length; Array.prototype.push.length = Infinity; Array.prototype.push.length === x. Actual: ' + (Array.prototype.push.length));
|
$ERROR('#1: x = Array.prototype.push.length; Array.prototype.push.length = Infinity; Array.prototype.push.length === x. Actual: ' + (Array.prototype.push.length));
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
info: The length property of reverse does not have the attribute DontDelete
|
info: The length property of reverse does not have the attribute DontDelete
|
||||||
es5id: 15.4.4.8_A5.2
|
es5id: 15.4.4.8_A5.2
|
||||||
description: Checking use hasOwnProperty, delete
|
description: Checking use hasOwnProperty, delete
|
||||||
flags: [noStrict]
|
|
||||||
includes: [$FAIL.js]
|
includes: [$FAIL.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
|
|
|
@ -5,12 +5,12 @@
|
||||||
info: The length property of reverse has the attribute ReadOnly
|
info: The length property of reverse has the attribute ReadOnly
|
||||||
es5id: 15.4.4.8_A5.3
|
es5id: 15.4.4.8_A5.3
|
||||||
description: Checking if varying the length property fails
|
description: Checking if varying the length property fails
|
||||||
flags: [noStrict]
|
includes: [propertyHelper.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
var x = Array.prototype.reverse.length;
|
var x = Array.prototype.reverse.length;
|
||||||
Array.prototype.reverse.length = Infinity;
|
verifyNotWritable(Array.prototype.reverse, "length", null, Infinity);
|
||||||
if (Array.prototype.reverse.length !== x) {
|
if (Array.prototype.reverse.length !== x) {
|
||||||
$ERROR('#1: x = Array.prototype.reverse.length; Array.prototype.reverse.length = Infinity; Array.prototype.reverse.length === x. Actual: ' + (Array.prototype.reverse.length));
|
$ERROR('#1: x = Array.prototype.reverse.length; Array.prototype.reverse.length = Infinity; Array.prototype.reverse.length === x. Actual: ' + (Array.prototype.reverse.length));
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,12 +5,12 @@
|
||||||
info: The length property of shift has the attribute ReadOnly
|
info: The length property of shift has the attribute ReadOnly
|
||||||
es5id: 15.4.4.9_A5.3
|
es5id: 15.4.4.9_A5.3
|
||||||
description: Checking if varying the length property fails
|
description: Checking if varying the length property fails
|
||||||
flags: [noStrict]
|
includes: [propertyHelper.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
var x = Array.prototype.shift.length;
|
var x = Array.prototype.shift.length;
|
||||||
Array.prototype.shift.length = Infinity;
|
verifyNotWritable(Array.prototype.shift, "length", null, Infinity);
|
||||||
if (Array.prototype.shift.length !== x) {
|
if (Array.prototype.shift.length !== x) {
|
||||||
$ERROR('#1: x = Array.prototype.shift.length; Array.prototype.shift.length = Infinity; Array.prototype.shift.length === x. Actual: ' + (Array.prototype.shift.length));
|
$ERROR('#1: x = Array.prototype.shift.length; Array.prototype.shift.length = Infinity; Array.prototype.shift.length === x. Actual: ' + (Array.prototype.shift.length));
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,12 +5,12 @@
|
||||||
info: The length property of slice has the attribute ReadOnly
|
info: The length property of slice has the attribute ReadOnly
|
||||||
es5id: 15.4.4.10_A5.3
|
es5id: 15.4.4.10_A5.3
|
||||||
description: Checking if varying the length property fails
|
description: Checking if varying the length property fails
|
||||||
flags: [noStrict]
|
includes: [propertyHelper.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
var x = Array.prototype.slice.length;
|
var x = Array.prototype.slice.length;
|
||||||
Array.prototype.slice.length = Infinity;
|
verifyNotWritable(Array.prototype.slice, "length", null, Infinity);
|
||||||
if (Array.prototype.slice.length !== x) {
|
if (Array.prototype.slice.length !== x) {
|
||||||
$ERROR('#1: x = Array.prototype.slice.length; Array.prototype.slice.length = Infinity; Array.prototypeslice.length === x. Actual: ' + (Array.prototypeslice.length));
|
$ERROR('#1: x = Array.prototype.slice.length; Array.prototype.slice.length = Infinity; Array.prototypeslice.length === x. Actual: ' + (Array.prototypeslice.length));
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
info: The length property of sort does not have the attribute DontDelete
|
info: The length property of sort does not have the attribute DontDelete
|
||||||
es5id: 15.4.4.11_A7.2
|
es5id: 15.4.4.11_A7.2
|
||||||
description: Checking use hasOwnProperty, delete
|
description: Checking use hasOwnProperty, delete
|
||||||
flags: [noStrict]
|
|
||||||
includes: [$FAIL.js]
|
includes: [$FAIL.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
|
|
|
@ -5,12 +5,12 @@
|
||||||
info: The length property of sort has the attribute ReadOnly
|
info: The length property of sort has the attribute ReadOnly
|
||||||
es5id: 15.4.4.11_A7.3
|
es5id: 15.4.4.11_A7.3
|
||||||
description: Checking if varying the length fails
|
description: Checking if varying the length fails
|
||||||
flags: [noStrict]
|
includes: [propertyHelper.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
var x = Array.prototype.sort.length;
|
var x = Array.prototype.sort.length;
|
||||||
Array.prototype.sort.length = Infinity;
|
verifyNotWritable(Array.prototype.sort, "length", null, Infinity);
|
||||||
if (Array.prototype.sort.length !== x) {
|
if (Array.prototype.sort.length !== x) {
|
||||||
$ERROR('#1: x = Array.prototype.sort.length; Array.prototype.sort.length = Infinity; Array.prototype.sort.length === x. Actual: ' + (Array.prototype.sort.length));
|
$ERROR('#1: x = Array.prototype.sort.length; Array.prototype.sort.length = Infinity; Array.prototype.sort.length === x. Actual: ' + (Array.prototype.sort.length));
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
info: The length property of splice does not have the attribute DontDelete
|
info: The length property of splice does not have the attribute DontDelete
|
||||||
es5id: 15.4.4.12_A5.2
|
es5id: 15.4.4.12_A5.2
|
||||||
description: Checking use hasOwnProperty, delete
|
description: Checking use hasOwnProperty, delete
|
||||||
flags: [noStrict]
|
|
||||||
includes: [$FAIL.js]
|
includes: [$FAIL.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
|
|
|
@ -5,12 +5,12 @@
|
||||||
info: The length property of splice has the attribute ReadOnly
|
info: The length property of splice has the attribute ReadOnly
|
||||||
es5id: 15.4.4.12_A5.3
|
es5id: 15.4.4.12_A5.3
|
||||||
description: Checking if varying the length property fails
|
description: Checking if varying the length property fails
|
||||||
flags: [noStrict]
|
includes: [propertyHelper.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
var x = Array.prototype.splice.length;
|
var x = Array.prototype.splice.length;
|
||||||
Array.prototype.splice.length = Infinity;
|
verifyNotWritable(Array.prototype.splice, "length", null, Infinity);
|
||||||
if (Array.prototype.splice.length !== x) {
|
if (Array.prototype.splice.length !== x) {
|
||||||
$ERROR('#1: x = Array.prototype.splice.length; Array.prototype.splice.length = Infinity; Array.prototype.splice.length === x. Actual: ' + (Array.prototype.splice.length));
|
$ERROR('#1: x = Array.prototype.splice.length; Array.prototype.splice.length = Infinity; Array.prototype.splice.length === x. Actual: ' + (Array.prototype.splice.length));
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,12 +5,12 @@
|
||||||
info: The length property of toLocaleString has the attribute ReadOnly
|
info: The length property of toLocaleString has the attribute ReadOnly
|
||||||
es5id: 15.4.4.3_A4.3
|
es5id: 15.4.4.3_A4.3
|
||||||
description: Checking if varying the length property fails
|
description: Checking if varying the length property fails
|
||||||
flags: [noStrict]
|
includes: [propertyHelper.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
var x = Array.prototype.toLocaleString.length;
|
var x = Array.prototype.toLocaleString.length;
|
||||||
Array.prototype.toLocaleString.length = Infinity;
|
verifyNotWritable(Array.prototype.toLocaleString, "length", null, Infinity);
|
||||||
if (Array.prototype.toLocaleString.length !== x) {
|
if (Array.prototype.toLocaleString.length !== x) {
|
||||||
$ERROR('#1: x = Array.prototype.toLocaleString.length; Array.prototype.toLocaleString.length = Infinity; Array.prototype.toLocaleString.length === x. Actual: ' + (Array.prototype.toLocaleString.length));
|
$ERROR('#1: x = Array.prototype.toLocaleString.length; Array.prototype.toLocaleString.length = Infinity; Array.prototype.toLocaleString.length === x. Actual: ' + (Array.prototype.toLocaleString.length));
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
info: The length property of toString does not have the attribute DontDelete
|
info: The length property of toString does not have the attribute DontDelete
|
||||||
es5id: 15.4.4.2_A4.2
|
es5id: 15.4.4.2_A4.2
|
||||||
description: Checking use hasOwnProperty, delete
|
description: Checking use hasOwnProperty, delete
|
||||||
flags: [noStrict]
|
|
||||||
includes: [$FAIL.js]
|
includes: [$FAIL.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
|
|
|
@ -5,12 +5,12 @@
|
||||||
info: The length property of toString has the attribute ReadOnly
|
info: The length property of toString has the attribute ReadOnly
|
||||||
es5id: 15.4.4.2_A4.3
|
es5id: 15.4.4.2_A4.3
|
||||||
description: Checking if varying the length property fails
|
description: Checking if varying the length property fails
|
||||||
flags: [noStrict]
|
includes: [propertyHelper.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
var x = Array.prototype.toString.length;
|
var x = Array.prototype.toString.length;
|
||||||
Array.prototype.toString.length = Infinity;
|
verifyNotWritable(Array.prototype.toString, "length", null, Infinity);
|
||||||
if (Array.prototype.toString.length !== x) {
|
if (Array.prototype.toString.length !== x) {
|
||||||
$ERROR('#1: x = Array.prototype.toString.length; Array.prototype.toString.length = Infinity; Array.prototype.toString.length === x. Actual: ' + (Array.prototype.toString.length));
|
$ERROR('#1: x = Array.prototype.toString.length; Array.prototype.toString.length = Infinity; Array.prototype.toString.length === x. Actual: ' + (Array.prototype.toString.length));
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
info: The length property of unshift does not have the attribute DontDelete
|
info: The length property of unshift does not have the attribute DontDelete
|
||||||
es5id: 15.4.4.13_A5.2
|
es5id: 15.4.4.13_A5.2
|
||||||
description: Checking use hasOwnProperty, delete
|
description: Checking use hasOwnProperty, delete
|
||||||
flags: [noStrict]
|
|
||||||
includes: [$FAIL.js]
|
includes: [$FAIL.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
|
|
|
@ -5,12 +5,12 @@
|
||||||
info: The length property of unshift has the attribute ReadOnly
|
info: The length property of unshift has the attribute ReadOnly
|
||||||
es5id: 15.4.4.13_A5.3
|
es5id: 15.4.4.13_A5.3
|
||||||
description: Checking if varying the length property fails
|
description: Checking if varying the length property fails
|
||||||
flags: [noStrict]
|
includes: [propertyHelper.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
var x = Array.prototype.unshift.length;
|
var x = Array.prototype.unshift.length;
|
||||||
Array.prototype.unshift.length = Infinity;
|
verifyNotWritable(Array.prototype.unshift, "length", null, Infinity);
|
||||||
if (Array.prototype.unshift.length !== x) {
|
if (Array.prototype.unshift.length !== x) {
|
||||||
$ERROR('#1: x = Array.prototype.unshift.length; Array.prototype.unshift.length = Infinity; Array.prototype.unshift.length === x. Actual: ' + (Array.prototype.unshift.length));
|
$ERROR('#1: x = Array.prototype.unshift.length; Array.prototype.unshift.length = Infinity; Array.prototype.unshift.length === x. Actual: ' + (Array.prototype.unshift.length));
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,12 +5,12 @@
|
||||||
info: Boolean.prototype has the attribute ReadOnly
|
info: Boolean.prototype has the attribute ReadOnly
|
||||||
es5id: 15.6.3.1_A2
|
es5id: 15.6.3.1_A2
|
||||||
description: Checking if varying the Boolean.prototype property fails
|
description: Checking if varying the Boolean.prototype property fails
|
||||||
flags: [noStrict]
|
includes: [propertyHelper.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
// CHECK#1
|
// CHECK#1
|
||||||
x = Boolean.prototype;
|
var x = Boolean.prototype;
|
||||||
Boolean.prototype = 1;
|
verifyNotWritable(Boolean, "prototype", null, 1);
|
||||||
if (Boolean.prototype !== x) {
|
if (Boolean.prototype !== x) {
|
||||||
$ERROR('#1: Boolean.prototype has the attribute ReadOnly');
|
$ERROR('#1: Boolean.prototype has the attribute ReadOnly');
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,10 +5,17 @@
|
||||||
info: Boolean.prototype has the attribute DontDelete
|
info: Boolean.prototype has the attribute DontDelete
|
||||||
es5id: 15.6.3.1_A3
|
es5id: 15.6.3.1_A3
|
||||||
description: Checking if deleting the Boolean.prototype property fails
|
description: Checking if deleting the Boolean.prototype property fails
|
||||||
flags: [noStrict]
|
includes: [propertyHelper.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
// CHECK#1
|
// CHECK#1
|
||||||
|
verifyNotConfigurable(Boolean, "prototype");
|
||||||
|
|
||||||
|
try {
|
||||||
if (delete Boolean.prototype !== false) {
|
if (delete Boolean.prototype !== false) {
|
||||||
$ERROR('#1: Boolean.prototype has the attribute DontDelete');
|
$ERROR('#1: Boolean.prototype has the attribute DontDelete');
|
||||||
}
|
}
|
||||||
|
} catch (e) {
|
||||||
|
if (e instanceof Test262Error) throw e;
|
||||||
|
assert(e instanceof TypeError);
|
||||||
|
}
|
||||||
|
|
|
@ -7,11 +7,11 @@ info: >
|
||||||
attributes
|
attributes
|
||||||
es5id: 15.9.4.3_A3_T1
|
es5id: 15.9.4.3_A3_T1
|
||||||
description: Checking ReadOnly attribute
|
description: Checking ReadOnly attribute
|
||||||
flags: [noStrict]
|
includes: [propertyHelper.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
x = Date.UTC.length;
|
var x = Date.UTC.length;
|
||||||
Date.UTC.length = 1;
|
verifyNotWritable(Date.UTC, "length", null, 1);
|
||||||
if (Date.UTC.length !== x) {
|
if (Date.UTC.length !== x) {
|
||||||
$ERROR('#1: The Date.UTC.length has the attribute ReadOnly');
|
$ERROR('#1: The Date.UTC.length has the attribute ReadOnly');
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,11 +7,11 @@ info: >
|
||||||
attributes
|
attributes
|
||||||
es5id: 15.9.4.2_A3_T1
|
es5id: 15.9.4.2_A3_T1
|
||||||
description: Checking ReadOnly attribute
|
description: Checking ReadOnly attribute
|
||||||
flags: [noStrict]
|
includes: [propertyHelper.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
x = Date.parse.length;
|
var x = Date.parse.length;
|
||||||
Date.parse.length = 1;
|
verifyNotWritable(Date.parse, "length", null, 1);
|
||||||
if (Date.parse.length !== x) {
|
if (Date.parse.length !== x) {
|
||||||
$ERROR('#1: The Date.parse.length has the attribute ReadOnly');
|
$ERROR('#1: The Date.parse.length has the attribute ReadOnly');
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,11 +7,11 @@ info: >
|
||||||
attributes
|
attributes
|
||||||
es5id: 15.9.4.1_A1_T1
|
es5id: 15.9.4.1_A1_T1
|
||||||
description: Checking ReadOnly attribute
|
description: Checking ReadOnly attribute
|
||||||
flags: [noStrict]
|
includes: [propertyHelper.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
x = Date.prototype;
|
var x = Date.prototype;
|
||||||
Date.prototype = 1;
|
verifyNotWritable(Date, "prototype", null, 1);
|
||||||
if (Date.prototype !== x) {
|
if (Date.prototype !== x) {
|
||||||
$ERROR('#1: The Date.prototype has the attribute ReadOnly');
|
$ERROR('#1: The Date.prototype has the attribute ReadOnly');
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,13 +7,19 @@ info: >
|
||||||
attributes
|
attributes
|
||||||
es5id: 15.9.4.1_A1_T2
|
es5id: 15.9.4.1_A1_T2
|
||||||
description: Checking DontDelete attribute
|
description: Checking DontDelete attribute
|
||||||
flags: [noStrict]
|
includes: [propertyHelper.js]
|
||||||
includes: [$FAIL.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
|
verifyNotConfigurable(Date, "prototype");
|
||||||
|
|
||||||
|
try {
|
||||||
if (delete Date.prototype !== false) {
|
if (delete Date.prototype !== false) {
|
||||||
$ERROR('#1: The Date.prototype property has the attributes DontDelete');
|
$ERROR('#1: The Date.prototype property has the attributes DontDelete');
|
||||||
}
|
}
|
||||||
|
} catch (e) {
|
||||||
|
if (e instanceof Test262Error) throw e;
|
||||||
|
assert(e instanceof TypeError);
|
||||||
|
}
|
||||||
|
|
||||||
if (!Date.hasOwnProperty('prototype')) {
|
if (!Date.hasOwnProperty('prototype')) {
|
||||||
$FAIL('#2: The Date.prototype property has the attributes DontDelete');
|
$FAIL('#2: The Date.prototype property has the attributes DontDelete');
|
||||||
|
|
|
@ -7,11 +7,11 @@ info: >
|
||||||
DontDelete, DontEnum } attributes
|
DontDelete, DontEnum } attributes
|
||||||
es5id: 15.9.5.1_A3_T1
|
es5id: 15.9.5.1_A3_T1
|
||||||
description: Checking ReadOnly attribute
|
description: Checking ReadOnly attribute
|
||||||
flags: [noStrict]
|
includes: [propertyHelper.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
x = Date.prototype.constructor.length;
|
var x = Date.prototype.constructor.length;
|
||||||
Date.prototype.constructor.length = 1;
|
verifyNotWritable(Date.prototype.constructor, "length", null, 1);
|
||||||
if (Date.prototype.constructor.length !== x) {
|
if (Date.prototype.constructor.length !== x) {
|
||||||
$ERROR('#1: The Date.prototype.constructor.length has the attribute ReadOnly');
|
$ERROR('#1: The Date.prototype.constructor.length has the attribute ReadOnly');
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,11 +7,11 @@ info: >
|
||||||
DontEnum } attributes
|
DontEnum } attributes
|
||||||
es5id: 15.9.5.14_A3_T1
|
es5id: 15.9.5.14_A3_T1
|
||||||
description: Checking ReadOnly attribute
|
description: Checking ReadOnly attribute
|
||||||
flags: [noStrict]
|
includes: [propertyHelper.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
x = Date.prototype.getDate.length;
|
var x = Date.prototype.getDate.length;
|
||||||
Date.prototype.getDate.length = 1;
|
verifyNotWritable(Date.prototype.getDate, "length", null, 1);
|
||||||
if (Date.prototype.getDate.length !== x) {
|
if (Date.prototype.getDate.length !== x) {
|
||||||
$ERROR('#1: The Date.prototype.getDate.length has the attribute ReadOnly');
|
$ERROR('#1: The Date.prototype.getDate.length has the attribute ReadOnly');
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,11 +7,11 @@ info: >
|
||||||
DontEnum } attributes
|
DontEnum } attributes
|
||||||
es5id: 15.9.5.16_A3_T1
|
es5id: 15.9.5.16_A3_T1
|
||||||
description: Checking ReadOnly attribute
|
description: Checking ReadOnly attribute
|
||||||
flags: [noStrict]
|
includes: [propertyHelper.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
x = Date.prototype.getDay.length;
|
var x = Date.prototype.getDay.length;
|
||||||
Date.prototype.getDay.length = 1;
|
verifyNotWritable(Date.prototype.getDay, "length", null, 1);
|
||||||
if (Date.prototype.getDay.length !== x) {
|
if (Date.prototype.getDay.length !== x) {
|
||||||
$ERROR('#1: The Date.prototype.getDay.length has the attribute ReadOnly');
|
$ERROR('#1: The Date.prototype.getDay.length has the attribute ReadOnly');
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,11 +7,11 @@ info: >
|
||||||
DontDelete, DontEnum } attributes
|
DontDelete, DontEnum } attributes
|
||||||
es5id: 15.9.5.10_A3_T1
|
es5id: 15.9.5.10_A3_T1
|
||||||
description: Checking ReadOnly attribute
|
description: Checking ReadOnly attribute
|
||||||
flags: [noStrict]
|
includes: [propertyHelper.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
x = Date.prototype.getFullYear.length;
|
var x = Date.prototype.getFullYear.length;
|
||||||
Date.prototype.getFullYear.length = 1;
|
verifyNotWritable(Date.prototype.getFullYear, "length", null, 1);
|
||||||
if (Date.prototype.getFullYear.length !== x) {
|
if (Date.prototype.getFullYear.length !== x) {
|
||||||
$ERROR('#1: The Date.prototype.getFullYear.length has the attribute ReadOnly');
|
$ERROR('#1: The Date.prototype.getFullYear.length has the attribute ReadOnly');
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,11 +7,11 @@ info: >
|
||||||
DontEnum } attributes
|
DontEnum } attributes
|
||||||
es5id: 15.9.5.18_A3_T1
|
es5id: 15.9.5.18_A3_T1
|
||||||
description: Checking ReadOnly attribute
|
description: Checking ReadOnly attribute
|
||||||
flags: [noStrict]
|
includes: [propertyHelper.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
x = Date.prototype.getHours.length;
|
var x = Date.prototype.getHours.length;
|
||||||
Date.prototype.getHours.length = 1;
|
verifyNotWritable(Date.prototype.getHours, "length", null, 1);
|
||||||
if (Date.prototype.getHours.length !== x) {
|
if (Date.prototype.getHours.length !== x) {
|
||||||
$ERROR('#1: The Date.prototype.getHours.length has the attribute ReadOnly');
|
$ERROR('#1: The Date.prototype.getHours.length has the attribute ReadOnly');
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,11 +7,11 @@ info: >
|
||||||
DontDelete, DontEnum } attributes
|
DontDelete, DontEnum } attributes
|
||||||
es5id: 15.9.5.24_A3_T1
|
es5id: 15.9.5.24_A3_T1
|
||||||
description: Checking ReadOnly attribute
|
description: Checking ReadOnly attribute
|
||||||
flags: [noStrict]
|
includes: [propertyHelper.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
x = Date.prototype.getMilliseconds.length;
|
var x = Date.prototype.getMilliseconds.length;
|
||||||
Date.prototype.getMilliseconds.length = 1;
|
verifyNotWritable(Date.prototype.getMilliseconds, "length", null, 1);
|
||||||
if (Date.prototype.getMilliseconds.length !== x) {
|
if (Date.prototype.getMilliseconds.length !== x) {
|
||||||
$ERROR('#1: The Date.prototype.getMilliseconds.length has the attribute ReadOnly');
|
$ERROR('#1: The Date.prototype.getMilliseconds.length has the attribute ReadOnly');
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,11 +7,11 @@ info: >
|
||||||
DontDelete, DontEnum } attributes
|
DontDelete, DontEnum } attributes
|
||||||
es5id: 15.9.5.20_A3_T1
|
es5id: 15.9.5.20_A3_T1
|
||||||
description: Checking ReadOnly attribute
|
description: Checking ReadOnly attribute
|
||||||
flags: [noStrict]
|
includes: [propertyHelper.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
x = Date.prototype.getMinutes.length;
|
var x = Date.prototype.getMinutes.length;
|
||||||
Date.prototype.getMinutes.length = 1;
|
verifyNotWritable(Date.prototype.getMinutes, "length", null, 1);
|
||||||
if (Date.prototype.getMinutes.length !== x) {
|
if (Date.prototype.getMinutes.length !== x) {
|
||||||
$ERROR('#1: The Date.prototype.getMinutes.length has the attribute ReadOnly');
|
$ERROR('#1: The Date.prototype.getMinutes.length has the attribute ReadOnly');
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,11 +7,11 @@ info: >
|
||||||
DontEnum } attributes
|
DontEnum } attributes
|
||||||
es5id: 15.9.5.12_A3_T1
|
es5id: 15.9.5.12_A3_T1
|
||||||
description: Checking ReadOnly attribute
|
description: Checking ReadOnly attribute
|
||||||
flags: [noStrict]
|
includes: [propertyHelper.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
x = Date.prototype.getMonth.length;
|
var x = Date.prototype.getMonth.length;
|
||||||
Date.prototype.getMonth.length = 1;
|
verifyNotWritable(Date.prototype.getMonth, "length", null, 1);
|
||||||
if (Date.prototype.getMonth.length !== x) {
|
if (Date.prototype.getMonth.length !== x) {
|
||||||
$ERROR('#1: The Date.prototype.getMonth.length has the attribute ReadOnly');
|
$ERROR('#1: The Date.prototype.getMonth.length has the attribute ReadOnly');
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,11 +7,11 @@ info: >
|
||||||
DontDelete, DontEnum } attributes
|
DontDelete, DontEnum } attributes
|
||||||
es5id: 15.9.5.22_A3_T1
|
es5id: 15.9.5.22_A3_T1
|
||||||
description: Checking ReadOnly attribute
|
description: Checking ReadOnly attribute
|
||||||
flags: [noStrict]
|
includes: [propertyHelper.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
x = Date.prototype.getSeconds.length;
|
var x = Date.prototype.getSeconds.length;
|
||||||
Date.prototype.getSeconds.length = 1;
|
verifyNotWritable(Date.prototype.getSeconds, "length", null, 1);
|
||||||
if (Date.prototype.getSeconds.length !== x) {
|
if (Date.prototype.getSeconds.length !== x) {
|
||||||
$ERROR('#1: The Date.prototype.getSeconds.length has the attribute ReadOnly');
|
$ERROR('#1: The Date.prototype.getSeconds.length has the attribute ReadOnly');
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,11 +7,11 @@ info: >
|
||||||
DontEnum } attributes
|
DontEnum } attributes
|
||||||
es5id: 15.9.5.9_A3_T1
|
es5id: 15.9.5.9_A3_T1
|
||||||
description: Checking ReadOnly attribute
|
description: Checking ReadOnly attribute
|
||||||
flags: [noStrict]
|
includes: [propertyHelper.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
x = Date.prototype.getTime.length;
|
var x = Date.prototype.getTime.length;
|
||||||
Date.prototype.getTime.length = 1;
|
verifyNotWritable(Date.prototype.getTime, "length", null, 1);
|
||||||
if (Date.prototype.getTime.length !== x) {
|
if (Date.prototype.getTime.length !== x) {
|
||||||
$ERROR('#1: The Date.prototype.getTime.length has the attribute ReadOnly');
|
$ERROR('#1: The Date.prototype.getTime.length has the attribute ReadOnly');
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,11 +7,11 @@ info: >
|
||||||
DontDelete, DontEnum } attributes
|
DontDelete, DontEnum } attributes
|
||||||
es5id: 15.9.5.26_A3_T1
|
es5id: 15.9.5.26_A3_T1
|
||||||
description: Checking ReadOnly attribute
|
description: Checking ReadOnly attribute
|
||||||
flags: [noStrict]
|
includes: [propertyHelper.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
x = Date.prototype.getTimezoneOffset.length;
|
var x = Date.prototype.getTimezoneOffset.length;
|
||||||
Date.prototype.getTimezoneOffset.length = 1;
|
verifyNotWritable(Date.prototype.getTimezoneOffset, "length", null, 1);
|
||||||
if (Date.prototype.getTimezoneOffset.length !== x) {
|
if (Date.prototype.getTimezoneOffset.length !== x) {
|
||||||
$ERROR('#1: The Date.prototype.getTimezoneOffset.length has the attribute ReadOnly');
|
$ERROR('#1: The Date.prototype.getTimezoneOffset.length has the attribute ReadOnly');
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,11 +7,11 @@ info: >
|
||||||
DontDelete, DontEnum } attributes
|
DontDelete, DontEnum } attributes
|
||||||
es5id: 15.9.5.15_A3_T1
|
es5id: 15.9.5.15_A3_T1
|
||||||
description: Checking ReadOnly attribute
|
description: Checking ReadOnly attribute
|
||||||
flags: [noStrict]
|
includes: [propertyHelper.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
x = Date.prototype.getUTCDate.length;
|
var x = Date.prototype.getUTCDate.length;
|
||||||
Date.prototype.getUTCDate.length = 1;
|
verifyNotWritable(Date.prototype.getUTCDate, "length", null, 1);
|
||||||
if (Date.prototype.getUTCDate.length !== x) {
|
if (Date.prototype.getUTCDate.length !== x) {
|
||||||
$ERROR('#1: The Date.prototype.getUTCDate.length has the attribute ReadOnly');
|
$ERROR('#1: The Date.prototype.getUTCDate.length has the attribute ReadOnly');
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,11 +7,11 @@ info: >
|
||||||
DontDelete, DontEnum } attributes
|
DontDelete, DontEnum } attributes
|
||||||
es5id: 15.9.5.17_A3_T1
|
es5id: 15.9.5.17_A3_T1
|
||||||
description: Checking ReadOnly attribute
|
description: Checking ReadOnly attribute
|
||||||
flags: [noStrict]
|
includes: [propertyHelper.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
x = Date.prototype.getUTCDay.length;
|
var x = Date.prototype.getUTCDay.length;
|
||||||
Date.prototype.getUTCDay.length = 1;
|
verifyNotWritable(Date.prototype.getUTCDay, "length", null, 1);
|
||||||
if (Date.prototype.getUTCDay.length !== x) {
|
if (Date.prototype.getUTCDay.length !== x) {
|
||||||
$ERROR('#1: The Date.prototype.getUTCDay.length has the attribute ReadOnly');
|
$ERROR('#1: The Date.prototype.getUTCDay.length has the attribute ReadOnly');
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,11 +7,11 @@ info: >
|
||||||
DontDelete, DontEnum } attributes
|
DontDelete, DontEnum } attributes
|
||||||
es5id: 15.9.5.11_A3_T1
|
es5id: 15.9.5.11_A3_T1
|
||||||
description: Checking ReadOnly attribute
|
description: Checking ReadOnly attribute
|
||||||
flags: [noStrict]
|
includes: [propertyHelper.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
x = Date.prototype.getUTCFullYear.length;
|
var x = Date.prototype.getUTCFullYear.length;
|
||||||
Date.prototype.getUTCFullYear.length = 1;
|
verifyNotWritable(Date.prototype.getUTCFullYear, "length", null, 1);
|
||||||
if (Date.prototype.getUTCFullYear.length !== x) {
|
if (Date.prototype.getUTCFullYear.length !== x) {
|
||||||
$ERROR('#1: The Date.prototype.getUTCFullYear.length has the attribute ReadOnly');
|
$ERROR('#1: The Date.prototype.getUTCFullYear.length has the attribute ReadOnly');
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,11 +7,11 @@ info: >
|
||||||
DontDelete, DontEnum } attributes
|
DontDelete, DontEnum } attributes
|
||||||
es5id: 15.9.5.19_A3_T1
|
es5id: 15.9.5.19_A3_T1
|
||||||
description: Checking ReadOnly attribute
|
description: Checking ReadOnly attribute
|
||||||
flags: [noStrict]
|
includes: [propertyHelper.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
x = Date.prototype.getUTCHours.length;
|
var x = Date.prototype.getUTCHours.length;
|
||||||
Date.prototype.getUTCHours.length = 1;
|
verifyNotWritable(Date.prototype.getUTCHours, "length", null, 1);
|
||||||
if (Date.prototype.getUTCHours.length !== x) {
|
if (Date.prototype.getUTCHours.length !== x) {
|
||||||
$ERROR('#1: The Date.prototype.getUTCHours.length has the attribute ReadOnly');
|
$ERROR('#1: The Date.prototype.getUTCHours.length has the attribute ReadOnly');
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,11 +7,11 @@ info: >
|
||||||
DontDelete, DontEnum } attributes
|
DontDelete, DontEnum } attributes
|
||||||
es5id: 15.9.5.25_A3_T1
|
es5id: 15.9.5.25_A3_T1
|
||||||
description: Checking ReadOnly attribute
|
description: Checking ReadOnly attribute
|
||||||
flags: [noStrict]
|
includes: [propertyHelper.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
x = Date.prototype.getUTCMilliseconds.length;
|
var x = Date.prototype.getUTCMilliseconds.length;
|
||||||
Date.prototype.getUTCMilliseconds.length = 1;
|
verifyNotWritable(Date.prototype.getUTCMilliseconds, "length", null, 1);
|
||||||
if (Date.prototype.getUTCMilliseconds.length !== x) {
|
if (Date.prototype.getUTCMilliseconds.length !== x) {
|
||||||
$ERROR('#1: The Date.prototype.getUTCMilliseconds.length has the attribute ReadOnly');
|
$ERROR('#1: The Date.prototype.getUTCMilliseconds.length has the attribute ReadOnly');
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,11 +7,11 @@ info: >
|
||||||
DontDelete, DontEnum } attributes
|
DontDelete, DontEnum } attributes
|
||||||
es5id: 15.9.5.21_A3_T1
|
es5id: 15.9.5.21_A3_T1
|
||||||
description: Checking ReadOnly attribute
|
description: Checking ReadOnly attribute
|
||||||
flags: [noStrict]
|
includes: [propertyHelper.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
x = Date.prototype.getUTCMinutes.length;
|
var x = Date.prototype.getUTCMinutes.length;
|
||||||
Date.prototype.getUTCMinutes.length = 1;
|
verifyNotWritable(Date.prototype.getUTCMinutes, "length", null, 1);
|
||||||
if (Date.prototype.getUTCMinutes.length !== x) {
|
if (Date.prototype.getUTCMinutes.length !== x) {
|
||||||
$ERROR('#1: The Date.prototype.getUTCMinutes.length has the attribute ReadOnly');
|
$ERROR('#1: The Date.prototype.getUTCMinutes.length has the attribute ReadOnly');
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,11 +7,11 @@ info: >
|
||||||
DontDelete, DontEnum } attributes
|
DontDelete, DontEnum } attributes
|
||||||
es5id: 15.9.5.13_A3_T1
|
es5id: 15.9.5.13_A3_T1
|
||||||
description: Checking ReadOnly attribute
|
description: Checking ReadOnly attribute
|
||||||
flags: [noStrict]
|
includes: [propertyHelper.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
x = Date.prototype.getUTCMonth.length;
|
var x = Date.prototype.getUTCMonth.length;
|
||||||
Date.prototype.getUTCMonth.length = 1;
|
verifyNotWritable(Date.prototype.getUTCMonth, "length", null, 1);
|
||||||
if (Date.prototype.getUTCMonth.length !== x) {
|
if (Date.prototype.getUTCMonth.length !== x) {
|
||||||
$ERROR('#1: The Date.prototype.getUTCMonth.length has the attribute ReadOnly');
|
$ERROR('#1: The Date.prototype.getUTCMonth.length has the attribute ReadOnly');
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,11 +7,11 @@ info: >
|
||||||
DontDelete, DontEnum } attributes
|
DontDelete, DontEnum } attributes
|
||||||
es5id: 15.9.5.23_A3_T1
|
es5id: 15.9.5.23_A3_T1
|
||||||
description: Checking ReadOnly attribute
|
description: Checking ReadOnly attribute
|
||||||
flags: [noStrict]
|
includes: [propertyHelper.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
x = Date.prototype.getUTCSeconds.length;
|
var x = Date.prototype.getUTCSeconds.length;
|
||||||
Date.prototype.getUTCSeconds.length = 1;
|
verifyNotWritable(Date.prototype.getUTCSeconds, "length", null, 1);
|
||||||
if (Date.prototype.getUTCSeconds.length !== x) {
|
if (Date.prototype.getUTCSeconds.length !== x) {
|
||||||
$ERROR('#1: The Date.prototype.getUTCSeconds.length has the attribute ReadOnly');
|
$ERROR('#1: The Date.prototype.getUTCSeconds.length has the attribute ReadOnly');
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,11 +7,11 @@ info: >
|
||||||
DontEnum } attributes
|
DontEnum } attributes
|
||||||
es5id: 15.9.5.36_A3_T1
|
es5id: 15.9.5.36_A3_T1
|
||||||
description: Checking ReadOnly attribute
|
description: Checking ReadOnly attribute
|
||||||
flags: [noStrict]
|
includes: [propertyHelper.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
x = Date.prototype.setDate.length;
|
var x = Date.prototype.setDate.length;
|
||||||
Date.prototype.setDate.length = 1;
|
verifyNotWritable(Date.prototype.setDate, "length", null, 1);
|
||||||
if (Date.prototype.setDate.length !== x) {
|
if (Date.prototype.setDate.length !== x) {
|
||||||
$ERROR('#1: The Date.prototype.setDate.length has the attribute ReadOnly');
|
$ERROR('#1: The Date.prototype.setDate.length has the attribute ReadOnly');
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,11 +7,11 @@ info: >
|
||||||
DontDelete, DontEnum } attributes
|
DontDelete, DontEnum } attributes
|
||||||
es5id: 15.9.5.40_A3_T1
|
es5id: 15.9.5.40_A3_T1
|
||||||
description: Checking ReadOnly attribute
|
description: Checking ReadOnly attribute
|
||||||
flags: [noStrict]
|
includes: [propertyHelper.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
x = Date.prototype.setFullYear.length;
|
var x = Date.prototype.setFullYear.length;
|
||||||
Date.prototype.setFullYear.length = 1;
|
verifyNotWritable(Date.prototype.setFullYear, "length", null, 1);
|
||||||
if (Date.prototype.setFullYear.length !== x) {
|
if (Date.prototype.setFullYear.length !== x) {
|
||||||
$ERROR('#1: The Date.prototype.setFullYear.length has the attribute ReadOnly');
|
$ERROR('#1: The Date.prototype.setFullYear.length has the attribute ReadOnly');
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,11 +7,11 @@ info: >
|
||||||
DontEnum } attributes
|
DontEnum } attributes
|
||||||
es5id: 15.9.5.34_A3_T1
|
es5id: 15.9.5.34_A3_T1
|
||||||
description: Checking ReadOnly attribute
|
description: Checking ReadOnly attribute
|
||||||
flags: [noStrict]
|
includes: [propertyHelper.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
x = Date.prototype.setHours.length;
|
var x = Date.prototype.setHours.length;
|
||||||
Date.prototype.setHours.length = 1;
|
verifyNotWritable(Date.prototype.setHours, "length", null, 1);
|
||||||
if (Date.prototype.setHours.length !== x) {
|
if (Date.prototype.setHours.length !== x) {
|
||||||
$ERROR('#1: The Date.prototype.setHours.length has the attribute ReadOnly');
|
$ERROR('#1: The Date.prototype.setHours.length has the attribute ReadOnly');
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,11 +7,11 @@ info: >
|
||||||
DontDelete, DontEnum } attributes
|
DontDelete, DontEnum } attributes
|
||||||
es5id: 15.9.5.28_A3_T1
|
es5id: 15.9.5.28_A3_T1
|
||||||
description: Checking ReadOnly attribute
|
description: Checking ReadOnly attribute
|
||||||
flags: [noStrict]
|
includes: [propertyHelper.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
x = Date.prototype.setMilliseconds.length;
|
var x = Date.prototype.setMilliseconds.length;
|
||||||
Date.prototype.setMilliseconds.length = 1;
|
verifyNotWritable(Date.prototype.setMilliseconds, "length", null, 1);
|
||||||
if (Date.prototype.setMilliseconds.length !== x) {
|
if (Date.prototype.setMilliseconds.length !== x) {
|
||||||
$ERROR('#1: The Date.prototype.setMilliseconds.length has the attribute ReadOnly');
|
$ERROR('#1: The Date.prototype.setMilliseconds.length has the attribute ReadOnly');
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,11 +7,11 @@ info: >
|
||||||
DontDelete, DontEnum } attributes
|
DontDelete, DontEnum } attributes
|
||||||
es5id: 15.9.5.32_A3_T1
|
es5id: 15.9.5.32_A3_T1
|
||||||
description: Checking ReadOnly attribute
|
description: Checking ReadOnly attribute
|
||||||
flags: [noStrict]
|
includes: [propertyHelper.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
x = Date.prototype.setMinutes.length;
|
var x = Date.prototype.setMinutes.length;
|
||||||
Date.prototype.setMinutes.length = 1;
|
verifyNotWritable(Date.prototype.setMinutes, "length", null, 1);
|
||||||
if (Date.prototype.setMinutes.length !== x) {
|
if (Date.prototype.setMinutes.length !== x) {
|
||||||
$ERROR('#1: The Date.prototype.setMinutes.length has the attribute ReadOnly');
|
$ERROR('#1: The Date.prototype.setMinutes.length has the attribute ReadOnly');
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,11 +7,11 @@ info: >
|
||||||
DontEnum } attributes
|
DontEnum } attributes
|
||||||
es5id: 15.9.5.38_A3_T1
|
es5id: 15.9.5.38_A3_T1
|
||||||
description: Checking ReadOnly attribute
|
description: Checking ReadOnly attribute
|
||||||
flags: [noStrict]
|
includes: [propertyHelper.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
x = Date.prototype.setMonth.length;
|
var x = Date.prototype.setMonth.length;
|
||||||
Date.prototype.setMonth.length = 1;
|
verifyNotWritable(Date.prototype.setMonth, "length", null, 1);
|
||||||
if (Date.prototype.setMonth.length !== x) {
|
if (Date.prototype.setMonth.length !== x) {
|
||||||
$ERROR('#1: The Date.prototype.setMonth.length has the attribute ReadOnly');
|
$ERROR('#1: The Date.prototype.setMonth.length has the attribute ReadOnly');
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,11 +7,11 @@ info: >
|
||||||
DontDelete, DontEnum } attributes
|
DontDelete, DontEnum } attributes
|
||||||
es5id: 15.9.5.30_A3_T1
|
es5id: 15.9.5.30_A3_T1
|
||||||
description: Checking ReadOnly attribute
|
description: Checking ReadOnly attribute
|
||||||
flags: [noStrict]
|
includes: [propertyHelper.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
x = Date.prototype.setSeconds.length;
|
var x = Date.prototype.setSeconds.length;
|
||||||
Date.prototype.setSeconds.length = 1;
|
verifyNotWritable(Date.prototype.setSeconds, "length", null, 1);
|
||||||
if (Date.prototype.setSeconds.length !== x) {
|
if (Date.prototype.setSeconds.length !== x) {
|
||||||
$ERROR('#1: The Date.prototype.setSeconds.length has the attribute ReadOnly');
|
$ERROR('#1: The Date.prototype.setSeconds.length has the attribute ReadOnly');
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,11 +7,11 @@ info: >
|
||||||
DontEnum } attributes
|
DontEnum } attributes
|
||||||
es5id: 15.9.5.27_A3_T1
|
es5id: 15.9.5.27_A3_T1
|
||||||
description: Checking ReadOnly attribute
|
description: Checking ReadOnly attribute
|
||||||
flags: [noStrict]
|
includes: [propertyHelper.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
x = Date.prototype.setTime.length;
|
var x = Date.prototype.setTime.length;
|
||||||
Date.prototype.setTime.length = 1;
|
verifyNotWritable(Date.prototype.setTime, "length", null, 1);
|
||||||
if (Date.prototype.setTime.length !== x) {
|
if (Date.prototype.setTime.length !== x) {
|
||||||
$ERROR('#1: The Date.prototype.setTime.length has the attribute ReadOnly');
|
$ERROR('#1: The Date.prototype.setTime.length has the attribute ReadOnly');
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,11 +7,11 @@ info: >
|
||||||
DontDelete, DontEnum } attributes
|
DontDelete, DontEnum } attributes
|
||||||
es5id: 15.9.5.37_A3_T1
|
es5id: 15.9.5.37_A3_T1
|
||||||
description: Checking ReadOnly attribute
|
description: Checking ReadOnly attribute
|
||||||
flags: [noStrict]
|
includes: [propertyHelper.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
x = Date.prototype.setUTCDate.length;
|
var x = Date.prototype.setUTCDate.length;
|
||||||
Date.prototype.setUTCDate.length = 1;
|
verifyNotWritable(Date.prototype.setUTCDate, "length", null, 1);
|
||||||
if (Date.prototype.setUTCDate.length !== x) {
|
if (Date.prototype.setUTCDate.length !== x) {
|
||||||
$ERROR('#1: The Date.prototype.setUTCDate.length has the attribute ReadOnly');
|
$ERROR('#1: The Date.prototype.setUTCDate.length has the attribute ReadOnly');
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,11 +7,11 @@ info: >
|
||||||
DontDelete, DontEnum } attributes
|
DontDelete, DontEnum } attributes
|
||||||
es5id: 15.9.5.41_A3_T1
|
es5id: 15.9.5.41_A3_T1
|
||||||
description: Checking ReadOnly attribute
|
description: Checking ReadOnly attribute
|
||||||
flags: [noStrict]
|
includes: [propertyHelper.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
x = Date.prototype.setUTCFullYear.length;
|
var x = Date.prototype.setUTCFullYear.length;
|
||||||
Date.prototype.setUTCFullYear.length = 1;
|
verifyNotWritable(Date.prototype.setUTCFullYear, "length", null, 1);
|
||||||
if (Date.prototype.setUTCFullYear.length !== x) {
|
if (Date.prototype.setUTCFullYear.length !== x) {
|
||||||
$ERROR('#1: The Date.prototype.setUTCFullYear.length has the attribute ReadOnly');
|
$ERROR('#1: The Date.prototype.setUTCFullYear.length has the attribute ReadOnly');
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,11 +7,11 @@ info: >
|
||||||
DontDelete, DontEnum } attributes
|
DontDelete, DontEnum } attributes
|
||||||
es5id: 15.9.5.35_A3_T1
|
es5id: 15.9.5.35_A3_T1
|
||||||
description: Checking ReadOnly attribute
|
description: Checking ReadOnly attribute
|
||||||
flags: [noStrict]
|
includes: [propertyHelper.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
x = Date.prototype.setUTCHours.length;
|
var x = Date.prototype.setUTCHours.length;
|
||||||
Date.prototype.setUTCHours.length = 1;
|
verifyNotWritable(Date.prototype.setUTCHours, "length", null, 1);
|
||||||
if (Date.prototype.setUTCHours.length !== x) {
|
if (Date.prototype.setUTCHours.length !== x) {
|
||||||
$ERROR('#1: The Date.prototype.setUTCHours.length has the attribute ReadOnly');
|
$ERROR('#1: The Date.prototype.setUTCHours.length has the attribute ReadOnly');
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,11 +7,11 @@ info: >
|
||||||
DontDelete, DontEnum } attributes
|
DontDelete, DontEnum } attributes
|
||||||
es5id: 15.9.5.29_A3_T1
|
es5id: 15.9.5.29_A3_T1
|
||||||
description: Checking ReadOnly attribute
|
description: Checking ReadOnly attribute
|
||||||
flags: [noStrict]
|
includes: [propertyHelper.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
x = Date.prototype.setUTCMilliseconds.length;
|
var x = Date.prototype.setUTCMilliseconds.length;
|
||||||
Date.prototype.setUTCMilliseconds.length = 1;
|
verifyNotWritable(Date.prototype.setUTCMilliseconds, "length", null, 1);
|
||||||
if (Date.prototype.setUTCMilliseconds.length !== x) {
|
if (Date.prototype.setUTCMilliseconds.length !== x) {
|
||||||
$ERROR('#1: The Date.prototype.setUTCMilliseconds.length has the attribute ReadOnly');
|
$ERROR('#1: The Date.prototype.setUTCMilliseconds.length has the attribute ReadOnly');
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,11 +7,11 @@ info: >
|
||||||
DontDelete, DontEnum } attributes
|
DontDelete, DontEnum } attributes
|
||||||
es5id: 15.9.5.33_A3_T1
|
es5id: 15.9.5.33_A3_T1
|
||||||
description: Checking ReadOnly attribute
|
description: Checking ReadOnly attribute
|
||||||
flags: [noStrict]
|
includes: [propertyHelper.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
x = Date.prototype.setUTCMinutes.length;
|
var x = Date.prototype.setUTCMinutes.length;
|
||||||
Date.prototype.setUTCMinutes.length = 1;
|
verifyNotWritable(Date.prototype.setUTCMinutes, "length", null, 1);
|
||||||
if (Date.prototype.setUTCMinutes.length !== x) {
|
if (Date.prototype.setUTCMinutes.length !== x) {
|
||||||
$ERROR('#1: The Date.prototype.setUTCMinutes.length has the attribute ReadOnly');
|
$ERROR('#1: The Date.prototype.setUTCMinutes.length has the attribute ReadOnly');
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,11 +7,11 @@ info: >
|
||||||
DontDelete, DontEnum } attributes
|
DontDelete, DontEnum } attributes
|
||||||
es5id: 15.9.5.39_A3_T1
|
es5id: 15.9.5.39_A3_T1
|
||||||
description: Checking ReadOnly attribute
|
description: Checking ReadOnly attribute
|
||||||
flags: [noStrict]
|
includes: [propertyHelper.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
x = Date.prototype.setUTCMonth.length;
|
var x = Date.prototype.setUTCMonth.length;
|
||||||
Date.prototype.setUTCMonth.length = 1;
|
verifyNotWritable(Date.prototype.setUTCMonth, "length", null, 1);
|
||||||
if (Date.prototype.setUTCMonth.length !== x) {
|
if (Date.prototype.setUTCMonth.length !== x) {
|
||||||
$ERROR('#1: The Date.prototype.setUTCMonth.length has the attribute ReadOnly');
|
$ERROR('#1: The Date.prototype.setUTCMonth.length has the attribute ReadOnly');
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,11 +7,11 @@ info: >
|
||||||
DontDelete, DontEnum } attributes
|
DontDelete, DontEnum } attributes
|
||||||
es5id: 15.9.5.31_A3_T1
|
es5id: 15.9.5.31_A3_T1
|
||||||
description: Checking ReadOnly attribute
|
description: Checking ReadOnly attribute
|
||||||
flags: [noStrict]
|
includes: [propertyHelper.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
x = Date.prototype.setUTCSeconds.length;
|
var x = Date.prototype.setUTCSeconds.length;
|
||||||
Date.prototype.setUTCSeconds.length = 1;
|
verifyNotWritable(Date.prototype.setUTCSeconds, "length", null, 1);
|
||||||
if (Date.prototype.setUTCSeconds.length !== x) {
|
if (Date.prototype.setUTCSeconds.length !== x) {
|
||||||
$ERROR('#1: The Date.prototype.setUTCSeconds.length has the attribute ReadOnly');
|
$ERROR('#1: The Date.prototype.setUTCSeconds.length has the attribute ReadOnly');
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,11 +7,11 @@ info: >
|
||||||
DontDelete, DontEnum } attributes
|
DontDelete, DontEnum } attributes
|
||||||
es5id: 15.9.5.3_A3_T1
|
es5id: 15.9.5.3_A3_T1
|
||||||
description: Checking ReadOnly attribute
|
description: Checking ReadOnly attribute
|
||||||
flags: [noStrict]
|
includes: [propertyHelper.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
x = Date.prototype.toDateString.length;
|
var x = Date.prototype.toDateString.length;
|
||||||
Date.prototype.toDateString.length = 1;
|
verifyNotWritable(Date.prototype.toDateString, "length", null, 1);
|
||||||
if (Date.prototype.toDateString.length !== x) {
|
if (Date.prototype.toDateString.length !== x) {
|
||||||
$ERROR('#1: The Date.prototype.toDateString.length has the attribute ReadOnly');
|
$ERROR('#1: The Date.prototype.toDateString.length has the attribute ReadOnly');
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,11 +7,11 @@ info: >
|
||||||
DontDelete, DontEnum } attributes
|
DontDelete, DontEnum } attributes
|
||||||
es5id: 15.9.5.6_A3_T1
|
es5id: 15.9.5.6_A3_T1
|
||||||
description: Checking ReadOnly attribute
|
description: Checking ReadOnly attribute
|
||||||
flags: [noStrict]
|
includes: [propertyHelper.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
x = Date.prototype.toLocaleDateString.length;
|
var x = Date.prototype.toLocaleDateString.length;
|
||||||
Date.prototype.toLocaleDateString.length = 1;
|
verifyNotWritable(Date.prototype.toLocaleDateString, "length", null, 1);
|
||||||
if (Date.prototype.toLocaleDateString.length !== x) {
|
if (Date.prototype.toLocaleDateString.length !== x) {
|
||||||
$ERROR('#1: The Date.prototype.toLocaleDateString.length has the attribute ReadOnly');
|
$ERROR('#1: The Date.prototype.toLocaleDateString.length has the attribute ReadOnly');
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,11 +7,11 @@ info: >
|
||||||
DontDelete, DontEnum } attributes
|
DontDelete, DontEnum } attributes
|
||||||
es5id: 15.9.5.5_A3_T1
|
es5id: 15.9.5.5_A3_T1
|
||||||
description: Checking ReadOnly attribute
|
description: Checking ReadOnly attribute
|
||||||
flags: [noStrict]
|
includes: [propertyHelper.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
x = Date.prototype.toLocaleString.length;
|
var x = Date.prototype.toLocaleString.length;
|
||||||
Date.prototype.toLocaleString.length = 1;
|
verifyNotWritable(Date.prototype.toLocaleString, "length", null, 1);
|
||||||
if (Date.prototype.toLocaleString.length !== x) {
|
if (Date.prototype.toLocaleString.length !== x) {
|
||||||
$ERROR('#1: The Date.prototype.toLocaleString.length has the attribute ReadOnly');
|
$ERROR('#1: The Date.prototype.toLocaleString.length has the attribute ReadOnly');
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,11 +7,11 @@ info: >
|
||||||
DontDelete, DontEnum } attributes
|
DontDelete, DontEnum } attributes
|
||||||
es5id: 15.9.5.7_A3_T1
|
es5id: 15.9.5.7_A3_T1
|
||||||
description: Checking ReadOnly attribute
|
description: Checking ReadOnly attribute
|
||||||
flags: [noStrict]
|
includes: [propertyHelper.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
x = Date.prototype.toLocaleTimeString.length;
|
var x = Date.prototype.toLocaleTimeString.length;
|
||||||
Date.prototype.toLocaleTimeString.length = 1;
|
verifyNotWritable(Date.prototype.toLocaleTimeString, "length", null, 1);
|
||||||
if (Date.prototype.toLocaleTimeString.length !== x) {
|
if (Date.prototype.toLocaleTimeString.length !== x) {
|
||||||
$ERROR('#1: The Date.prototype.toLocaleTimeString.length has the attribute ReadOnly');
|
$ERROR('#1: The Date.prototype.toLocaleTimeString.length has the attribute ReadOnly');
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,11 +7,11 @@ info: >
|
||||||
DontEnum } attributes
|
DontEnum } attributes
|
||||||
es5id: 15.9.5.2_A3_T1
|
es5id: 15.9.5.2_A3_T1
|
||||||
description: Checking ReadOnly attribute
|
description: Checking ReadOnly attribute
|
||||||
flags: [noStrict]
|
includes: [propertyHelper.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
x = Date.prototype.toString.length;
|
var x = Date.prototype.toString.length;
|
||||||
Date.prototype.toString.length = 1;
|
verifyNotWritable(Date.prototype.toString, "length", null, 1);
|
||||||
if (Date.prototype.toString.length !== x) {
|
if (Date.prototype.toString.length !== x) {
|
||||||
$ERROR('#1: The Date.prototype.toString.length has the attribute ReadOnly');
|
$ERROR('#1: The Date.prototype.toString.length has the attribute ReadOnly');
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,11 +7,11 @@ info: >
|
||||||
DontDelete, DontEnum } attributes
|
DontDelete, DontEnum } attributes
|
||||||
es5id: 15.9.5.4_A3_T1
|
es5id: 15.9.5.4_A3_T1
|
||||||
description: Checking ReadOnly attribute
|
description: Checking ReadOnly attribute
|
||||||
flags: [noStrict]
|
includes: [propertyHelper.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
x = Date.prototype.toTimeString.length;
|
var x = Date.prototype.toTimeString.length;
|
||||||
Date.prototype.toTimeString.length = 1;
|
verifyNotWritable(Date.prototype.toTimeString, "length", null, 1);
|
||||||
if (Date.prototype.toTimeString.length !== x) {
|
if (Date.prototype.toTimeString.length !== x) {
|
||||||
$ERROR('#1: The Date.prototype.toTimeString.length has the attribute ReadOnly');
|
$ERROR('#1: The Date.prototype.toTimeString.length has the attribute ReadOnly');
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,11 +7,11 @@ info: >
|
||||||
DontDelete, DontEnum } attributes
|
DontDelete, DontEnum } attributes
|
||||||
es5id: 15.9.5.42_A3_T1
|
es5id: 15.9.5.42_A3_T1
|
||||||
description: Checking ReadOnly attribute
|
description: Checking ReadOnly attribute
|
||||||
flags: [noStrict]
|
includes: [propertyHelper.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
x = Date.prototype.toUTCString.length;
|
var x = Date.prototype.toUTCString.length;
|
||||||
Date.prototype.toUTCString.length = 1;
|
verifyNotWritable(Date.prototype.toUTCString, "length", null, 1);
|
||||||
if (Date.prototype.toUTCString.length !== x) {
|
if (Date.prototype.toUTCString.length !== x) {
|
||||||
$ERROR('#1: The Date.prototype.toUTCString.length has the attribute ReadOnly');
|
$ERROR('#1: The Date.prototype.toUTCString.length has the attribute ReadOnly');
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,11 +7,11 @@ info: >
|
||||||
DontEnum } attributes
|
DontEnum } attributes
|
||||||
es5id: 15.9.5.8_A3_T1
|
es5id: 15.9.5.8_A3_T1
|
||||||
description: Checking ReadOnly attribute
|
description: Checking ReadOnly attribute
|
||||||
flags: [noStrict]
|
includes: [propertyHelper.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
x = Date.prototype.valueOf.length;
|
var x = Date.prototype.valueOf.length;
|
||||||
Date.prototype.valueOf.length = 1;
|
verifyNotWritable(Date.prototype.valueOf, "length", null, 1);
|
||||||
if (Date.prototype.valueOf.length !== x) {
|
if (Date.prototype.valueOf.length !== x) {
|
||||||
$ERROR('#1: The Date.prototype.valueOf.length has the attribute ReadOnly');
|
$ERROR('#1: The Date.prototype.valueOf.length has the attribute ReadOnly');
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,14 +5,20 @@
|
||||||
info: Error.prototype property has the attributes {DontDelete}
|
info: Error.prototype property has the attributes {DontDelete}
|
||||||
es5id: 15.11.3.1_A1_T1
|
es5id: 15.11.3.1_A1_T1
|
||||||
description: Checking if deleting the Error.prototype property fails
|
description: Checking if deleting the Error.prototype property fails
|
||||||
flags: [noStrict]
|
includes: [propertyHelper.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
var proto=Error.prototype;
|
var proto=Error.prototype;
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
if(delete Error.prototype){
|
verifyNotConfigurable(Error, "prototype");
|
||||||
$ERROR('#1: delete Error.prototype return false');
|
try {
|
||||||
|
if ((delete Error.prototype) !== false) {
|
||||||
|
$ERROR('#1: Error.prototype has the attribute DontDelete');
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
if (e instanceof Test262Error) throw e;
|
||||||
|
assert(e instanceof TypeError);
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
info: Error.prototype property has the attributes {ReadOnly}
|
info: Error.prototype property has the attributes {ReadOnly}
|
||||||
es5id: 15.11.3.1_A3_T1
|
es5id: 15.11.3.1_A3_T1
|
||||||
description: Checking if varying the Error.prototype property fails
|
description: Checking if varying the Error.prototype property fails
|
||||||
flags: [noStrict]
|
includes: [propertyHelper.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -16,9 +16,9 @@ if (!(Error.hasOwnProperty('prototype'))) {
|
||||||
//
|
//
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
__obj = Error.prototype;
|
var __obj = Error.prototype;
|
||||||
|
|
||||||
Error.prototype = function(){return "shifted";};
|
verifyNotWritable(Error, "prototype", null, function(){return "shifted";});
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
//CHECK#2
|
//CHECK#2
|
||||||
|
@ -34,7 +34,7 @@ try {
|
||||||
Error.prototype();
|
Error.prototype();
|
||||||
$ERROR('#3: "Error.prototype()" lead to throwing exception');
|
$ERROR('#3: "Error.prototype()" lead to throwing exception');
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
;
|
if (e instanceof Test262Error) throw e;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -7,23 +7,22 @@ es5id: 15.3.5.1_A3_T1
|
||||||
description: >
|
description: >
|
||||||
Checking if varying the length property of
|
Checking if varying the length property of
|
||||||
Function("arg1,arg2,arg3","arg4,arg5", null) fails
|
Function("arg1,arg2,arg3","arg4,arg5", null) fails
|
||||||
flags: [noStrict]
|
includes: [$FAIL.js, propertyHelper.js]
|
||||||
includes: [$FAIL.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
f = new Function("arg1,arg2,arg3","arg4,arg5", null);
|
var f = new Function("arg1,arg2,arg3","arg4,arg5", null);
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
if (!(f.hasOwnProperty('length'))) {
|
if (!(f.hasOwnProperty('length'))) {
|
||||||
$FAIL('#1: the function has length property.');
|
$FAIL('#1: the function has length property.');
|
||||||
}
|
}
|
||||||
|
|
||||||
length = f.length;
|
var flength = f.length;
|
||||||
|
|
||||||
f.length = function(){};
|
verifyNotWritable(f, "length", null, function(){});
|
||||||
|
|
||||||
//CHECK#2
|
//CHECK#2
|
||||||
if (f.length !== length) {
|
if (f.length !== flength) {
|
||||||
$ERROR('#2: the function.length property has the attributes ReadOnly');
|
$ERROR('#2: the function.length property has the attributes ReadOnly');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -32,7 +31,7 @@ try {
|
||||||
f.length();
|
f.length();
|
||||||
$ERROR('#3: the function.length property has the attributes ReadOnly');
|
$ERROR('#3: the function.length property has the attributes ReadOnly');
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
;
|
if (e instanceof Test262Error) throw e;
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#4
|
//CHECK#4
|
||||||
|
|
|
@ -7,23 +7,22 @@ es5id: 15.3.5.1_A3_T2
|
||||||
description: >
|
description: >
|
||||||
Checking if varying the length property of
|
Checking if varying the length property of
|
||||||
Function("arg1,arg2,arg3", null) fails
|
Function("arg1,arg2,arg3", null) fails
|
||||||
flags: [noStrict]
|
includes: [$FAIL.js, propertyHelper.js]
|
||||||
includes: [$FAIL.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
f = Function("arg1,arg2,arg3", null);
|
var f = Function("arg1,arg2,arg3", null);
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
if (!(f.hasOwnProperty('length'))) {
|
if (!(f.hasOwnProperty('length'))) {
|
||||||
$FAIL('#1: the function has length property.');
|
$FAIL('#1: the function has length property.');
|
||||||
}
|
}
|
||||||
|
|
||||||
length = f.length;
|
var flength = f.length;
|
||||||
|
|
||||||
f.length = function(){};
|
verifyNotWritable(f, "length", null, function(){});
|
||||||
|
|
||||||
//CHECK#2
|
//CHECK#2
|
||||||
if (f.length !== length) {
|
if (f.length !== flength) {
|
||||||
$ERROR('#2: the function.length property has the attributes ReadOnly');
|
$ERROR('#2: the function.length property has the attributes ReadOnly');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -32,7 +31,7 @@ try {
|
||||||
f.length();
|
f.length();
|
||||||
$ERROR('#3: the function.length property has the attributes ReadOnly');
|
$ERROR('#3: the function.length property has the attributes ReadOnly');
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
;
|
if (e instanceof Test262Error) throw e;
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#4
|
//CHECK#4
|
||||||
|
|
|
@ -7,23 +7,22 @@ es5id: 15.3.5.1_A3_T3
|
||||||
description: >
|
description: >
|
||||||
Checking if varying the length property of
|
Checking if varying the length property of
|
||||||
Function("arg1,arg2,arg3","arg1,arg2","arg3", null) fails
|
Function("arg1,arg2,arg3","arg1,arg2","arg3", null) fails
|
||||||
flags: [noStrict]
|
includes: [$FAIL.js, propertyHelper.js]
|
||||||
includes: [$FAIL.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
f = new Function("arg1,arg2,arg3","arg1,arg2","arg3", null);
|
var f = new Function("arg1,arg2,arg3","arg1,arg2","arg3", null);
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
if (!(f.hasOwnProperty('length'))) {
|
if (!(f.hasOwnProperty('length'))) {
|
||||||
$FAIL('#1: the function has length property.');
|
$FAIL('#1: the function has length property.');
|
||||||
}
|
}
|
||||||
|
|
||||||
length = f.length;
|
var flength = f.length;
|
||||||
|
|
||||||
f.length = function(){};
|
verifyNotWritable(f, "length", null, function(){});
|
||||||
|
|
||||||
//CHECK#2
|
//CHECK#2
|
||||||
if (f.length !== length) {
|
if (f.length !== flength) {
|
||||||
$ERROR('#2: the function.length property has the attributes ReadOnly');
|
$ERROR('#2: the function.length property has the attributes ReadOnly');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -32,7 +31,7 @@ try {
|
||||||
f.length();
|
f.length();
|
||||||
$ERROR('#3: the function.length property has the attributes ReadOnly');
|
$ERROR('#3: the function.length property has the attributes ReadOnly');
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
;
|
if (e instanceof Test262Error) throw e;
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#4
|
//CHECK#4
|
||||||
|
|
|
@ -5,11 +5,12 @@
|
||||||
info: The Function.prototype property has the attribute ReadOnly
|
info: The Function.prototype property has the attribute ReadOnly
|
||||||
es5id: 15.3.3.1_A1
|
es5id: 15.3.3.1_A1
|
||||||
description: Checking if varying the Function.prototype property fails
|
description: Checking if varying the Function.prototype property fails
|
||||||
flags: [noStrict]
|
includes: [propertyHelper.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
var obj = Function.prototype;
|
var obj = Function.prototype;
|
||||||
Function.prototype = function(){return "shifted";};
|
|
||||||
|
verifyNotWritable(Function, "prototype", null, function(){return "shifted";});
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
if (Function.prototype !== obj) {
|
if (Function.prototype !== obj) {
|
||||||
|
|
|
@ -5,12 +5,22 @@
|
||||||
info: The Function.prototype property has the attribute DontDelete
|
info: The Function.prototype property has the attribute DontDelete
|
||||||
es5id: 15.3.3.1_A3
|
es5id: 15.3.3.1_A3
|
||||||
description: Checking if deleting the Function.prototype property fails
|
description: Checking if deleting the Function.prototype property fails
|
||||||
flags: [noStrict]
|
includes: [propertyHelper.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
delete Function.prototype;
|
verifyNotConfigurable(Function, "prototype");
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
if (!(Function.hasOwnProperty('prototype'))) {
|
try {
|
||||||
$ERROR('#1: the Function.prototype property has the attributes DontDelete.');
|
if ((delete Function.prototype) !== false) {
|
||||||
|
$ERROR('#1: Function.prototype has the attribute DontDelete');
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
if (e instanceof Test262Error) throw e;
|
||||||
|
assert(e instanceof TypeError);
|
||||||
|
}
|
||||||
|
|
||||||
|
//CHECK#2
|
||||||
|
if (!(Function.hasOwnProperty('prototype'))) {
|
||||||
|
$ERROR('#2: the Function.prototype property has the attributes DontDelete.');
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,23 +7,29 @@ es5id: 15.3.5.2_A1_T1
|
||||||
description: >
|
description: >
|
||||||
Checking if deleting the prototype property of Function("", null)
|
Checking if deleting the prototype property of Function("", null)
|
||||||
fails
|
fails
|
||||||
flags: [noStrict]
|
includes: [$FAIL.js, propertyHelper.js]
|
||||||
includes: [$FAIL.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
f = new Function("", null);
|
var f = new Function("", null);
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
if (!(f.hasOwnProperty('prototype'))) {
|
if (!(f.hasOwnProperty('prototype'))) {
|
||||||
$FAIL('#1: the function has length property.');
|
$FAIL('#1: the function has length property.');
|
||||||
}
|
}
|
||||||
|
|
||||||
fproto = f.prototype;
|
var fproto = f.prototype;
|
||||||
|
|
||||||
|
verifyNotConfigurable(f, "prototype");
|
||||||
|
|
||||||
//CHECK#2
|
//CHECK#2
|
||||||
if (delete f.prototype) {
|
try {
|
||||||
|
if ((delete f.prototype) !== false) {
|
||||||
$ERROR('#2: the prototype property has the attributes { DontDelete }');
|
$ERROR('#2: the prototype property has the attributes { DontDelete }');
|
||||||
}
|
}
|
||||||
|
} catch (e) {
|
||||||
|
if (e instanceof Test262Error) throw e;
|
||||||
|
assert(e instanceof TypeError);
|
||||||
|
}
|
||||||
|
|
||||||
//CHECK#3
|
//CHECK#3
|
||||||
if (f.prototype !== fproto) {
|
if (f.prototype !== fproto) {
|
||||||
|
|
|
@ -7,23 +7,29 @@ es5id: 15.3.5.2_A1_T2
|
||||||
description: >
|
description: >
|
||||||
Checking if deleting the prototype property of Function(void 0,
|
Checking if deleting the prototype property of Function(void 0,
|
||||||
"") fails
|
"") fails
|
||||||
flags: [noStrict]
|
includes: [$FAIL.js, propertyHelper.js]
|
||||||
includes: [$FAIL.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
f = Function(void 0, "");
|
var f = Function(void 0, "");
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
if (!(f.hasOwnProperty('prototype'))) {
|
if (!(f.hasOwnProperty('prototype'))) {
|
||||||
$FAIL('#1: the function has length property.');
|
$FAIL('#1: the function has length property.');
|
||||||
}
|
}
|
||||||
|
|
||||||
fproto = f.prototype;
|
var fproto = f.prototype;
|
||||||
|
|
||||||
|
verifyNotConfigurable(f, "prototype");
|
||||||
|
|
||||||
//CHECK#2
|
//CHECK#2
|
||||||
if (delete f.prototype) {
|
try {
|
||||||
|
if ((delete f.prototype) !== false) {
|
||||||
$ERROR('#2: the prototype property has the attributes { DontDelete }');
|
$ERROR('#2: the prototype property has the attributes { DontDelete }');
|
||||||
}
|
}
|
||||||
|
} catch (e) {
|
||||||
|
if (e instanceof Test262Error) throw e;
|
||||||
|
assert(e instanceof TypeError);
|
||||||
|
}
|
||||||
|
|
||||||
//CHECK#3
|
//CHECK#3
|
||||||
if (f.prototype !== fproto) {
|
if (f.prototype !== fproto) {
|
||||||
|
|
|
@ -7,8 +7,7 @@ es5id: 15.3.4.3_A10
|
||||||
description: >
|
description: >
|
||||||
Checking if varying the Function.prototype.apply.length property
|
Checking if varying the Function.prototype.apply.length property
|
||||||
fails
|
fails
|
||||||
flags: [noStrict]
|
includes: [$FAIL.js, propertyHelper.js]
|
||||||
includes: [$FAIL.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
|
@ -18,7 +17,7 @@ if (!(Function.prototype.apply.hasOwnProperty('length'))) {
|
||||||
|
|
||||||
var obj = Function.prototype.apply.length;
|
var obj = Function.prototype.apply.length;
|
||||||
|
|
||||||
Function.prototype.apply.length = function(){return "shifted";};
|
verifyNotWritable(Function.prototype.apply, "length", null, function(){return "shifted";});
|
||||||
|
|
||||||
//CHECK#2
|
//CHECK#2
|
||||||
if (Function.prototype.apply.length !== obj) {
|
if (Function.prototype.apply.length !== obj) {
|
||||||
|
|
|
@ -9,19 +9,13 @@ es5id: 15.3.4.5-15-3
|
||||||
description: >
|
description: >
|
||||||
Function.prototype.bind - The [[Writable]] attribute of length
|
Function.prototype.bind - The [[Writable]] attribute of length
|
||||||
property in F set as false
|
property in F set as false
|
||||||
flags: [noStrict]
|
includes: [propertyHelper.js]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
|
|
||||||
var canWritable = false;
|
|
||||||
var hasProperty = false;
|
|
||||||
function foo() { }
|
function foo() { }
|
||||||
var obj = foo.bind({});
|
var obj = foo.bind({});
|
||||||
hasProperty = obj.hasOwnProperty("length");
|
var flength = obj.length;
|
||||||
obj.length = 100;
|
|
||||||
canWritable = (obj.length === 100);
|
assert(obj.hasOwnProperty("length"));
|
||||||
return hasProperty && !canWritable;
|
verifyNotWritable(obj, "length", null, 100);
|
||||||
}
|
assert.sameValue(obj.length, flength);
|
||||||
runTestCase(testcase);
|
|
||||||
|
|
|
@ -7,8 +7,7 @@ es5id: 15.3.4.4_A10
|
||||||
description: >
|
description: >
|
||||||
Checking if varying the Function.prototype.call.length property
|
Checking if varying the Function.prototype.call.length property
|
||||||
fails
|
fails
|
||||||
flags: [noStrict]
|
includes: [$FAIL.js, propertyHelper.js]
|
||||||
includes: [$FAIL.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
|
@ -18,7 +17,7 @@ if (!(Function.prototype.call.hasOwnProperty('length'))) {
|
||||||
|
|
||||||
var obj = Function.prototype.call.length;
|
var obj = Function.prototype.call.length;
|
||||||
|
|
||||||
Function.prototype.call.length = function(){return "shifted";};
|
verifyNotWritable(Function.prototype.call, "length", null, function(){return "shifted";});
|
||||||
|
|
||||||
//CHECK#2
|
//CHECK#2
|
||||||
if (Function.prototype.call.length !== obj) {
|
if (Function.prototype.call.length !== obj) {
|
||||||
|
|
|
@ -7,8 +7,7 @@ es5id: 15.3.4.2_A10
|
||||||
description: >
|
description: >
|
||||||
Checking if varying the Function.prototype.toString.length
|
Checking if varying the Function.prototype.toString.length
|
||||||
property fails
|
property fails
|
||||||
flags: [noStrict]
|
includes: [$FAIL.js, propertyHelper.js]
|
||||||
includes: [$FAIL.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
|
@ -18,7 +17,7 @@ if (!(Function.prototype.toString.hasOwnProperty('length'))) {
|
||||||
|
|
||||||
var obj = Function.prototype.toString.length;
|
var obj = Function.prototype.toString.length;
|
||||||
|
|
||||||
Function.prototype.toString.length = function(){return "shifted";};
|
verifyNotWritable(Function.prototype.toString, "length", null, function(){return "shifted";});
|
||||||
|
|
||||||
//CHECK#2
|
//CHECK#2
|
||||||
if (Function.prototype.toString.length !== obj) {
|
if (Function.prototype.toString.length !== obj) {
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
info: The Infinity is ReadOnly
|
||||||
|
es5id: 15.1.1.2_A2_T1
|
||||||
|
description: Checking typeof Functions
|
||||||
|
includes: [propertyHelper.js, fnGlobalObject.js]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
// CHECK#1
|
||||||
|
verifyNotWritable(fnGlobalObject(), "Infinity", null, true);
|
||||||
|
if (typeof(Infinity) === "boolean") {
|
||||||
|
$ERROR('#1: Infinity = true; typeof(Infinity) !== "boolean". Actual: ' + (typeof(Infinity)));
|
||||||
|
}
|
|
@ -2,13 +2,14 @@
|
||||||
// This code is governed by the BSD license found in the LICENSE file.
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
/*---
|
/*---
|
||||||
info: The Infinity is not ReadOnly
|
info: The Infinity is ReadOnly
|
||||||
es5id: 15.1.1.2_A2_T2
|
es5id: 15.1.1.2_A2_T2
|
||||||
description: Checking typeof Functions
|
description: Checking typeof Functions
|
||||||
|
flags: [noStrict]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
// CHECK#1
|
// CHECK#1
|
||||||
var Finite = true;
|
Infinity = true;
|
||||||
if (typeof(Finite) !== "boolean") {
|
if (typeof(Infinity) === "boolean") {
|
||||||
$ERROR('#1: Finite = true; typeof(NaN) === "boolean". Actual: ' + (typeof(NaN)));
|
$ERROR('#1: Infinity = true; typeof(Infinity) !== "boolean". Actual: ' + (typeof(Infinity)));
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,21 @@
|
||||||
|
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
info: The Infinity is DontDelete
|
||||||
|
es5id: 15.1.1.2_A3_T1
|
||||||
|
description: Use delete
|
||||||
|
includes: [propertyHelper.js, fnGlobalObject.js]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
// CHECK#1
|
||||||
|
verifyNotConfigurable(fnGlobalObject(), "Infinity");
|
||||||
|
|
||||||
|
try {
|
||||||
|
if (delete fnGlobalObject().Infinity !== false) {
|
||||||
|
$ERROR('#1: delete Infinity === false.');
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
if (e instanceof Test262Error) throw e;
|
||||||
|
assert(e instanceof TypeError);
|
||||||
|
}
|
2
test/built-ins/Infinity/S15.1.1.2_A3.1.js → test/built-ins/Infinity/S15.1.1.2_A3_T2.js
Normal file → Executable file
2
test/built-ins/Infinity/S15.1.1.2_A3.1.js → test/built-ins/Infinity/S15.1.1.2_A3_T2.js
Normal file → Executable file
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
/*---
|
/*---
|
||||||
info: The Infinity is DontDelete
|
info: The Infinity is DontDelete
|
||||||
es5id: 15.1.1.2_A3.1
|
es5id: 15.1.1.2_A3_T2
|
||||||
description: Use delete
|
description: Use delete
|
||||||
flags: [noStrict]
|
flags: [noStrict]
|
||||||
---*/
|
---*/
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
/*---
|
/*---
|
||||||
info: The Infinity is DontEnum
|
info: The Infinity is DontEnum
|
||||||
es5id: 15.1.1.2_A3.2
|
es5id: 15.1.1.2_A4
|
||||||
description: Use for-in statement
|
description: Use for-in statement
|
||||||
---*/
|
---*/
|
||||||
|
|
|
@ -5,10 +5,17 @@
|
||||||
info: Value Property E of the Math Object has the attribute DontDelete
|
info: Value Property E of the Math Object has the attribute DontDelete
|
||||||
es5id: 15.8.1.1_A3
|
es5id: 15.8.1.1_A3
|
||||||
description: Checking if Math.E property has the attribute DontDelete
|
description: Checking if Math.E property has the attribute DontDelete
|
||||||
flags: [noStrict]
|
includes: [propertyHelper.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
|
verifyNotConfigurable(Math, "E");
|
||||||
|
|
||||||
// CHECK#1
|
// CHECK#1
|
||||||
|
try {
|
||||||
if (delete Math.E === true) {
|
if (delete Math.E === true) {
|
||||||
$ERROR('#1: Value Property E of the Math Object hasn\'t attribute DontDelete: \'Math.E === true\'');
|
$ERROR('#1: Value Property E of the Math Object hasn\'t attribute DontDelete: \'Math.E === true\'');
|
||||||
}
|
}
|
||||||
|
} catch (e) {
|
||||||
|
if (e instanceof Test262Error) throw e;
|
||||||
|
assert(e instanceof TypeError);
|
||||||
|
}
|
||||||
|
|
|
@ -5,12 +5,12 @@
|
||||||
info: Value Property E of the Math Object has the attribute ReadOnly
|
info: Value Property E of the Math Object has the attribute ReadOnly
|
||||||
es5id: 15.8.1.1_A4
|
es5id: 15.8.1.1_A4
|
||||||
description: Checking if Math.E property has the attribute ReadOnly
|
description: Checking if Math.E property has the attribute ReadOnly
|
||||||
flags: [noStrict]
|
includes: [propertyHelper.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
// CHECK#1
|
// CHECK#1
|
||||||
var x = Math.E;
|
var x = Math.E;
|
||||||
Math.E = 1;
|
verifyNotWritable(Math, "E", null, 1);
|
||||||
if (Math.E !== x) {
|
if (Math.E !== x) {
|
||||||
$ERROR('#1: Math.E hasn\'t ReadOnly: \'x = Math.E;Math.E = 1;Math.E === x\'');
|
$ERROR('#1: Math.E hasn\'t ReadOnly: \'x = Math.E;Math.E = 1;Math.E === x\'');
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,10 +5,17 @@
|
||||||
info: Value Property LN10 of the Math Object has the attribute DontDelete
|
info: Value Property LN10 of the Math Object has the attribute DontDelete
|
||||||
es5id: 15.8.1.2_A3
|
es5id: 15.8.1.2_A3
|
||||||
description: Checking if Math.LN10 property has the attribute DontDelete
|
description: Checking if Math.LN10 property has the attribute DontDelete
|
||||||
flags: [noStrict]
|
includes: [propertyHelper.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
|
verifyNotConfigurable(Math, "LN10");
|
||||||
|
|
||||||
// CHECK#1
|
// CHECK#1
|
||||||
|
try {
|
||||||
if (delete Math.LN10 === true) {
|
if (delete Math.LN10 === true) {
|
||||||
$ERROR('#1: Value Property LN10 of the Math Object hasn\'t attribute DontDelete: \'Math.LN10 === true\'');
|
$ERROR('#1: Value Property LN10 of the Math Object hasn\'t attribute DontDelete: \'Math.LN10 === true\'');
|
||||||
}
|
}
|
||||||
|
} catch (e) {
|
||||||
|
if (e instanceof Test262Error) throw e;
|
||||||
|
assert(e instanceof TypeError);
|
||||||
|
}
|
||||||
|
|
|
@ -5,12 +5,12 @@
|
||||||
info: Value Property LN10 of the Math Object has the attribute ReadOnly
|
info: Value Property LN10 of the Math Object has the attribute ReadOnly
|
||||||
es5id: 15.8.1.2_A4
|
es5id: 15.8.1.2_A4
|
||||||
description: Checking if Math.LN10 property has the attribute ReadOnly
|
description: Checking if Math.LN10 property has the attribute ReadOnly
|
||||||
flags: [noStrict]
|
includes: [propertyHelper.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
// CHECK#1
|
// CHECK#1
|
||||||
var x = Math.LN10;
|
var x = Math.LN10;
|
||||||
Math.LN10 = 1;
|
verifyNotWritable(Math, "LN10", null, 1);
|
||||||
if (Math.LN10 !== x) {
|
if (Math.LN10 !== x) {
|
||||||
$ERROR('#1: Math.LN10 hasn\'t ReadOnly: \'x = Math.LN10;Math.LN10 = 1;Math.LN10 === x\'');
|
$ERROR('#1: Math.LN10 hasn\'t ReadOnly: \'x = Math.LN10;Math.LN10 = 1;Math.LN10 === x\'');
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,10 +5,17 @@
|
||||||
info: Value Property LN2 of the Math Object has the attribute DontDelete
|
info: Value Property LN2 of the Math Object has the attribute DontDelete
|
||||||
es5id: 15.8.1.3_A3
|
es5id: 15.8.1.3_A3
|
||||||
description: Checking if Math.LN2 property has the attribute DontDelete
|
description: Checking if Math.LN2 property has the attribute DontDelete
|
||||||
flags: [noStrict]
|
includes: [propertyHelper.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
|
verifyNotConfigurable(Math, "LN2");
|
||||||
|
|
||||||
// CHECK#1
|
// CHECK#1
|
||||||
|
try {
|
||||||
if (delete Math.LN2 === true) {
|
if (delete Math.LN2 === true) {
|
||||||
$ERROR('#1: Value Property LN2 of the Math Object hasn\'t attribute DontDelete: \'Math.LN2 === true\'');
|
$ERROR('#1: Value Property LN2 of the Math Object hasn\'t attribute DontDelete: \'Math.LN2 === true\'');
|
||||||
}
|
}
|
||||||
|
} catch (e) {
|
||||||
|
if (e instanceof Test262Error) throw e;
|
||||||
|
assert(e instanceof TypeError);
|
||||||
|
}
|
||||||
|
|
|
@ -5,12 +5,12 @@
|
||||||
info: Value Property LN2 of the Math Object has the attribute ReadOnly
|
info: Value Property LN2 of the Math Object has the attribute ReadOnly
|
||||||
es5id: 15.8.1.3_A4
|
es5id: 15.8.1.3_A4
|
||||||
description: Checking if Math.LN2 property has the attribute DontDelete
|
description: Checking if Math.LN2 property has the attribute DontDelete
|
||||||
flags: [noStrict]
|
includes: [propertyHelper.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
// CHECK#1
|
// CHECK#1
|
||||||
var x = Math.LN2;
|
var x = Math.LN2;
|
||||||
Math.LN2 = 1;
|
verifyNotWritable(Math, "LN2", null, 1);
|
||||||
if (Math.LN2 !== x) {
|
if (Math.LN2 !== x) {
|
||||||
$ERROR('#1: Math.LN2 hasn\'t ReadOnly: \'x = Math.LN2;Math.LN2 = 1;Math.LN2 === x\'');
|
$ERROR('#1: Math.LN2 hasn\'t ReadOnly: \'x = Math.LN2;Math.LN2 = 1;Math.LN2 === x\'');
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,10 +5,17 @@
|
||||||
info: Value Property LOG10E of the Math Object has the attribute DontDelete
|
info: Value Property LOG10E of the Math Object has the attribute DontDelete
|
||||||
es5id: 15.8.1.5_A3
|
es5id: 15.8.1.5_A3
|
||||||
description: Checking if Math.LOG10E property has the attribute DontDelete
|
description: Checking if Math.LOG10E property has the attribute DontDelete
|
||||||
flags: [noStrict]
|
includes: [propertyHelper.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
|
verifyNotConfigurable(Math, "LOG10E");
|
||||||
|
|
||||||
// CHECK#1
|
// CHECK#1
|
||||||
|
try {
|
||||||
if (delete Math.LOG10E === true) {
|
if (delete Math.LOG10E === true) {
|
||||||
$ERROR('#1: Value Property LOG10E of the Math Object hasn\'t attribute DontDelete: \'Math.LOG10E === true\'');
|
$ERROR('#1: Value Property LOG10E of the Math Object hasn\'t attribute DontDelete: \'Math.LOG10E === true\'');
|
||||||
}
|
}
|
||||||
|
} catch (e) {
|
||||||
|
if (e instanceof Test262Error) throw e;
|
||||||
|
assert(e instanceof TypeError);
|
||||||
|
}
|
||||||
|
|
|
@ -5,12 +5,12 @@
|
||||||
info: Value Property LOG10E of the Math Object has the attribute ReadOnly
|
info: Value Property LOG10E of the Math Object has the attribute ReadOnly
|
||||||
es5id: 15.8.1.5_A4
|
es5id: 15.8.1.5_A4
|
||||||
description: Checking if Math.LOG10E property has the attribute ReadOnly
|
description: Checking if Math.LOG10E property has the attribute ReadOnly
|
||||||
flags: [noStrict]
|
includes: [propertyHelper.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
// CHECK#1
|
// CHECK#1
|
||||||
var x = Math.LOG10E;
|
var x = Math.LOG10E;
|
||||||
Math.LOG10E = 1;
|
verifyNotWritable(Math, "LOG10E", null, 1);
|
||||||
if (Math.LOG10E !== x) {
|
if (Math.LOG10E !== x) {
|
||||||
$ERROR('#1: Math.LOG10E hasn\'t ReadOnly: \'x = Math.LOG10E;Math.LOG10E = 1;Math.LOG10E === x\'');
|
$ERROR('#1: Math.LOG10E hasn\'t ReadOnly: \'x = Math.LOG10E;Math.LOG10E = 1;Math.LOG10E === x\'');
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,10 +5,17 @@
|
||||||
info: Value Property LOG2E of the Math Object has the attribute DontDelete
|
info: Value Property LOG2E of the Math Object has the attribute DontDelete
|
||||||
es5id: 15.8.1.4_A3
|
es5id: 15.8.1.4_A3
|
||||||
description: Checking if Math.LOG2E property has the attribute DontDelete
|
description: Checking if Math.LOG2E property has the attribute DontDelete
|
||||||
flags: [noStrict]
|
includes: [propertyHelper.js]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
|
verifyNotConfigurable(Math, "LOG2E");
|
||||||
|
|
||||||
// CHECK#1
|
// CHECK#1
|
||||||
|
try {
|
||||||
if (delete Math.LOG2E === true) {
|
if (delete Math.LOG2E === true) {
|
||||||
$ERROR('#1: Value Property LOG2E of the Math Object hasn\'t attribute DontDelete: \'Math.LOG2E === true\'');
|
$ERROR('#1: Value Property LOG2E of the Math Object hasn\'t attribute DontDelete: \'Math.LOG2E === true\'');
|
||||||
}
|
}
|
||||||
|
} catch (e) {
|
||||||
|
if (e instanceof Test262Error) throw e;
|
||||||
|
assert(e instanceof TypeError);
|
||||||
|
}
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue