es6 compatability updates

See also: https://github.com/tc39/test262/pull/29
This commit is contained in:
André Bargull 2014-02-04 20:37:40 +01:00 committed by Brian Terlson
parent c3a803b4a3
commit 5c5dffce8b
353 changed files with 1731 additions and 2384 deletions

View File

@ -34,5 +34,5 @@ if (typeof String.prototype.toLowerCase !== "function") $ERROR('#23: typeof Str
if (typeof String.prototype['toLowerCase'] !== "function") $ERROR('#24: typeof String.prototype["toLowerCase"] === "function". Actual: ' + (typeof String.prototype["toLowerCase"] )); if (typeof String.prototype['toLowerCase'] !== "function") $ERROR('#24: typeof String.prototype["toLowerCase"] === "function". Actual: ' + (typeof String.prototype["toLowerCase"] ));
if (typeof String.prototype.toUpperCase !== "function") $ERROR('#25: typeof String.prototype.toUpperCase === "function". Actual: ' + (typeof String.prototype.toUpperCase )); if (typeof String.prototype.toUpperCase !== "function") $ERROR('#25: typeof String.prototype.toUpperCase === "function". Actual: ' + (typeof String.prototype.toUpperCase ));
if (typeof String.prototype['toUpperCase'] !== "function") $ERROR('#26: typeof Array.prototype === "object". Actual: ' + (typeof Array.prototype )); if (typeof String.prototype['toUpperCase'] !== "function") $ERROR('#26: typeof Array.prototype === "object". Actual: ' + (typeof Array.prototype ));
if (typeof String.prototype.length !== "number") $ERROR('#27: typeof String.prototype.length === "number". Actual: ' + (typeof String.prototype.length )); if (typeof String.prototype.length !== "undefined") $ERROR('#27: typeof String.prototype.length === "undefined". Actual: ' + (typeof String.prototype.length ));
if (typeof String.prototype['length'] !== "number") $ERROR('#28: typeof String.prototype["length"] === "number". Actual: ' + (typeof String.prototype["length"] )); if (typeof String.prototype['length'] !== "undefined") $ERROR('#28: typeof String.prototype["length"] === "undefined". Actual: ' + (typeof String.prototype["length"] ));

View File

@ -6,7 +6,7 @@
/*--- /*---
es5id: 11.4.1-5-a-28-s es5id: 11.4.1-5-a-28-s
description: Strict Mode - TypeError is thrown when deleting RegExp.length description: Strict Mode - TypeError is not thrown when deleting RegExp.length
flags: [onlyStrict] flags: [onlyStrict]
includes: [runTestCase.js] includes: [runTestCase.js]
---*/ ---*/
@ -14,11 +14,7 @@ includes: [runTestCase.js]
function testcase() { function testcase() {
"use strict"; "use strict";
var a = new RegExp(); var a = new RegExp();
try { var b = delete RegExp.length;
var b = delete RegExp.length; return true;
return false;
} catch (e) {
return e instanceof TypeError;
}
} }
runTestCase(testcase); runTestCase(testcase);

View File

@ -4,7 +4,7 @@
/*--- /*---
info: The production Block can't be inside of expression info: The production Block can't be inside of expression
es5id: 12.1_A4_T2 es5id: 12.1_A4_T2
description: Checking if execution of "y={x}" fails description: Checking if execution of "y={x;}" fails
negative: SyntaxError negative: SyntaxError
---*/ ---*/

View File

@ -7,11 +7,14 @@
/*--- /*---
es5id: 12.14-1 es5id: 12.14-1
description: > description: >
catch doesn't change declaration scope - var initializer in catch var initializer in catch with same name as catch parameter is a
with same name as catch parameter changes parameter SyntaxError
negative: ^((?!NotEarlyError).)*$
includes: [runTestCase.js] includes: [runTestCase.js]
---*/ ---*/
throw NotEarlyError;
function testcase() { function testcase() {
foo = "prior to throw"; foo = "prior to throw";
try { try {

View File

@ -7,11 +7,14 @@
/*--- /*---
es5id: 12.14-2 es5id: 12.14-2
description: > description: >
catch doesn't change declaration scope - var initializer in catch var initializer in catch with same name as catch parameter is a
with same name as catch parameter changes parameter SyntaxError
negative: ^((?!NotEarlyError).)*$
includes: [runTestCase.js] includes: [runTestCase.js]
---*/ ---*/
throw NotEarlyError;
function testcase() { function testcase() {
function capturedFoo() {return foo}; function capturedFoo() {return foo};
foo = "prior to throw"; foo = "prior to throw";

View File

@ -33,6 +33,6 @@ function testcase() {
delete fun.length; delete fun.length;
verifyConfigurable = fun.hasOwnProperty("length"); verifyConfigurable = fun.hasOwnProperty("length");
return verifyValue && !verifyWritable && !verifyEnumerable && verifyConfigurable; return verifyValue && !verifyWritable && !verifyEnumerable && !verifyConfigurable;
} }
runTestCase(testcase); runTestCase(testcase);

View File

@ -2,7 +2,7 @@
// 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 length property of eval has the attribute DontDelete info: The length property of eval does not have the attribute DontDelete
es5id: 15.1.2.1_A4.2 es5id: 15.1.2.1_A4.2
description: Checking use hasOwnProperty, delete description: Checking use hasOwnProperty, delete
includes: [$FAIL.js] includes: [$FAIL.js]
@ -16,8 +16,8 @@ if (eval.hasOwnProperty('length') !== true) {
delete eval.length; delete eval.length;
//CHECK#2 //CHECK#2
if (eval.hasOwnProperty('length') !== true) { if (eval.hasOwnProperty('length') !== false) {
$ERROR('#2: delete eval.length; eval.hasOwnProperty(\'length\') === true. Actual: ' + (eval.hasOwnProperty('length'))); $ERROR('#2: delete eval.length; eval.hasOwnProperty(\'length\') === false. Actual: ' + (eval.hasOwnProperty('length')));
} }
//CHECK#3 //CHECK#3

View File

@ -2,7 +2,7 @@
// 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 length property of parseInt has the attribute DontDelete info: The length property of parseInt does not have the attribute DontDelete
es5id: 15.1.2.2_A9.2 es5id: 15.1.2.2_A9.2
description: Checking use hasOwnProperty, delete description: Checking use hasOwnProperty, delete
flags: [noStrict] flags: [noStrict]
@ -17,8 +17,8 @@ if (parseInt.hasOwnProperty('length') !== true) {
delete parseInt.length; delete parseInt.length;
//CHECK#2 //CHECK#2
if (parseInt.hasOwnProperty('length') !== true) { if (parseInt.hasOwnProperty('length') !== false) {
$ERROR('#2: delete parseInt.length; parseInt.hasOwnProperty(\'length\') === true. Actual: ' + (parseInt.hasOwnProperty('length'))); $ERROR('#2: delete parseInt.length; parseInt.hasOwnProperty(\'length\') === false. Actual: ' + (parseInt.hasOwnProperty('length')));
} }
//CHECK#3 //CHECK#3

View File

@ -2,7 +2,7 @@
// 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 length property of parseFloat has the attribute DontDelete info: The length property of parseFloat does not have the attribute DontDelete
es5id: 15.1.2.3_A7.2 es5id: 15.1.2.3_A7.2
description: Checking use hasOwnProperty, delete description: Checking use hasOwnProperty, delete
flags: [noStrict] flags: [noStrict]
@ -17,8 +17,8 @@ if (parseFloat.hasOwnProperty('length') !== true) {
delete parseFloat.length; delete parseFloat.length;
//CHECK#2 //CHECK#2
if (parseFloat.hasOwnProperty('length') !== true) { if (parseFloat.hasOwnProperty('length') !== false) {
$ERROR('#2: delete parseFloat.length; parseFloat.hasOwnProperty(\'length\') === true. Actual: ' + (parseFloat.hasOwnProperty('length'))); $ERROR('#2: delete parseFloat.length; parseFloat.hasOwnProperty(\'length\') === false. Actual: ' + (parseFloat.hasOwnProperty('length')));
} }
//CHECK#3 //CHECK#3

View File

@ -2,7 +2,7 @@
// 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 length property of isNaN has the attribute DontDelete info: The length property of isNaN does not have the attribute DontDelete
es5id: 15.1.2.4_A2.2 es5id: 15.1.2.4_A2.2
description: Checking use hasOwnProperty, delete description: Checking use hasOwnProperty, delete
flags: [noStrict] flags: [noStrict]
@ -17,8 +17,8 @@ if (isNaN.hasOwnProperty('length') !== true) {
delete isNaN.length; delete isNaN.length;
//CHECK#2 //CHECK#2
if (isNaN.hasOwnProperty('length') !== true) { if (isNaN.hasOwnProperty('length') !== false) {
$ERROR('#2: delete isNaN.length; isNaN.hasOwnProperty(\'length\') === true. Actual: ' + (isNaN.hasOwnProperty('length'))); $ERROR('#2: delete isNaN.length; isNaN.hasOwnProperty(\'length\') === false. Actual: ' + (isNaN.hasOwnProperty('length')));
} }
//CHECK#3 //CHECK#3

View File

@ -2,7 +2,7 @@
// 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 length property of isFinite has the attribute DontDelete info: The length property of isFinite does not have the attribute DontDelete
es5id: 15.1.2.5_A2.2 es5id: 15.1.2.5_A2.2
description: Checking use hasOwnProperty, delete description: Checking use hasOwnProperty, delete
flags: [noStrict] flags: [noStrict]
@ -17,8 +17,8 @@ if (isFinite.hasOwnProperty('length') !== true) {
delete isFinite.length; delete isFinite.length;
//CHECK#2 //CHECK#2
if (isFinite.hasOwnProperty('length') !== true) { if (isFinite.hasOwnProperty('length') !== false) {
$ERROR('#2: delete isFinite.length; isFinite.hasOwnProperty(\'length\') === true. Actual: ' + (isFinite.hasOwnProperty('length'))); $ERROR('#2: delete isFinite.length; isFinite.hasOwnProperty(\'length\') === false. Actual: ' + (isFinite.hasOwnProperty('length')));
} }
//CHECK#3 //CHECK#3

View File

@ -2,7 +2,7 @@
// 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 length property of decodeURI has the attribute DontDelete info: The length property of decodeURI does not have the attribute DontDelete
es5id: 15.1.3.1_A5.2 es5id: 15.1.3.1_A5.2
description: Checking use hasOwnProperty, delete description: Checking use hasOwnProperty, delete
flags: [noStrict] flags: [noStrict]
@ -17,8 +17,8 @@ if (decodeURI.hasOwnProperty('length') !== true) {
delete decodeURI.length; delete decodeURI.length;
//CHECK#2 //CHECK#2
if (decodeURI.hasOwnProperty('length') !== true) { if (decodeURI.hasOwnProperty('length') !== false) {
$ERROR('#2: delete decodeURI.length; decodeURI.hasOwnProperty(\'length\') === true. Actual: ' + (decodeURI.hasOwnProperty('length'))); $ERROR('#2: delete decodeURI.length; decodeURI.hasOwnProperty(\'length\') === false. Actual: ' + (decodeURI.hasOwnProperty('length')));
} }
//CHECK#3 //CHECK#3

View File

@ -2,7 +2,9 @@
// 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 length property of decodeURIComponent has the attribute DontDelete info: >
The length property of decodeURIComponent does not have the attribute
DontDelete
es5id: 15.1.3.2_A5.2 es5id: 15.1.3.2_A5.2
description: Checking use hasOwnProperty, delete description: Checking use hasOwnProperty, delete
includes: [$FAIL.js] includes: [$FAIL.js]
@ -16,8 +18,8 @@ if (decodeURIComponent.hasOwnProperty('length') !== true) {
delete decodeURIComponent.length; delete decodeURIComponent.length;
//CHECK#2 //CHECK#2
if (decodeURIComponent.hasOwnProperty('length') !== true) { if (decodeURIComponent.hasOwnProperty('length') !== false) {
$ERROR('#2: delete decodeURIComponent.length; decodeURIComponent.hasOwnProperty(\'length\') === true. Actual: ' + (decodeURIComponent.hasOwnProperty('length'))); $ERROR('#2: delete decodeURIComponent.length; decodeURIComponent.hasOwnProperty(\'length\') === false. Actual: ' + (decodeURIComponent.hasOwnProperty('length')));
} }
//CHECK#3 //CHECK#3

View File

@ -2,7 +2,7 @@
// 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 length property of encodeURI has the attribute DontDelete info: The length property of encodeURI does not have the attribute DontDelete
es5id: 15.1.3.3_A5.2 es5id: 15.1.3.3_A5.2
description: Checking use hasOwnProperty, delete description: Checking use hasOwnProperty, delete
includes: [$FAIL.js] includes: [$FAIL.js]
@ -16,8 +16,8 @@ if (encodeURI.hasOwnProperty('length') !== true) {
delete encodeURI.length; delete encodeURI.length;
//CHECK#2 //CHECK#2
if (encodeURI.hasOwnProperty('length') !== true) { if (encodeURI.hasOwnProperty('length') !== false) {
$ERROR('#2: delete encodeURI.length; encodeURI.hasOwnProperty(\'length\') === true. Actual: ' + (encodeURI.hasOwnProperty('length'))); $ERROR('#2: delete encodeURI.length; encodeURI.hasOwnProperty(\'length\') === false. Actual: ' + (encodeURI.hasOwnProperty('length')));
} }
//CHECK#3 //CHECK#3

View File

@ -2,7 +2,9 @@
// 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 length property of encodeURIComponent has the attribute DontDelete info: >
The length property of encodeURIComponent does not have the attribute
DontDelete
es5id: 15.1.3.4_A5.2 es5id: 15.1.3.4_A5.2
description: Checking use hasOwnProperty, delete description: Checking use hasOwnProperty, delete
includes: [$FAIL.js] includes: [$FAIL.js]
@ -16,8 +18,8 @@ if (encodeURIComponent.hasOwnProperty('length') !== true) {
delete encodeURIComponent.length; delete encodeURIComponent.length;
//CHECK#2 //CHECK#2
if (encodeURIComponent.hasOwnProperty('length') !== true) { if (encodeURIComponent.hasOwnProperty('length') !== false) {
$ERROR('#2: delete encodeURIComponent.length; encodeURIComponent.hasOwnProperty(\'length\') === true. Actual: ' + (encodeURIComponent.hasOwnProperty('length'))); $ERROR('#2: delete encodeURIComponent.length; encodeURIComponent.hasOwnProperty(\'length\') === false. Actual: ' + (encodeURIComponent.hasOwnProperty('length')));
} }
//CHECK#3 //CHECK#3

View File

@ -2,7 +2,9 @@
// 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 RegExp.prototype.exec.length property has the attribute DontDelete info: >
The RegExp.prototype.exec.length property does not have the attribute
DontDelete
es5id: 15.10.6.2_A9 es5id: 15.10.6.2_A9
description: > description: >
Checking if deleting the RegExp.prototype.exec.length property Checking if deleting the RegExp.prototype.exec.length property
@ -16,11 +18,11 @@ if ((RegExp.prototype.exec.hasOwnProperty('length') !== true)) {
} }
//CHECK#1 //CHECK#1
if (delete RegExp.prototype.exec.length !== false) { if (delete RegExp.prototype.exec.length !== true) {
$ERROR('#1: delete RegExp.prototype.exec.length === false'); $ERROR('#1: delete RegExp.prototype.exec.length === true');
} }
//CHECK#2 //CHECK#2
if (RegExp.prototype.exec.hasOwnProperty('length') !== true) { if (RegExp.prototype.exec.hasOwnProperty('length') !== false) {
$ERROR('#2: delete RegExp.prototype.exec.length; RegExp.prototype.exec.hasOwnProperty(\'length\') === true'); $ERROR('#2: delete RegExp.prototype.exec.length; RegExp.prototype.exec.hasOwnProperty(\'length\') === false');
} }

View File

@ -2,7 +2,9 @@
// 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 RegExp.prototype.test.length property has the attribute DontDelete info: >
The RegExp.prototype.test.length property does not have the attribute
DontDelete
es5id: 15.10.6.3_A9 es5id: 15.10.6.3_A9
description: Checking if deleting RegExp.prototype.test.length property fails description: Checking if deleting RegExp.prototype.test.length property fails
includes: [$FAIL.js] includes: [$FAIL.js]
@ -14,11 +16,11 @@ if ((RegExp.prototype.exec.hasOwnProperty('length') !== true)) {
} }
//CHECK#1 //CHECK#1
if (delete RegExp.prototype.exec.length !== false) { if (delete RegExp.prototype.exec.length !== true) {
$ERROR('#1: delete RegExp.prototype.exec.length === false'); $ERROR('#1: delete RegExp.prototype.exec.length === true');
} }
//CHECK#2 //CHECK#2
if (RegExp.prototype.exec.hasOwnProperty('length') !== true) { if (RegExp.prototype.exec.hasOwnProperty('length') !== false) {
$ERROR('#2: delete RegExp.prototype.exec.length; RegExp.prototype.exec.hasOwnProperty(\'length\') === true'); $ERROR('#2: delete RegExp.prototype.exec.length; RegExp.prototype.exec.hasOwnProperty(\'length\') === false');
} }

View File

@ -2,7 +2,9 @@
// 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 RegExp.prototype.toString.length property has the attribute DontDelete info: >
The RegExp.prototype.toString.length property does not have the attribute
DontDelete
es5id: 15.10.6.4_A9 es5id: 15.10.6.4_A9
description: > description: >
Checking if deleting the RegExp.prototype.toString.length property Checking if deleting the RegExp.prototype.toString.length property
@ -16,11 +18,11 @@ if ((RegExp.prototype.toString.hasOwnProperty('length') !== true)) {
} }
//CHECK#1 //CHECK#1
if (delete RegExp.prototype.toString.length !== false) { if (delete RegExp.prototype.toString.length !== true) {
$ERROR('#1: delete RegExp.prototype.toString.length === false'); $ERROR('#1: delete RegExp.prototype.toString.length === true');
} }
//CHECK#2 //CHECK#2
if (RegExp.prototype.toString.hasOwnProperty('length') !== true) { if (RegExp.prototype.toString.hasOwnProperty('length') !== false) {
$ERROR('#2: delete RegExp.prototype.toString.length; RegExp.prototype.toString.hasOwnProperty(\'length\') === true'); $ERROR('#2: delete RegExp.prototype.toString.length; RegExp.prototype.toString.hasOwnProperty(\'length\') === false');
} }

View File

@ -6,12 +6,12 @@
/*--- /*---
es5id: 15.10.6 es5id: 15.10.6
description: RegExp.prototype is itself a RegExp description: RegExp.prototype is itself a not RegExp
includes: [runTestCase.js] includes: [runTestCase.js]
---*/ ---*/
function testcase() { function testcase() {
var s = Object.prototype.toString.call(RegExp.prototype); var s = Object.prototype.toString.call(RegExp.prototype);
return s === '[object RegExp]'; return s === '[object Object]';
} }
runTestCase(testcase); runTestCase(testcase);

View File

@ -6,11 +6,18 @@
/*--- /*---
es5id: 15.10.7.1-1 es5id: 15.10.7.1-1
description: RegExp.prototype.source is of type String description: RegExp.prototype.source is a non-generic accessor property
includes: [runTestCase.js] includes: [runTestCase.js]
---*/ ---*/
function testcase() { function testcase() {
return (typeof(RegExp.prototype.source)) === 'string'; try {
} RegExp.prototype.source;
} catch (e) {
if (e instanceof TypeError) {
return true;
}
}
return false;
}
runTestCase(testcase); runTestCase(testcase);

View File

@ -7,17 +7,18 @@
/*--- /*---
es5id: 15.10.7.1-2 es5id: 15.10.7.1-2
description: > description: >
RegExp.prototype.source is a data property with default attribute RegExp.prototype.source is an accessor property whose set accessor
values (false) function is undefined
includes: [runTestCase.js] includes: [runTestCase.js]
---*/ ---*/
function testcase() { function testcase() {
var d = Object.getOwnPropertyDescriptor(RegExp.prototype, 'source'); var d = Object.getOwnPropertyDescriptor(RegExp.prototype, 'source');
if (d.writable === false && if (typeof d.get === 'function' &&
d.set === undefined &&
d.enumerable === false && d.enumerable === false &&
d.configurable === false) { d.configurable === true) {
return true; return true;
} }
} }

View File

@ -2,24 +2,25 @@
// 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 RegExp instance source property has the attribute ReadOnly info: The RegExp.prototype source property does not have a set accessor
es5id: 15.10.7.1_A10 es5id: 15.10.7.1_A10
description: Checking if varying the source property fails description: Checking if varying the source property fails
includes: [$FAIL.js] includes: [$FAIL.js]
---*/ ---*/
__re = /./; __re = RegExp.prototype;
//CHECK#1 //CHECK#1
if (__re.hasOwnProperty('source') !== true) { if (__re.hasOwnProperty('source') !== true) {
$FAIL('#1: __re = /./; __re.hasOwnProperty(\'source\') === true'); $FAIL('#1: __re = RegExp.prototype; __re.hasOwnProperty(\'source\') === true');
} }
__obj = __re.source; __sample = /./;
__obj = __sample.source;
__re.source = "shifted"; __sample.source = "shifted";
//CHECK#2 //CHECK#2
if (__re.source !== __obj) { if (__sample.source !== __obj) {
$ERROR('#2: __re = /./; __obj = __re.source; __re.source = "shifted"; __re.source === __obj. Actual: ' + (__re.source)); $ERROR('#2: __sample = /./; __obj = __sample.source; __sample.source = "shifted"; __sample.source === __obj. Actual: ' + (__sample.source));
} }

View File

@ -2,24 +2,24 @@
// 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 RegExp instance source property has the attribute DontEnum info: The RegExp.prototype source property has the attribute DontEnum
es5id: 15.10.7.1_A8 es5id: 15.10.7.1_A8
description: > description: >
Checking if enumerating the source property of RegExp instance Checking if enumerating the source property of RegExp.prototype
fails fails
includes: [$FAIL.js] includes: [$FAIL.js]
---*/ ---*/
__re = new RegExp("[1-2]","i"); __re = RegExp.prototype;
//CHECK#0 //CHECK#0
if (__re.hasOwnProperty('source') !== true) { if (__re.hasOwnProperty('source') !== true) {
$FAIL('#0: __re = new RegExp("[1-2]","i"); __re.hasOwnProperty(\'source\') === true'); $FAIL('#0: __re = RegExp.prototype; __re.hasOwnProperty(\'source\') === true');
} }
//CHECK#1 //CHECK#1
if (__re.propertyIsEnumerable('source') !== false) { if (__re.propertyIsEnumerable('source') !== false) {
$ERROR('#1: __re = new RegExp("[1-2]","i"); __re.propertyIsEnumerable(\'source\') === false'); $ERROR('#1: __re = RegExp.prototype; __re.propertyIsEnumerable(\'source\') === false');
} }
//CHECK#2 //CHECK#2
@ -29,5 +29,5 @@ for (p in __re){
} }
if (count !== 0) { if (count !== 0) {
$ERROR('#2: count = 0; __re = new RegExp("[1-2]","i"); for (p in __re){ if (p==="source") count++; } count === 0. Actual: ' + (count)); $ERROR('#2: count = 0; __re = RegExp.prototype; for (p in __re){ if (p==="source") count++; } count === 0. Actual: ' + (count));
} }

View File

@ -2,25 +2,27 @@
// 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 RegExp instance source property has the attribute DontDelete info: >
The RegExp.prototype source property does not have the attribute
DontDelete
es5id: 15.10.7.1_A9 es5id: 15.10.7.1_A9
description: Checking if deleting the source property fails description: Checking if deleting the source property succeeds
includes: [$FAIL.js] includes: [$FAIL.js]
---*/ ---*/
__re = new RegExp; __re = RegExp.prototype;
//CHECK#0 //CHECK#0
if (__re.hasOwnProperty('source') !== true) { if (__re.hasOwnProperty('source') !== true) {
$FAIL('#0: __re = new RegExp; __re.hasOwnProperty(\'source\') === true'); $FAIL('#0: __re = RegExp.prototype; __re.hasOwnProperty(\'source\') === true');
} }
//CHECK#1 //CHECK#1
if ((delete __re.source) !== false) { if ((delete __re.source) !== true) {
$ERROR('#1: __re = new RegExp; (delete __re.source) === false'); $ERROR('#1: __re = RegExp.prototype; (delete __re.source) === true');
} }
//CHECK#2 //CHECK#2
if (__re.hasOwnProperty('source') !== true) { if (__re.hasOwnProperty('source') !== false) {
$ERROR('#2: __re = new RegExp;delete __re.source === true; __re.hasOwnProperty(\'source\') === true'); $ERROR('#2: __re = RegExp.prototype;delete __re.source === true; __re.hasOwnProperty(\'source\') === false');
} }

View File

@ -6,11 +6,18 @@
/*--- /*---
es5id: 15.10.7.2-1 es5id: 15.10.7.2-1
description: RegExp.prototype.global is of type Boolean description: RegExp.prototype.global is a non-generic accessor property
includes: [runTestCase.js] includes: [runTestCase.js]
---*/ ---*/
function testcase() { function testcase() {
return (typeof(RegExp.prototype.global)) === 'boolean'; try {
} RegExp.prototype.global;
} catch (e) {
if (e instanceof TypeError) {
return true;
}
}
return false;
}
runTestCase(testcase); runTestCase(testcase);

View File

@ -7,17 +7,18 @@
/*--- /*---
es5id: 15.10.7.2-2 es5id: 15.10.7.2-2
description: > description: >
RegExp.prototype.global is a data property with default attribute RegExp.prototype.global is an accessor property whose set accessor
values (false) function is undefined
includes: [runTestCase.js] includes: [runTestCase.js]
---*/ ---*/
function testcase() { function testcase() {
var desc = Object.getOwnPropertyDescriptor(RegExp.prototype, 'global'); var desc = Object.getOwnPropertyDescriptor(RegExp.prototype, 'global');
if (desc.writable === false && if (typeof desc.get === 'function' &&
desc.set === undefined &&
desc.enumerable === false && desc.enumerable === false &&
desc.configurable === false) { desc.configurable === true) {
return true; return true;
} }
} }

View File

@ -2,24 +2,25 @@
// 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 RegExp instance global property has the attribute ReadOnly info: The RegExp.prototype global property does not have a set accessor
es5id: 15.10.7.2_A10 es5id: 15.10.7.2_A10
description: Checking if varying the global property fails description: Checking if varying the global property fails
includes: [$FAIL.js] includes: [$FAIL.js]
---*/ ---*/
__re = /^|^/; __re = RegExp.prototype;
//CHECK#1 //CHECK#1
if (__re.hasOwnProperty('global') !== true) { if (__re.hasOwnProperty('global') !== true) {
$FAIL('#1: __re = /^|^/; __re.hasOwnProperty(\'global\') === true'); $FAIL('#1: __re = RegExp.prototype; __re.hasOwnProperty(\'global\') === true');
} }
__obj = __re.global; __sample = /^|^/;
__obj = __sample.global;
__re.global = "shifted"; __sample.global = "shifted";
//CHECK#2 //CHECK#2
if (__re.global !== __obj) { if (__sample.global !== __obj) {
$ERROR('#2: __re = /^|^/; __obj = __re.global; __re.global = "shifted"; __re.global === __obj. Actual: ' + (__re.global)); $ERROR('#2: __sample = /^|^/; __obj = __sample.global; __sample.global = "shifted"; __sample.global === __obj. Actual: ' + (__sample.global));
} }

View File

@ -2,24 +2,24 @@
// 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 RegExp instance global property has the attribute DontEnum info: The RegExp.prototype global property has the attribute DontEnum
es5id: 15.10.7.2_A8 es5id: 15.10.7.2_A8
description: > description: >
Checking if enumerating the global property of RegExp instance Checking if enumerating the global property of RegExp.prototype
fails fails
includes: [$FAIL.js] includes: [$FAIL.js]
---*/ ---*/
__re = new RegExp("[o-o]","m"); __re = RegExp.prototype;
//CHECK#0 //CHECK#0
if (__re.hasOwnProperty('global') !== true) { if (__re.hasOwnProperty('global') !== true) {
$FAIL('#0: __re = new RegExp("[o-o]","m"); __re.hasOwnProperty(\'global\') === true'); $FAIL('#0: __re = RegExp.prototype; __re.hasOwnProperty(\'global\') === true');
} }
//CHECK#1 //CHECK#1
if (__re.propertyIsEnumerable('global') !== false) { if (__re.propertyIsEnumerable('global') !== false) {
$ERROR('#1: __re = new RegExp("[o-o]","m"); __re.propertyIsEnumerable(\'global\') === false'); $ERROR('#1: __re = RegExp.prototype; __re.propertyIsEnumerable(\'global\') === false');
} }
//CHECK#2 //CHECK#2
@ -29,5 +29,5 @@ for (p in __re){
} }
if (count !== 0) { if (count !== 0) {
$ERROR('#2: count = 0; __re = new RegExp("[o-o]","m"); for (p in __re){ if (p==="global") count++; } count === 0. Actual: ' + (count)); $ERROR('#2: count = 0; __re = RegExp.prototype; for (p in __re){ if (p==="global") count++; } count === 0. Actual: ' + (count));
} }

View File

@ -2,25 +2,27 @@
// 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 RegExp instance global property has the attribute DontDelete info: >
The RegExp.prototype global property does not have the attribute
DontDelete
es5id: 15.10.7.2_A9 es5id: 15.10.7.2_A9
description: Checking if deleting the global property fails description: Checking if deleting the global property succeeds
includes: [$FAIL.js] includes: [$FAIL.js]
---*/ ---*/
__re = new RegExp; __re = RegExp.prototype;
//CHECK#0 //CHECK#0
if (__re.hasOwnProperty('global') !== true) { if (__re.hasOwnProperty('global') !== true) {
$FAIL('#0: __re = new RegExp; __re.hasOwnProperty(\'global\') === true'); $FAIL('#0: __re = RegExp.prototype; __re.hasOwnProperty(\'global\') === true');
} }
//CHECK#1 //CHECK#1
if ((delete __re.global) !== false) { if ((delete __re.global) !== true) {
$ERROR('#1: __re = new RegExp; (delete __re.global) === false'); $ERROR('#1: __re = RegExp.prototype; (delete __re.global) === true');
} }
//CHECK#2 //CHECK#2
if (__re.hasOwnProperty('global') !== true) { if (__re.hasOwnProperty('global') !== false) {
$ERROR('#2: __re = new RegExp;delete __re.global === true; __re.hasOwnProperty(\'global\') === true'); $ERROR('#2: __re = RegExp.prototype;delete __re.global === true; __re.hasOwnProperty(\'global\') === false');
} }

View File

@ -6,11 +6,18 @@
/*--- /*---
es5id: 15.10.7.3-1 es5id: 15.10.7.3-1
description: RegExp.prototype.ignoreCase is of type Boolean description: RegExp.prototype.ignoreCase is a non-generic accessor property
includes: [runTestCase.js] includes: [runTestCase.js]
---*/ ---*/
function testcase() { function testcase() {
return (typeof(RegExp.prototype.ignoreCase)) === 'boolean'; try {
} RegExp.prototype.ignoreCase;
} catch (e) {
if (e instanceof TypeError) {
return true;
}
}
return false;
}
runTestCase(testcase); runTestCase(testcase);

View File

@ -7,17 +7,18 @@
/*--- /*---
es5id: 15.10.7.3-2 es5id: 15.10.7.3-2
description: > description: >
RegExp.prototype.ignoreCase is a data property with default RegExp.prototype.ignoreCase is an accessor property whose set
attribute values (false) accessor function is undefined
includes: [runTestCase.js] includes: [runTestCase.js]
---*/ ---*/
function testcase() { function testcase() {
var d = Object.getOwnPropertyDescriptor(RegExp.prototype, 'ignoreCase'); var d = Object.getOwnPropertyDescriptor(RegExp.prototype, 'ignoreCase');
if (d.writable === false && if (typeof d.get === 'function' &&
d.set === undefined &&
d.enumerable === false && d.enumerable === false &&
d.configurable === false) { d.configurable === true) {
return true; return true;
} }
} }

View File

@ -2,24 +2,25 @@
// 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 RegExp instance ignoreCase property has the attribute ReadOnly info: The RegExp.prototype ignoreCase property does not have a set accessor
es5id: 15.10.7.3_A10 es5id: 15.10.7.3_A10
description: Checking if varying the ignoreCase property fails description: Checking if varying the ignoreCase property fails
includes: [$FAIL.js] includes: [$FAIL.js]
---*/ ---*/
__re = /a|b|c/; __re = RegExp.prototype;
//CHECK#1 //CHECK#1
if (__re.hasOwnProperty('ignoreCase') !== true) { if (__re.hasOwnProperty('ignoreCase') !== true) {
$FAIL('#1: __re = /a|b|c/; __re.hasOwnProperty(\'ignoreCase\') === true'); $FAIL('#1: __re = RegExp.prototype; __re.hasOwnProperty(\'ignoreCase\') === true');
} }
__obj = __re.ignoreCase; __sample = /a|b|c/;
__obj = __sample.ignoreCase;
__re.ignoreCase = "shifted"; __sample.ignoreCase = "shifted";
//CHECK#2 //CHECK#2
if (__re.ignoreCase !== __obj) { if (__sample.ignoreCase !== __obj) {
$ERROR('#2: __re = /a|b|c/; __obj = __re.ignoreCase; __re.ignoreCase = "shifted"; __re.ignoreCase === __obj. Actual: ' + (__re.ignoreCase)); $ERROR('#2: __sample = /a|b|c/; __obj = __sample.ignoreCase; __sample.ignoreCase = "shifted"; __sample.ignoreCase === __obj. Actual: ' + (__sample.ignoreCase));
} }

View File

@ -2,24 +2,24 @@
// 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 RegExp instance ignoreCase property has the attribute DontEnum info: The RegExp.prototype ignoreCase property has the attribute DontEnum
es5id: 15.10.7.3_A8 es5id: 15.10.7.3_A8
description: > description: >
Checking if enumerating the ignoreCase property of RegExp instance Checking if enumerating the ignoreCase property of
fails RegExp.prototype fails
includes: [$FAIL.js] includes: [$FAIL.js]
---*/ ---*/
__re = new RegExp("[|||||||]",""); __re = RegExp.prototype;
//CHECK#0 //CHECK#0
if (__re.hasOwnProperty('ignoreCase') !== true) { if (__re.hasOwnProperty('ignoreCase') !== true) {
$FAIL('#0: __re = new RegExp("[|||||||]",""); __re.hasOwnProperty(\'ignoreCase\') === true'); $FAIL('#0: __re = RegExp.prototype; __re.hasOwnProperty(\'ignoreCase\') === true');
} }
//CHECK#1 //CHECK#1
if (__re.propertyIsEnumerable('ignoreCase') !== false) { if (__re.propertyIsEnumerable('ignoreCase') !== false) {
$ERROR('#1: __re = new RegExp("[|||||||]",""); __re.propertyIsEnumerable(\'ignoreCase\') === false'); $ERROR('#1: __re = RegExp.prototype; __re.propertyIsEnumerable(\'ignoreCase\') === false');
} }
//CHECK#2 //CHECK#2
@ -29,5 +29,5 @@ for (p in __re){
} }
if (count !== 0) { if (count !== 0) {
$ERROR('#2: count = 0; __re = new RegExp("[|||||||]",""); for (p in __re){ if (p==="ignoreCase") count++; } count === 0. Actual: ' + (count)); $ERROR('#2: count = 0; __re = RegExp.prototype; for (p in __re){ if (p==="ignoreCase") count++; } count === 0. Actual: ' + (count));
} }

View File

@ -2,25 +2,27 @@
// 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 RegExp instance ignoreCase property has the attribute DontDelete info: >
The RegExp.prototype ignoreCase property does not have the attribute
DontDelete
es5id: 15.10.7.3_A9 es5id: 15.10.7.3_A9
description: Checking if deleting the ignoreCase property fails description: Checking if deleting the ignoreCase property succeeds
includes: [$FAIL.js] includes: [$FAIL.js]
---*/ ---*/
__re = new RegExp; __re = RegExp.prototype;
//CHECK#0 //CHECK#0
if (__re.hasOwnProperty('ignoreCase') !== true) { if (__re.hasOwnProperty('ignoreCase') !== true) {
$FAIL('#0: __re = new RegExp; __re.hasOwnProperty(\'ignoreCase\') === true'); $FAIL('#0: __re = RegExp.prototype; __re.hasOwnProperty(\'ignoreCase\') === true');
} }
//CHECK#1 //CHECK#1
if ((delete __re.ignoreCase) !== false) { if ((delete __re.ignoreCase) !== true) {
$ERROR('#1: __re = new RegExp; (delete __re.ignoreCase) === false'); $ERROR('#1: __re = RegExp.prototype; (delete __re.ignoreCase) === true');
} }
//CHECK#2 //CHECK#2
if (__re.hasOwnProperty('ignoreCase') !== true) { if (__re.hasOwnProperty('ignoreCase') !== false) {
$ERROR('#2: __re = new RegExp;delete __re.ignoreCase === true; __re.hasOwnProperty(\'ignoreCase\') === true'); $ERROR('#2: __re = RegExp.prototype;delete __re.ignoreCase === true; __re.hasOwnProperty(\'ignoreCase\') === false');
} }

View File

@ -6,11 +6,18 @@
/*--- /*---
es5id: 15.10.7.4-1 es5id: 15.10.7.4-1
description: RegExp.prototype.multiline is of type Boolean description: RegExp.prototype.multiline is a non-generic accessor property
includes: [runTestCase.js] includes: [runTestCase.js]
---*/ ---*/
function testcase() { function testcase() {
return (typeof(RegExp.prototype.multiline)) === 'boolean'; try {
} RegExp.prototype.multiline;
} catch (e) {
if (e instanceof TypeError) {
return true;
}
}
return false;
}
runTestCase(testcase); runTestCase(testcase);

View File

@ -7,17 +7,18 @@
/*--- /*---
es5id: 15.10.7.4-2 es5id: 15.10.7.4-2
description: > description: >
RegExp.prototype.multiline is a data property with default RegExp.prototype.multiline is an accessor property whose set
attribute values (false) accessor function is undefined
includes: [runTestCase.js] includes: [runTestCase.js]
---*/ ---*/
function testcase() { function testcase() {
var d = Object.getOwnPropertyDescriptor(RegExp.prototype, 'multiline'); var d = Object.getOwnPropertyDescriptor(RegExp.prototype, 'multiline');
if (d.writable === false && if (typeof d.get === 'function' &&
d.set === undefined &&
d.enumerable === false && d.enumerable === false &&
d.configurable === false) { d.configurable === true) {
return true; return true;
} }
} }

View File

@ -2,24 +2,25 @@
// 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 RegExp instance multiline property has the attribute ReadOnly info: The RegExp.prototype multiline property does not have a set accessor
es5id: 15.10.7.4_A10 es5id: 15.10.7.4_A10
description: Checking if varying the multiline property fails description: Checking if varying the multiline property fails
includes: [$FAIL.js] includes: [$FAIL.js]
---*/ ---*/
__re = /\n/; __re = RegExp.prototype;
//CHECK#1 //CHECK#1
if (__re.hasOwnProperty('multiline') !== true) { if (__re.hasOwnProperty('multiline') !== true) {
$FAIL('#1: __re = /\\n/; __re.hasOwnProperty(\'multiline\') === true'); $FAIL('#1: __re = RegExp.prototype; __re.hasOwnProperty(\'multiline\') === true');
} }
__obj = __re.multiline; __sample = /\n/;
__obj = __sample.multiline;
__re.multiline = "shifted"; __sample.multiline = "shifted";
//CHECK#2 //CHECK#2
if (__re.multiline !== __obj) { if (__sample.multiline !== __obj) {
$ERROR('#2: __re = /\\n/; __obj = __re.multiline; __re.multiline = "shifted"; __re.multiline === __obj. Actual: ' + (__re.multiline)); $ERROR('#2: __sample = /\n/; __obj = __sample.multiline; __sample.multiline = "shifted"; __sample.multiline === __obj. Actual: ' + (__sample.multiline));
} }

View File

@ -2,24 +2,24 @@
// 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 RegExp instance multiline property has the attribute DontEnum info: The RegExp.prototype multiline property has the attribute DontEnum
es5id: 15.10.7.4_A8 es5id: 15.10.7.4_A8
description: > description: >
Checking if enumerating the multiline property of RegExp instance Checking if enumerating the multiline property of RegExp.prototype
fails fails
includes: [$FAIL.js] includes: [$FAIL.js]
---*/ ---*/
__re = new RegExp("[\u0041-\u0049]"); __re = RegExp.prototype;
//CHECK#0 //CHECK#0
if (__re.hasOwnProperty('multiline') !== true) { if (__re.hasOwnProperty('multiline') !== true) {
$FAIL('#0: __re = new RegExp("[\\u0041-\\u0049]"); __re.hasOwnProperty(\'multiline\') === true'); $FAIL('#0: __re = RegExp.prototype; __re.hasOwnProperty(\'multiline\') === true');
} }
//CHECK#1 //CHECK#1
if (__re.propertyIsEnumerable('multiline') !== false) { if (__re.propertyIsEnumerable('multiline') !== false) {
$ERROR('#1: __re = new RegExp("[\\u0041-\\u0049]"); __re.propertyIsEnumerable(\'multiline\') === false'); $ERROR('#1: __re = RegExp.prototype; __re.propertyIsEnumerable(\'multiline\') === false');
} }
//CHECK#2 //CHECK#2
@ -29,5 +29,5 @@ for (p in __re){
} }
if (count !== 0) { if (count !== 0) {
$ERROR('#2: count = 0; __re = new RegExp("[\\u0041-\\u0049]"); for (p in __re){ if (p==="multiline") count++; } count === 0. Actual: ' + (count)); $ERROR('#2: count = 0; __re = RegExp.prototype; for (p in __re){ if (p==="multiline") count++; } count === 0. Actual: ' + (count));
} }

View File

@ -2,25 +2,27 @@
// 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 RegExp instance multiline property has the attribute DontDelete info: >
The RegExp.prototype multiline property does not have the attribute
DontDelete
es5id: 15.10.7.4_A9 es5id: 15.10.7.4_A9
description: Checking if deleting the multiline property fails description: Checking if deleting the multiline property succeeds
includes: [$FAIL.js] includes: [$FAIL.js]
---*/ ---*/
__re = new RegExp; __re = RegExp.prototype;
//CHECK#0 //CHECK#0
if (__re.hasOwnProperty('multiline') !== true) { if (__re.hasOwnProperty('multiline') !== true) {
$FAIL('#0: __re = new RegExp; __re.hasOwnProperty(\'multiline\') === true'); $FAIL('#0: __re = RegExp.prototype; __re.hasOwnProperty(\'multiline\') === true');
} }
//CHECK#1 //CHECK#1
if ((delete __re.multiline) !== false) { if ((delete __re.multiline) !== true) {
$ERROR('#1: __re = new RegExp; (delete __re.multiline) === false'); $ERROR('#1: __re = RegExp.prototype; (delete __re.multiline) === true');
} }
//CHECK#2 //CHECK#2
if (__re.hasOwnProperty('multiline') !== true) { if (__re.hasOwnProperty('multiline') !== false) {
$ERROR('#2: __re = new RegExp;delete __re.multiline === true; __re.hasOwnProperty(\'multiline\') === true'); $ERROR('#2: __re = RegExp.prototype;delete __re.multiline === true; __re.hasOwnProperty(\'multiline\') === false');
} }

View File

@ -6,11 +6,11 @@
/*--- /*---
es5id: 15.10.7.5-1 es5id: 15.10.7.5-1
description: RegExp.prototype.lastIndex is of type Number description: RegExp.prototype.lastIndex is of type Undefined
includes: [runTestCase.js] includes: [runTestCase.js]
---*/ ---*/
function testcase() { function testcase() {
return (typeof(RegExp.prototype.lastIndex)) === 'number'; return (typeof(RegExp.prototype.lastIndex)) === 'undefined';
} }
runTestCase(testcase); runTestCase(testcase);

View File

@ -6,19 +6,12 @@
/*--- /*---
es5id: 15.10.7.5-2 es5id: 15.10.7.5-2
description: > description: RegExp.prototype.lastIndex is not present
RegExp.prototype.lastIndex is a data property with specified
attribute values
includes: [runTestCase.js] includes: [runTestCase.js]
---*/ ---*/
function testcase() { function testcase() {
var d = Object.getOwnPropertyDescriptor(RegExp.prototype, 'lastIndex'); var d = Object.getOwnPropertyDescriptor(RegExp.prototype, 'lastIndex');
return d === undefined;
if (d.writable === true &&
d.enumerable === false &&
d.configurable === false) {
return true;
}
} }
runTestCase(testcase); runTestCase(testcase);

View File

@ -4,7 +4,7 @@
/*--- /*---
info: > info: >
The value of the internal [[Class]] property of Error prototype object is The value of the internal [[Class]] property of Error prototype object is
"Error" "Object"
es5id: 15.11.4_A2 es5id: 15.11.4_A2
description: > description: >
Getting the value of the internal [[Class]] property using Getting the value of the internal [[Class]] property using
@ -16,8 +16,8 @@ __tostr = Error.prototype.toString();
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1 //CHECK#1
if (__tostr !== "[object Error]") { if (__tostr !== "[object Object]") {
$ERROR('#1: Error.prototype.toString=Object.prototype.toString; __tostr = Error.prototype.toString(); __tostr === "[object Error]". Actual: '+__tostr ); $ERROR('#1: Error.prototype.toString=Object.prototype.toString; __tostr = Error.prototype.toString(); __tostr === "[object Object]". Actual: '+__tostr );
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@ -6,15 +6,14 @@
/*--- /*---
es5id: 15.2.3.10-1-1 es5id: 15.2.3.10-1-1
description: Object.preventExtensions throws TypeError if 'O' is undefined description: >
Object.preventExtensions does not throw TypeError if 'O' is
undefined
includes: [runTestCase.js] includes: [runTestCase.js]
---*/ ---*/
function testcase() { function testcase() {
try { Object.preventExtensions(undefined);
Object.preventExtensions(undefined); return true;
} catch (e) { }
return (e instanceof TypeError);
}
}
runTestCase(testcase); runTestCase(testcase);

View File

@ -6,15 +6,12 @@
/*--- /*---
es5id: 15.2.3.10-1-2 es5id: 15.2.3.10-1-2
description: Object.preventExtensions throws TypeError if 'O' is null description: Object.preventExtensions does not throw TypeError if 'O' is null
includes: [runTestCase.js] includes: [runTestCase.js]
---*/ ---*/
function testcase() { function testcase() {
try { Object.preventExtensions(null);
Object.preventExtensions(null); return true;
} catch (e) { }
return (e instanceof TypeError);
}
}
runTestCase(testcase); runTestCase(testcase);

View File

@ -7,16 +7,13 @@
/*--- /*---
es5id: 15.2.3.10-1-3 es5id: 15.2.3.10-1-3
description: > description: >
Object.preventExtensions throws TypeError if 'O' is a boolean Object.preventExtensions does not throw TypeError if 'O' is a
primitive value boolean primitive value
includes: [runTestCase.js] includes: [runTestCase.js]
---*/ ---*/
function testcase() { function testcase() {
try { Object.preventExtensions(true);
Object.preventExtensions(true); return true;
} catch (e) { }
return (e instanceof TypeError);
}
}
runTestCase(testcase); runTestCase(testcase);

View File

@ -7,16 +7,13 @@
/*--- /*---
es5id: 15.2.3.10-1-4 es5id: 15.2.3.10-1-4
description: > description: >
Object.preventExtensions throws TypeError if 'O' is a string Object.preventExtensions does not throw TypeError if 'O' is a
primitive value string primitive value
includes: [runTestCase.js] includes: [runTestCase.js]
---*/ ---*/
function testcase() { function testcase() {
try { Object.preventExtensions("abc");
Object.preventExtensions("abc"); return true;
} catch (e) { }
return (e instanceof TypeError);
}
}
runTestCase(testcase); runTestCase(testcase);

View File

@ -7,19 +7,13 @@
/*--- /*---
es5id: 15.2.3.10-1 es5id: 15.2.3.10-1
description: > description: >
Object.preventExtensions throws TypeError if type of first param Object.preventExtensions does not throw TypeError if type of first
is not Object param is not Object
includes: [runTestCase.js] includes: [runTestCase.js]
---*/ ---*/
function testcase() { function testcase() {
try { Object.preventExtensions(0);
Object.preventExtensions(0); return true;
} }
catch (e) {
if (e instanceof TypeError) {
return true;
}
}
}
runTestCase(testcase); runTestCase(testcase);

View File

@ -7,19 +7,13 @@
/*--- /*---
es5id: 15.2.3.11-1 es5id: 15.2.3.11-1
description: > description: >
Object.isSealed throws TypeError if type of first param is not Object.isSealed does not throw TypeError if type of first param is
Object not Object
includes: [runTestCase.js] includes: [runTestCase.js]
---*/ ---*/
function testcase() { function testcase() {
try { Object.isSealed(0);
Object.isSealed(0); return true;
} }
catch (e) {
if (e instanceof TypeError) {
return true;
}
}
}
runTestCase(testcase); runTestCase(testcase);

View File

@ -7,16 +7,13 @@
/*--- /*---
es5id: 15.2.3.12-1-1 es5id: 15.2.3.12-1-1
description: > description: >
Object.isFrozen - TypeError is thrown when the first param 'O' is Object.isFrozen - TypeError is not thrown when the first param 'O'
undefined is undefined
includes: [runTestCase.js] includes: [runTestCase.js]
---*/ ---*/
function testcase() { function testcase() {
try { Object.isFrozen(undefined);
Object.isFrozen(undefined); return true;
} catch (e) { }
return (e instanceof TypeError);
}
}
runTestCase(testcase); runTestCase(testcase);

View File

@ -7,16 +7,13 @@
/*--- /*---
es5id: 15.2.3.12-1-2 es5id: 15.2.3.12-1-2
description: > description: >
Object.isFrozen - TypeError is thrown when the first param 'O' is Object.isFrozen - TypeError is not thrown when the first param 'O'
null is null
includes: [runTestCase.js] includes: [runTestCase.js]
---*/ ---*/
function testcase() { function testcase() {
try { Object.isFrozen(null);
Object.isFrozen(null); return true;
} catch (e) { }
return (e instanceof TypeError);
}
}
runTestCase(testcase); runTestCase(testcase);

View File

@ -7,16 +7,13 @@
/*--- /*---
es5id: 15.2.3.12-1-3 es5id: 15.2.3.12-1-3
description: > description: >
Object.isFrozen - TypeError is thrown when the first param 'O' is Object.isFrozen - TypeError is not thrown when the first param 'O'
a boolean is a boolean
includes: [runTestCase.js] includes: [runTestCase.js]
---*/ ---*/
function testcase() { function testcase() {
try { Object.isFrozen(true);
Object.isFrozen(true); return true;
} catch (e) { }
return (e instanceof TypeError);
}
}
runTestCase(testcase); runTestCase(testcase);

View File

@ -7,16 +7,13 @@
/*--- /*---
es5id: 15.2.3.12-1-4 es5id: 15.2.3.12-1-4
description: > description: >
Object.isFrozen - TypeError is thrown when the first param 'O' is Object.isFrozen - TypeError is not thrown when the first param 'O'
a string is a string
includes: [runTestCase.js] includes: [runTestCase.js]
---*/ ---*/
function testcase() { function testcase() {
try { Object.isFrozen("abc");
Object.isFrozen("abc"); return true;
} catch (e) { }
return (e instanceof TypeError);
}
}
runTestCase(testcase); runTestCase(testcase);

View File

@ -7,19 +7,13 @@
/*--- /*---
es5id: 15.2.3.12-1 es5id: 15.2.3.12-1
description: > description: >
Object.isFrozen throws TypeError if type of first param is not Object.isFrozen does not throw TypeError if type of first param is
Object not Object
includes: [runTestCase.js] includes: [runTestCase.js]
---*/ ---*/
function testcase() { function testcase() {
try { Object.isFrozen(0);
Object.isFrozen(0); return true;
} }
catch (e) {
if (e instanceof TypeError) {
return true;
}
}
}
runTestCase(testcase); runTestCase(testcase);

View File

@ -6,16 +6,12 @@
/*--- /*---
es5id: 15.2.3.13-1-1 es5id: 15.2.3.13-1-1
description: Object.isExtensible throws TypeError if 'O' is undefined description: Object.isExtensible does not throw TypeError if 'O' is undefined
includes: [runTestCase.js] includes: [runTestCase.js]
---*/ ---*/
function testcase() { function testcase() {
Object.isExtensible(undefined);
try { return true;
Object.isExtensible(undefined); }
} catch (e) {
return (e instanceof TypeError);
}
}
runTestCase(testcase); runTestCase(testcase);

View File

@ -6,16 +6,12 @@
/*--- /*---
es5id: 15.2.3.13-1-2 es5id: 15.2.3.13-1-2
description: Object.isExtensible throws TypeError if 'O' is null description: Object.isExtensible does not throw TypeError if 'O' is null
includes: [runTestCase.js] includes: [runTestCase.js]
---*/ ---*/
function testcase() { function testcase() {
Object.isExtensible(null);
try { return true;
Object.isExtensible(null); }
} catch (e) {
return (e instanceof TypeError);
}
}
runTestCase(testcase); runTestCase(testcase);

View File

@ -6,16 +6,12 @@
/*--- /*---
es5id: 15.2.3.13-1-3 es5id: 15.2.3.13-1-3
description: Object.isExtensible throws TypeError if 'O' is a boolean description: Object.isExtensible does not throw TypeError if 'O' is a boolean
includes: [runTestCase.js] includes: [runTestCase.js]
---*/ ---*/
function testcase() { function testcase() {
Object.isExtensible(true);
try { return true;
Object.isExtensible(true); }
} catch (e) {
return (e instanceof TypeError);
}
}
runTestCase(testcase); runTestCase(testcase);

View File

@ -6,16 +6,12 @@
/*--- /*---
es5id: 15.2.3.13-1-4 es5id: 15.2.3.13-1-4
description: Object.isExtensible throws TypeError if 'O' is a string description: Object.isExtensible does not throw TypeError if 'O' is a string
includes: [runTestCase.js] includes: [runTestCase.js]
---*/ ---*/
function testcase() { function testcase() {
Object.isExtensible("abc");
try { return true;
Object.isExtensible("abc"); }
} catch (e) {
return (e instanceof TypeError);
}
}
runTestCase(testcase); runTestCase(testcase);

View File

@ -7,19 +7,13 @@
/*--- /*---
es5id: 15.2.3.13-1 es5id: 15.2.3.13-1
description: > description: >
Object.isExtensible throws TypeError if type of first param is not Object.isExtensible does not throw TypeError if type of first
Object param is not Object
includes: [runTestCase.js] includes: [runTestCase.js]
---*/ ---*/
function testcase() { function testcase() {
try { Object.isExtensible(0);
Object.isExtensible(0); return true;
} }
catch (e) {
if (e instanceof TypeError) {
return true;
}
}
}
runTestCase(testcase); runTestCase(testcase);

View File

@ -6,18 +6,14 @@
/*--- /*---
es5id: 15.2.3.14-1-1 es5id: 15.2.3.14-1-1
description: Object.keys throws TypeError if type of first param is not Object description: >
Object.keys does not throw TypeError if type of first param is not
Object
includes: [runTestCase.js] includes: [runTestCase.js]
---*/ ---*/
function testcase() { function testcase() {
try {
Object.keys(0); Object.keys(0);
} return true;
catch (e) { }
if (e instanceof TypeError) {
return true;
}
}
}
runTestCase(testcase); runTestCase(testcase);

View File

@ -7,19 +7,13 @@
/*--- /*---
es5id: 15.2.3.14-1-2 es5id: 15.2.3.14-1-2
description: > description: >
Object.keys throws TypeError if type of first param is not Object Object.keys does not throw TypeError if type of first param is not
(boolean) Object (boolean)
includes: [runTestCase.js] includes: [runTestCase.js]
---*/ ---*/
function testcase() { function testcase() {
try {
Object.keys(true); Object.keys(true);
} return true;
catch (e) { }
if (e instanceof TypeError) {
return true;
}
}
}
runTestCase(testcase); runTestCase(testcase);

View File

@ -7,19 +7,13 @@
/*--- /*---
es5id: 15.2.3.14-1-3 es5id: 15.2.3.14-1-3
description: > description: >
Object.keys throws TypeError if type of first param is not Object Object.keys does not throw TypeError if type of first param is not
(string) Object (string)
includes: [runTestCase.js] includes: [runTestCase.js]
---*/ ---*/
function testcase() { function testcase() {
try {
Object.keys('abc'); Object.keys('abc');
} return true;
catch (e) { }
if (e instanceof TypeError) {
return true;
}
}
}
runTestCase(testcase); runTestCase(testcase);

View File

@ -6,16 +6,11 @@
/*--- /*---
es5id: 15.2.3.2-1-3 es5id: 15.2.3.2-1-3
description: Object.getPrototypeOf throws TypeError if 'O' is a boolean description: Object.getPrototypeOf returns Boolean.prototype if 'O' is a boolean
includes: [runTestCase.js] includes: [runTestCase.js]
---*/ ---*/
function testcase() { function testcase() {
try { return Object.getPrototypeOf(true) === Boolean.prototype;
Object.getPrototypeOf(true); }
return false;
} catch (e) {
return (e instanceof TypeError);
}
}
runTestCase(testcase); runTestCase(testcase);

View File

@ -6,16 +6,11 @@
/*--- /*---
es5id: 15.2.3.2-1-4 es5id: 15.2.3.2-1-4
description: Object.getPrototypeOf throws TypeError if 'O' is a string description: Object.getPrototypeOf returns String.prototype if 'O' is a string
includes: [runTestCase.js] includes: [runTestCase.js]
---*/ ---*/
function testcase() { function testcase() {
try { return Object.getPrototypeOf("abc") === String.prototype;
Object.getPrototypeOf("abc"); }
return false;
} catch (e) {
return (e instanceof TypeError);
}
}
runTestCase(testcase); runTestCase(testcase);

View File

@ -6,20 +6,11 @@
/*--- /*---
es5id: 15.2.3.2-1 es5id: 15.2.3.2-1
description: > description: Object.getPrototypeOf returns Number.prototype if 'O' is a number
Object.getPrototypeOf throws TypeError if type of first param is
not Object
includes: [runTestCase.js] includes: [runTestCase.js]
---*/ ---*/
function testcase() { function testcase() {
try { return Object.getPrototypeOf(0) === Number.prototype;
Object.getPrototypeOf(0); }
}
catch (e) {
if (e instanceof TypeError) {
return true;
}
}
}
runTestCase(testcase); runTestCase(testcase);

View File

@ -13,7 +13,7 @@ includes: [runTestCase.js]
---*/ ---*/
function testcase() { function testcase() {
if (Object.getPrototypeOf(EvalError) === Function.prototype) { if (Object.getPrototypeOf(EvalError) === Error) {
return true; return true;
} }
} }

View File

@ -13,7 +13,7 @@ includes: [runTestCase.js]
---*/ ---*/
function testcase() { function testcase() {
if (Object.getPrototypeOf(RangeError) === Function.prototype) { if (Object.getPrototypeOf(RangeError) === Error) {
return true; return true;
} }
} }

View File

@ -13,7 +13,7 @@ includes: [runTestCase.js]
---*/ ---*/
function testcase() { function testcase() {
if (Object.getPrototypeOf(ReferenceError) === Function.prototype) { if (Object.getPrototypeOf(ReferenceError) === Error) {
return true; return true;
} }
} }

View File

@ -13,7 +13,7 @@ includes: [runTestCase.js]
---*/ ---*/
function testcase() { function testcase() {
if (Object.getPrototypeOf(SyntaxError) === Function.prototype) { if (Object.getPrototypeOf(SyntaxError) === Error) {
return true; return true;
} }
} }

View File

@ -13,7 +13,7 @@ includes: [runTestCase.js]
---*/ ---*/
function testcase() { function testcase() {
if (Object.getPrototypeOf(TypeError) === Function.prototype) { if (Object.getPrototypeOf(TypeError) === Error) {
return true; return true;
} }
} }

View File

@ -13,7 +13,7 @@ includes: [runTestCase.js]
---*/ ---*/
function testcase() { function testcase() {
if (Object.getPrototypeOf(URIError) === Function.prototype) { if (Object.getPrototypeOf(URIError) === Error) {
return true; return true;
} }
} }

View File

@ -7,16 +7,13 @@
/*--- /*---
es5id: 15.2.3.3-1-3 es5id: 15.2.3.3-1-3
description: > description: >
Object.getOwnPropertyDescriptor - TypeError is thrown when first Object.getOwnPropertyDescriptor - TypeError is not thrown when
param is a boolean first param is a boolean
includes: [runTestCase.js] includes: [runTestCase.js]
---*/ ---*/
function testcase() { function testcase() {
try { Object.getOwnPropertyDescriptor(true, "foo");
Object.getOwnPropertyDescriptor(true, "foo"); return true;
} catch (e) { }
return (e instanceof TypeError);
}
}
runTestCase(testcase); runTestCase(testcase);

View File

@ -7,16 +7,13 @@
/*--- /*---
es5id: 15.2.3.3-1-4 es5id: 15.2.3.3-1-4
description: > description: >
Object.getOwnPropertyDescriptor - TypeError is thrown when first Object.getOwnPropertyDescriptor - TypeError is not thrown when
param is a number first param is a number
includes: [runTestCase.js] includes: [runTestCase.js]
---*/ ---*/
function testcase() { function testcase() {
try { Object.getOwnPropertyDescriptor(-2, "foo");
Object.getOwnPropertyDescriptor(-2, "foo"); return true;
} catch (e) { }
return (e instanceof TypeError);
}
}
runTestCase(testcase); runTestCase(testcase);

View File

@ -7,19 +7,13 @@
/*--- /*---
es5id: 15.2.3.3-1 es5id: 15.2.3.3-1
description: > description: >
Object.getOwnPropertyDescriptor throws TypeError if type of first Object.getOwnPropertyDescriptor does not throw TypeError if type
param is not Object of first param is not Object
includes: [runTestCase.js] includes: [runTestCase.js]
---*/ ---*/
function testcase() { function testcase() {
try {
Object.getOwnPropertyDescriptor(0, "foo"); Object.getOwnPropertyDescriptor(0, "foo");
} return true;
catch (e) { }
if (e instanceof TypeError) {
return true;
}
}
}
runTestCase(testcase); runTestCase(testcase);

View File

@ -7,8 +7,8 @@
/*--- /*---
es5id: 15.2.3.3-4-186 es5id: 15.2.3.3-4-186
description: > description: >
Object.getOwnPropertyDescriptor returns data desc (all false) for Object.getOwnPropertyDescriptor returns data desc for properties
properties on built-ins (Function.length) on built-ins (Function.length)
includes: [runTestCase.js] includes: [runTestCase.js]
---*/ ---*/
@ -17,7 +17,7 @@ function testcase() {
if (desc.writable === false && if (desc.writable === false &&
desc.enumerable === false && desc.enumerable === false &&
desc.configurable === false && desc.configurable === true &&
desc.hasOwnProperty('get') === false && desc.hasOwnProperty('get') === false &&
desc.hasOwnProperty('set') === false) { desc.hasOwnProperty('set') === false) {
return true; return true;

View File

@ -7,8 +7,8 @@
/*--- /*---
es5id: 15.2.3.3-4-187 es5id: 15.2.3.3-4-187
description: > description: >
Object.getOwnPropertyDescriptor returns data desc (all false) for Object.getOwnPropertyDescriptor returns data desc for properties
properties on built-ins (Function (instance).length) on built-ins (Function (instance).length)
includes: [runTestCase.js] includes: [runTestCase.js]
---*/ ---*/
@ -19,7 +19,7 @@ function testcase() {
if (desc.writable === false && if (desc.writable === false &&
desc.enumerable === false && desc.enumerable === false &&
desc.configurable === false && desc.configurable === true &&
desc.hasOwnProperty('get') === false && desc.hasOwnProperty('get') === false &&
desc.hasOwnProperty('set') === false) { desc.hasOwnProperty('set') === false) {
return true; return true;

View File

@ -7,8 +7,8 @@
/*--- /*---
es5id: 15.2.3.3-4-191 es5id: 15.2.3.3-4-191
description: > description: >
Object.getOwnPropertyDescriptor returns data desc (all false) for Object.getOwnPropertyDescriptor returns data desc for properties
properties on built-ins (String.length) on built-ins (String.length)
includes: [runTestCase.js] includes: [runTestCase.js]
---*/ ---*/
@ -17,7 +17,7 @@ function testcase() {
if (desc.writable === false && if (desc.writable === false &&
desc.enumerable === false && desc.enumerable === false &&
desc.configurable === false && desc.configurable === true &&
desc.hasOwnProperty('get') === false && desc.hasOwnProperty('get') === false &&
desc.hasOwnProperty('set') === false) { desc.hasOwnProperty('set') === false) {
return true; return true;

View File

@ -7,8 +7,8 @@
/*--- /*---
es5id: 15.2.3.3-4-194 es5id: 15.2.3.3-4-194
description: > description: >
Object.getOwnPropertyDescriptor returns data desc (all false) for Object.getOwnPropertyDescriptor returns data desc for properties
properties on built-ins (Boolean.length) on built-ins (Boolean.length)
includes: [runTestCase.js] includes: [runTestCase.js]
---*/ ---*/
@ -17,7 +17,7 @@ function testcase() {
if (desc.writable === false && if (desc.writable === false &&
desc.enumerable === false && desc.enumerable === false &&
desc.configurable === false && desc.configurable === true &&
desc.hasOwnProperty('get') === false && desc.hasOwnProperty('get') === false &&
desc.hasOwnProperty('set') === false) { desc.hasOwnProperty('set') === false) {
return true; return true;

View File

@ -7,8 +7,8 @@
/*--- /*---
es5id: 15.2.3.3-4-201 es5id: 15.2.3.3-4-201
description: > description: >
Object.getOwnPropertyDescriptor returns data desc (all false) for Object.getOwnPropertyDescriptor returns data desc for properties
properties on built-ins (Number.length) on built-ins (Number.length)
includes: [runTestCase.js] includes: [runTestCase.js]
---*/ ---*/
@ -17,7 +17,7 @@ function testcase() {
if (desc.writable === false && if (desc.writable === false &&
desc.enumerable === false && desc.enumerable === false &&
desc.configurable === false && desc.configurable === true &&
desc.hasOwnProperty('get') === false && desc.hasOwnProperty('get') === false &&
desc.hasOwnProperty('set') === false) { desc.hasOwnProperty('set') === false) {
return true; return true;

View File

@ -7,19 +7,19 @@
/*--- /*---
es5id: 15.2.3.3-4-212 es5id: 15.2.3.3-4-212
description: > description: >
Object.getOwnPropertyDescriptor returns data desc (all false) for Object.getOwnPropertyDescriptor returns accessor desc for
properties on built-ins (RegExp.prototype.source) accessors on built-ins (RegExp.prototype.source)
includes: [runTestCase.js] includes: [runTestCase.js]
---*/ ---*/
function testcase() { function testcase() {
var desc = Object.getOwnPropertyDescriptor(RegExp.prototype, "source"); var desc = Object.getOwnPropertyDescriptor(RegExp.prototype, "source");
if (desc.writable === false && if (desc.hasOwnProperty('writable') === false &&
desc.enumerable === false && desc.enumerable === false &&
desc.configurable === false && desc.configurable === true &&
desc.hasOwnProperty('get') === false && typeof desc.get === 'function' &&
desc.hasOwnProperty('set') === false) { desc.set === undefined) {
return true; return true;
} }
} }

View File

@ -7,19 +7,19 @@
/*--- /*---
es5id: 15.2.3.3-4-213 es5id: 15.2.3.3-4-213
description: > description: >
Object.getOwnPropertyDescriptor returns data desc (all false) for Object.getOwnPropertyDescriptor returns accessor desc for
properties on built-ins (RegExp.prototype.global) accessors on built-ins (RegExp.prototype.global)
includes: [runTestCase.js] includes: [runTestCase.js]
---*/ ---*/
function testcase() { function testcase() {
var desc = Object.getOwnPropertyDescriptor(RegExp.prototype, "global"); var desc = Object.getOwnPropertyDescriptor(RegExp.prototype, "global");
if (desc.writable === false && if (desc.hasOwnProperty('writable') === false &&
desc.enumerable === false && desc.enumerable === false &&
desc.configurable === false && desc.configurable === true &&
desc.hasOwnProperty('get') === false && typeof desc.get === 'function' &&
desc.hasOwnProperty('set') === false) { desc.set === undefined) {
return true; return true;
} }
} }

View File

@ -7,19 +7,19 @@
/*--- /*---
es5id: 15.2.3.3-4-214 es5id: 15.2.3.3-4-214
description: > description: >
Object.getOwnPropertyDescriptor returns data desc (all false) for Object.getOwnPropertyDescriptor returns accessor desc for
properties on built-ins (RegExp.prototype.ignoreCase) accessors on built-ins (RegExp.prototype.ignoreCase)
includes: [runTestCase.js] includes: [runTestCase.js]
---*/ ---*/
function testcase() { function testcase() {
var desc = Object.getOwnPropertyDescriptor(RegExp.prototype, "ignoreCase"); var desc = Object.getOwnPropertyDescriptor(RegExp.prototype, "ignoreCase");
if (desc.writable === false && if (desc.hasOwnProperty('writable') === false &&
desc.enumerable === false && desc.enumerable === false &&
desc.configurable === false && desc.configurable === true &&
desc.hasOwnProperty('get') === false && typeof desc.get === 'function' &&
desc.hasOwnProperty('set') === false) { desc.set === undefined) {
return true; return true;
} }
} }

View File

@ -7,19 +7,19 @@
/*--- /*---
es5id: 15.2.3.3-4-215 es5id: 15.2.3.3-4-215
description: > description: >
Object.getOwnPropertyDescriptor returns data desc (all false) for Object.getOwnPropertyDescriptor returns accessor desc for
properties on built-ins (RegExp.prototype.multiline) accessors on built-ins (RegExp.prototype.multiline)
includes: [runTestCase.js] includes: [runTestCase.js]
---*/ ---*/
function testcase() { function testcase() {
var desc = Object.getOwnPropertyDescriptor(RegExp.prototype, "multiline"); var desc = Object.getOwnPropertyDescriptor(RegExp.prototype, "multiline");
if (desc.writable === false && if (desc.hasOwnProperty('writable') === false &&
desc.enumerable === false && desc.enumerable === false &&
desc.configurable === false && desc.configurable === true &&
desc.hasOwnProperty('get') === false && typeof desc.get === 'function' &&
desc.hasOwnProperty('set') === false) { desc.set === undefined) {
return true; return true;
} }
} }

View File

@ -6,10 +6,14 @@
/*--- /*---
es5id: 15.2.3.4-1-4 es5id: 15.2.3.4-1-4
info: > description: >
ES5 requires a `TypeError` here, while ES6 requires `ToObject` (19.1.2.7, 19.1.2.8.1) Object.getOwnPropertyNames does not throw TypeError if 'O' is a
description: Object.getOwnPropertyNames throws TypeError if 'O' is a boolean boolean
negative: TypeError includes: [runTestCase.js]
---*/ ---*/
Object.getOwnPropertyNames(true); function testcase() {
Object.getOwnPropertyNames(true);
return true;
}
runTestCase(testcase);

View File

@ -6,10 +6,14 @@
/*--- /*---
es5id: 15.2.3.4-1-5 es5id: 15.2.3.4-1-5
info: > description: >
ES5 requires a `TypeError` here, while ES6 requires `ToObject` (19.1.2.7, 19.1.2.8.1) Object.getOwnPropertyNames does not throw TypeError if 'O' is a
description: Object.getOwnPropertyNames throws TypeError if 'O' is a string string
negative: TypeError includes: [runTestCase.js]
---*/ ---*/
Object.getOwnPropertyNames("abc"); function testcase() {
Object.getOwnPropertyNames("abc");
return true;
}
runTestCase(testcase);

View File

@ -6,12 +6,14 @@
/*--- /*---
es5id: 15.2.3.4-1 es5id: 15.2.3.4-1
info: >
ES5 requires a `TypeError` here, while ES6 requires `ToObject` (19.1.2.7, 19.1.2.8.1)
description: > description: >
Object.getOwnPropertyNames throws TypeError if type of first param Object.getOwnPropertyNames does not throw TypeError if type of
is not Object first param is not Object
negative: TypeError includes: [runTestCase.js]
---*/ ---*/
Object.getOwnPropertyNames(0); function testcase() {
Object.getOwnPropertyNames(0);
return true;
}
runTestCase(testcase);

View File

@ -7,9 +7,10 @@
/*--- /*---
es5id: 15.2.3.7-6-a-93-3 es5id: 15.2.3.7-6-a-93-3
description: > description: >
Object.defineProperties will fail to update [[Value]] attribute of Object.defineProperties will not fail to update [[Value]]
named data property 'P' when [[Configurable]] attribute of first attribute of named data property 'P' when [[Configurable]]
updating property is false (8.12.9 - step Note & 10.a.ii.1) attribute of first updating property is false (8.12.9 - step Note
& 10.a.ii.1)
includes: includes:
- runTestCase.js - runTestCase.js
- dataPropertyAttributesAreCorrect.js - dataPropertyAttributesAreCorrect.js
@ -45,7 +46,7 @@ function testcase() {
} catch (e) { } catch (e) {
return e instanceof TypeError && return e instanceof TypeError &&
dataPropertyAttributesAreCorrect(obj, "property", 1001, false, false, false) && dataPropertyAttributesAreCorrect(obj, "property", 1001, false, false, false) &&
dataPropertyAttributesAreCorrect(obj, "property1", 1003, false, false, true); dataPropertyAttributesAreCorrect(obj, "property1", 1004, false, false, true);
} }
} }
runTestCase(testcase); runTestCase(testcase);

View File

@ -7,9 +7,10 @@
/*--- /*---
es5id: 15.2.3.7-6-a-93-4 es5id: 15.2.3.7-6-a-93-4
description: > description: >
Object.defineProperties will fail to update [[Value]] attribute of Object.defineProperties will not fail to update [[Value]]
indexed data property 'P' when [[Configurable]] attribute of first attribute of indexed data property 'P' when [[Configurable]]
updating property are false (8.12.9 - step Note & 10.a.ii.1) attribute of first updating property are false (8.12.9 - step
Note & 10.a.ii.1)
includes: includes:
- runTestCase.js - runTestCase.js
- dataPropertyAttributesAreCorrect.js - dataPropertyAttributesAreCorrect.js
@ -45,7 +46,7 @@ function testcase() {
} catch (e) { } catch (e) {
return e instanceof TypeError && return e instanceof TypeError &&
dataPropertyAttributesAreCorrect(obj, "0", 1001, false, false, false) && dataPropertyAttributesAreCorrect(obj, "0", 1001, false, false, false) &&
dataPropertyAttributesAreCorrect(obj, "1", 1003, false, false, true); dataPropertyAttributesAreCorrect(obj, "1", 1004, false, false, true);
} }
} }
runTestCase(testcase); runTestCase(testcase);

View File

@ -6,16 +6,14 @@
/*--- /*---
es5id: 15.2.3.8-1-1 es5id: 15.2.3.8-1-1
description: Object.seal throws TypeError if type of first param is undefined description: >
Object.seal does not throw TypeError if type of first param is
undefined
includes: [runTestCase.js] includes: [runTestCase.js]
---*/ ---*/
function testcase() { function testcase() {
try { Object.seal(undefined);
Object.seal(undefined); return true;
return false; }
} catch (e) {
return e instanceof TypeError;
}
}
runTestCase(testcase); runTestCase(testcase);

View File

@ -6,16 +6,12 @@
/*--- /*---
es5id: 15.2.3.8-1-2 es5id: 15.2.3.8-1-2
description: Object.seal throws TypeError if type of first param is null description: Object.seal does not throw TypeError if type of first param is null
includes: [runTestCase.js] includes: [runTestCase.js]
---*/ ---*/
function testcase() { function testcase() {
try { Object.seal(null);
Object.seal(null); return true;
return false; }
} catch (e) {
return e instanceof TypeError;
}
}
runTestCase(testcase); runTestCase(testcase);

View File

@ -7,17 +7,13 @@
/*--- /*---
es5id: 15.2.3.8-1-3 es5id: 15.2.3.8-1-3
description: > description: >
Object.seal throws TypeError if type of first param is a boolean Object.seal does not throw TypeError if type of first param is a
primitive boolean primitive
includes: [runTestCase.js] includes: [runTestCase.js]
---*/ ---*/
function testcase() { function testcase() {
try { Object.seal(false);
Object.seal(false); return true;
return false; }
} catch (e) {
return e instanceof TypeError;
}
}
runTestCase(testcase); runTestCase(testcase);

View File

@ -7,17 +7,13 @@
/*--- /*---
es5id: 15.2.3.8-1-4 es5id: 15.2.3.8-1-4
description: > description: >
Object.seal throws TypeError if type of first param is a string Object.seal does not throw TypeError if type of first param is a
primitive string primitive
includes: [runTestCase.js] includes: [runTestCase.js]
---*/ ---*/
function testcase() { function testcase() {
try { Object.seal("abc");
Object.seal("abc"); return true;
return false; }
} catch (e) {
return e instanceof TypeError;
}
}
runTestCase(testcase); runTestCase(testcase);

View File

@ -6,18 +6,14 @@
/*--- /*---
es5id: 15.2.3.8-1 es5id: 15.2.3.8-1
description: Object.seal throws TypeError if type of first param is not Object description: >
Object.seal does not throw TypeError if type of first param is not
Object
includes: [runTestCase.js] includes: [runTestCase.js]
---*/ ---*/
function testcase() { function testcase() {
try { Object.seal(0);
Object.seal(0); return true;
} }
catch (e) {
if (e instanceof TypeError) {
return true;
}
}
}
runTestCase(testcase); runTestCase(testcase);

View File

@ -6,16 +6,14 @@
/*--- /*---
es5id: 15.2.3.9-1-1 es5id: 15.2.3.9-1-1
description: Object.freeze throws TypeError if type of first param is undefined description: >
Object.freeze does not throw TypeError if type of first param is
undefined
includes: [runTestCase.js] includes: [runTestCase.js]
---*/ ---*/
function testcase() { function testcase() {
try { Object.freeze(undefined);
Object.freeze(undefined); return true;
return false; }
} catch (e) {
return e instanceof TypeError;
}
}
runTestCase(testcase); runTestCase(testcase);

View File

@ -6,16 +6,14 @@
/*--- /*---
es5id: 15.2.3.9-1-2 es5id: 15.2.3.9-1-2
description: Object.freeze throws TypeError if type of first param is null description: >
Object.freeze does not throw TypeError if type of first param is
null
includes: [runTestCase.js] includes: [runTestCase.js]
---*/ ---*/
function testcase() { function testcase() {
try { Object.freeze(null);
Object.freeze(null); return true;
return false; }
} catch (e) {
return e instanceof TypeError;
}
}
runTestCase(testcase); runTestCase(testcase);

View File

@ -7,26 +7,14 @@
/*--- /*---
es5id: 15.2.3.9-1-3 es5id: 15.2.3.9-1-3
description: > description: >
Object.freeze throws TypeError if type of first param is boolean Object.freeze does not throw TypeError if type of first param is
primitive boolean primitive
includes: [runTestCase.js] includes: [runTestCase.js]
---*/ ---*/
function testcase() { function testcase() {
var result = false; Object.freeze(false);
try { Object.freeze(true);
Object.freeze(false); return true;
}
return false;
} catch (e) {
result = e instanceof TypeError;
}
try {
Object.freeze(true);
return false;
} catch (e) {
return result && e instanceof TypeError;
}
}
runTestCase(testcase); runTestCase(testcase);

View File

@ -7,17 +7,13 @@
/*--- /*---
es5id: 15.2.3.9-1-4 es5id: 15.2.3.9-1-4
description: > description: >
Object.freeze throws TypeError if type of first param is string Object.freeze does not throw TypeError if type of first param is
primitive string primitive
includes: [runTestCase.js] includes: [runTestCase.js]
---*/ ---*/
function testcase() { function testcase() {
try { Object.freeze("abc");
Object.freeze("abc"); return true;
return false; }
} catch (e) {
return e instanceof TypeError;
}
}
runTestCase(testcase); runTestCase(testcase);

View File

@ -6,16 +6,14 @@
/*--- /*---
es5id: 15.2.3.9-1 es5id: 15.2.3.9-1
description: Object.freeze throws TypeError if type of first param is not Object description: >
Object.freeze does not throw TypeError if type of first param is
not Object
includes: [runTestCase.js] includes: [runTestCase.js]
---*/ ---*/
function testcase() { function testcase() {
try { Object.freeze(0);
Object.freeze(0); return true;
return false; }
} catch (e) {
return e instanceof TypeError;
}
}
runTestCase(testcase); runTestCase(testcase);

View File

@ -2,7 +2,9 @@
// 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 Object.prototype.toString.length property has the attribute DontDelete info: >
The Object.prototype.toString.length property does not have the attribute
DontDelete
es5id: 15.2.4.2_A9 es5id: 15.2.4.2_A9
description: > description: >
Checknig if deleting of the Object.prototype.toString.length Checknig if deleting of the Object.prototype.toString.length
@ -17,11 +19,11 @@ if (!(Object.prototype.toString.hasOwnProperty('length'))) {
} }
//CHECK#1 //CHECK#1
if (delete Object.prototype.toString.length) { if (!delete Object.prototype.toString.length) {
$ERROR('#1: The Object.prototype.toString.length property has the attributes DontDelete'); $ERROR('#1: The Object.prototype.toString.length property does not have the attributes DontDelete');
} }
//CHECK#2 //CHECK#2
if (!(Object.prototype.toString.hasOwnProperty('length'))) { if (Object.prototype.toString.hasOwnProperty('length')) {
$FAIL('#2: The Object.prototype.toString.length property has the attributes DontDelete'); $FAIL('#2: The Object.prototype.toString.length property does not have the attributes DontDelete');
} }

View File

@ -3,8 +3,8 @@
/*--- /*---
info: > info: >
The Object.prototype.toLocaleString.length property has the attribute The Object.prototype.toLocaleString.length property does not have the
DontDelete attribute DontDelete
es5id: 15.2.4.3_A9 es5id: 15.2.4.3_A9
description: > description: >
Checknig if deleting of the Object.prototype.toLocaleString.length Checknig if deleting of the Object.prototype.toLocaleString.length
@ -19,11 +19,11 @@ if (!(Object.prototype.toLocaleString.hasOwnProperty('length'))) {
} }
//CHECK#1 //CHECK#1
if (delete Object.prototype.toLocaleString.length) { if (!delete Object.prototype.toLocaleString.length) {
$ERROR('#1: The Object.prototype.toLocaleString.length property has the attributes DontDelete'); $ERROR('#1: The Object.prototype.toLocaleString.length property does not have the attributes DontDelete');
} }
//CHECK#2 //CHECK#2
if (!(Object.prototype.toLocaleString.hasOwnProperty('length'))) { if (Object.prototype.toLocaleString.hasOwnProperty('length')) {
$FAIL('#2: The Object.prototype.toLocaleString.length property has the attributes DontDelete'); $FAIL('#2: The Object.prototype.toLocaleString.length property does not have the attributes DontDelete');
} }

View File

@ -2,7 +2,9 @@
// 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 Object.prototype.valueOf.length property has the attribute DontDelete info: >
The Object.prototype.valueOf.length property does not have the attribute
DontDelete
es5id: 15.2.4.4_A9 es5id: 15.2.4.4_A9
description: > description: >
Checknig if deleting of the Object.prototype.valueOf.length Checknig if deleting of the Object.prototype.valueOf.length
@ -17,11 +19,11 @@ if (!(Object.prototype.valueOf.hasOwnProperty('length'))) {
} }
//CHECK#1 //CHECK#1
if (delete Object.prototype.valueOf.length) { if (!delete Object.prototype.valueOf.length) {
$ERROR('#1: The Object.prototype.valueOf.length property has the attributes DontDelete'); $ERROR('#1: The Object.prototype.valueOf.length property does not have the attributes DontDelete');
} }
//CHECK#2 //CHECK#2
if (!(Object.prototype.valueOf.hasOwnProperty('length'))) { if (Object.prototype.valueOf.hasOwnProperty('length')) {
$FAIL('#2: The Object.prototype.valueOf.length property has the attributes DontDelete'); $FAIL('#2: The Object.prototype.valueOf.length property does not have the attributes DontDelete');
} }

Some files were not shown because too many files have changed in this diff Show More