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