chore: migrate $ERROR -> throw new Test262Error in test/built-ins/Object (#3090)

This commit is contained in:
Rick Waldron 2021-07-28 16:50:06 -04:00 committed by GitHub
parent ee3597ed57
commit ecf835778d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
325 changed files with 775 additions and 775 deletions

View File

@ -14,21 +14,21 @@ var __obj = Object(null);
var n__obj = new Object(null);
if (__obj.toString() !== n__obj.toString()) {
$ERROR('#1');
throw new Test262Error('#1');
}
if (__obj.constructor !== n__obj.constructor) {
$ERROR('#2');
throw new Test262Error('#2');
}
if (__obj.prototype !== n__obj.prototype) {
$ERROR('#3');
throw new Test262Error('#3');
}
if (__obj.toLocaleString() !== n__obj.toLocaleString()) {
$ERROR('#4');
throw new Test262Error('#4');
}
if (typeof __obj !== typeof n__obj) {
$ERROR('#5');
throw new Test262Error('#5');
}

View File

@ -17,21 +17,21 @@ var n__obj = new Object(void 0);
if (__obj.toString() !== n__obj.toString()) {
$ERROR('#1');
throw new Test262Error('#1');
}
if (__obj.constructor !== n__obj.constructor) {
$ERROR('#2');
throw new Test262Error('#2');
}
if (__obj.prototype !== n__obj.prototype) {
$ERROR('#3');
throw new Test262Error('#3');
}
if (__obj.toLocaleString() !== n__obj.toLocaleString()) {
$ERROR('#4');
throw new Test262Error('#4');
}
if (typeof __obj !== typeof n__obj) {
$ERROR('#5');
throw new Test262Error('#5');
}

View File

@ -14,21 +14,21 @@ var __obj = Object();
var n__obj = new Object();
if (__obj.toString() !== n__obj.toString()) {
$ERROR('#1');
throw new Test262Error('#1');
}
if (__obj.constructor !== n__obj.constructor) {
$ERROR('#2');
throw new Test262Error('#2');
}
if (__obj.prototype !== n__obj.prototype) {
$ERROR('#3');
throw new Test262Error('#3');
}
if (__obj.toLocaleString() !== n__obj.toLocaleString()) {
$ERROR('#4');
throw new Test262Error('#4');
}
if (typeof __obj !== typeof n__obj) {
$ERROR('#5');
throw new Test262Error('#5');
}

View File

@ -14,21 +14,21 @@ var __obj = Object(undefined);
var n__obj = new Object(undefined);
if (__obj.toString() !== n__obj.toString()) {
$ERROR('#1');
throw new Test262Error('#1');
}
if (__obj.constructor !== n__obj.constructor) {
$ERROR('#2');
throw new Test262Error('#2');
}
if (__obj.prototype !== n__obj.prototype) {
$ERROR('#3');
throw new Test262Error('#3');
}
if (__obj.toLocaleString() !== n__obj.toLocaleString()) {
$ERROR('#4');
throw new Test262Error('#4');
}
if (typeof __obj !== typeof n__obj) {
$ERROR('#5');
throw new Test262Error('#5');
}

View File

@ -14,23 +14,23 @@ var __obj = Object(x);
var n__obj = new Object(x);
if (__obj.toString() !== n__obj.toString()) {
$ERROR('#1');
throw new Test262Error('#1');
}
if (__obj.constructor !== n__obj.constructor) {
$ERROR('#2');
throw new Test262Error('#2');
}
if (__obj.prototype !== n__obj.prototype) {
$ERROR('#3');
throw new Test262Error('#3');
}
if (__obj.toLocaleString() !== n__obj.toLocaleString()) {
$ERROR('#4');
throw new Test262Error('#4');
}
if (typeof __obj !== typeof n__obj) {
$ERROR('#5');
throw new Test262Error('#5');
}
var x;

View File

@ -12,23 +12,23 @@ description: Calling Object function with boolean argument value
var bool = true;
if (typeof bool !== 'boolean') {
$ERROR('#1: bool should be boolean primitive');
throw new Test262Error('#1: bool should be boolean primitive');
}
var obj = Object(bool);
if (obj.constructor !== Boolean) {
$ERROR('#2: Object(true) returns ToObject(true)');
throw new Test262Error('#2: Object(true) returns ToObject(true)');
}
if (typeof obj !== "object") {
$ERROR('#3: Object(true) returns ToObject(true)');
throw new Test262Error('#3: Object(true) returns ToObject(true)');
}
if (!obj) {
$ERROR('#4: Object(true) returns ToObject(true)');
throw new Test262Error('#4: Object(true) returns ToObject(true)');
}
if (obj === true) {
$ERROR('#5: Object(true) returns ToObject(true)');
throw new Test262Error('#5: Object(true) returns ToObject(true)');
}

View File

@ -13,7 +13,7 @@ var arr = [1, 2, 3];
//CHECK#1
if (typeof arr !== 'object') {
$ERROR('#1: arr = [1,2,3] is NOT an object');
throw new Test262Error('#1: arr = [1,2,3] is NOT an object');
}
var n_obj = Object(arr);
@ -22,5 +22,5 @@ arr.push(4);
//CHECK#2
if ((n_obj !== arr) || (n_obj[3] !== 4)) {
$ERROR('#2: Object([1,2,3]) returns ToObject([1,2,3])');
throw new Test262Error('#2: Object([1,2,3]) returns ToObject([1,2,3])');
}

View File

@ -11,7 +11,7 @@ description: Calling Object function with function declaration as argument value
//CHECK#1
if (typeof func !== 'undefined') {
$ERROR('#1: function expression can\'t be declarated');
throw new Test262Error('#1: function expression can\'t be declarated');
}
var n_obj = Object(function func() {
@ -20,10 +20,10 @@ var n_obj = Object(function func() {
//CHECK#2
if ((n_obj.constructor !== Function) || (n_obj() !== 1)) {
$ERROR('#2: Object(function func(){return 1;}) returns function');
throw new Test262Error('#2: Object(function func(){return 1;}) returns function');
}
//CHECK#3
if (typeof func !== 'undefined') {
$ERROR('#3: function expression can\'t be declarated');
throw new Test262Error('#3: function expression can\'t be declarated');
}

View File

@ -15,16 +15,16 @@ var obj = Object(1.1 * ([].length + {
//CHECK#2
if (typeof obj !== "object") {
$ERROR('#2: Object(expression) returns ToObject(expression)');
throw new Test262Error('#2: Object(expression) returns ToObject(expression)');
}
//CHECK#3
if (obj.constructor !== Number) {
$ERROR('#3: Object(expression) returns ToObject(expression)');
throw new Test262Error('#3: Object(expression) returns ToObject(expression)');
}
//CHECK#4
if ((obj != 1.1) || (obj === 1.1)) {
$ERROR('#4: Object(expression) returns ToObject(expression)');
throw new Test262Error('#4: Object(expression) returns ToObject(expression)');
}
//

View File

@ -13,20 +13,20 @@ var obj = Object((1 === 1) && (!false));
//CHECK#1
if (obj.constructor !== Boolean) {
$ERROR('#1: Object(expression) returns ToObject(expression)');
throw new Test262Error('#1: Object(expression) returns ToObject(expression)');
}
//CHECK#1.1
if (typeof obj !== "object") {
$ERROR('#1.1: Object(expression) returns ToObject(expression)');
throw new Test262Error('#1.1: Object(expression) returns ToObject(expression)');
}
//CHECK#2
if (!(obj)) {
$ERROR('#2: Object(expression) returns ToObject(expression)');
throw new Test262Error('#2: Object(expression) returns ToObject(expression)');
}
//CHECK#3
if (obj === true) {
$ERROR('#3: Object(expression) returns ToObject(expression)');
throw new Test262Error('#3: Object(expression) returns ToObject(expression)');
}

View File

@ -15,15 +15,15 @@ var obj = Object("" + 1);
//CHECK#2
if (obj.constructor !== String) {
$ERROR('#2: Object(expression) returns ToObject(expression)');
throw new Test262Error('#2: Object(expression) returns ToObject(expression)');
}
//CHECK#3
if (typeof obj !== "object") {
$ERROR('#3: Object(expression) returns ToObject(expression)');
throw new Test262Error('#3: Object(expression) returns ToObject(expression)');
}
//CHECK#4
if ((obj != "1") || (obj === "1")) {
$ERROR('#4: Object(expression) returns ToObject(expression)');
throw new Test262Error('#4: Object(expression) returns ToObject(expression)');
}

View File

@ -13,23 +13,23 @@ var num = 1.1;
// CHECK#1
if (typeof num !== 'number') {
$ERROR('#1: num = 1.1 should be Number primitive');
throw new Test262Error('#1: num = 1.1 should be Number primitive');
}
var obj = Object(num);
//CHECK#2
if (typeof obj !== "object") {
$ERROR('#2: Object(1.1) returns ToObject(1.1)');
throw new Test262Error('#2: Object(1.1) returns ToObject(1.1)');
}
//CHECK#3
if (obj.constructor !== Number) {
$ERROR('#3: Object(1.1) returns ToObject(1.1)');
throw new Test262Error('#3: Object(1.1) returns ToObject(1.1)');
}
//CHECK#4
if ((obj != 1.1) || (obj === 1.1)) {
$ERROR('#4: Object(1.1) returns ToObject(1.1)');
throw new Test262Error('#4: Object(1.1) returns ToObject(1.1)');
}
//

View File

@ -13,22 +13,22 @@ var str = 'Luke Skywalker';
// CHECK#1
if (typeof str !== 'string') {
$ERROR('#1: "Luke Skywalker" should be a String primitive');
throw new Test262Error('#1: "Luke Skywalker" should be a String primitive');
}
var obj = Object(str);
//CHECK#2
if (obj.constructor !== String) {
$ERROR('#2: Object("Luke Skywalker") returns ToObject("Luke Skywalker")');
throw new Test262Error('#2: Object("Luke Skywalker") returns ToObject("Luke Skywalker")');
}
//CHECK#3
if (typeof obj !== "object") {
$ERROR('#3: Object("Luke Skywalker") returns ToObject("Luke Skywalker")');
throw new Test262Error('#3: Object("Luke Skywalker") returns ToObject("Luke Skywalker")');
}
//CHECK#4
if ((obj != "Luke Skywalker") || (obj === "Luke Skywalker")) {
$ERROR('#4: Object("Luke Skywalker") returns ToObject("Luke Skywalker")');
throw new Test262Error('#4: Object("Luke Skywalker") returns ToObject("Luke Skywalker")');
}

View File

@ -15,12 +15,12 @@ var obj = {
//CHECK#1
if (typeof(obj) !== 'object') {
$ERROR('#1: obj = {flag:true} should be an Object');
throw new Test262Error('#1: obj = {flag:true} should be an Object');
}
var n_obj = Object(obj);
//CHECK#2
if ((n_obj !== obj) || (!(n_obj['flag']))) {
$ERROR('#2: Object({flag:true}) returns ToObject({flag:true})');
throw new Test262Error('#2: Object({flag:true}) returns ToObject({flag:true})');
}

View File

@ -13,18 +13,18 @@ var num = NaN;
// CHECK#1
if (typeof num !== 'number') {
$ERROR('#1: num = NaN should have number type');
throw new Test262Error('#1: num = NaN should have number type');
}
var obj = Object(num);
//CHECK#2
if (obj.constructor !== Number) {
$ERROR('#2: Object(NaN) returns ToObject(NaN)');
throw new Test262Error('#2: Object(NaN) returns ToObject(NaN)');
}
//CHECK#3
if (typeof obj !== "object") {
$ERROR('#2: Object(NaN) returns ToObject(NaN)');
throw new Test262Error('#2: Object(NaN) returns ToObject(NaN)');
}
//

View File

@ -13,22 +13,22 @@ var num = Infinity;
// CHECK#1
if (typeof num !== 'number') {
$ERROR('#1: num = Infinity should be a Number primitive');
throw new Test262Error('#1: num = Infinity should be a Number primitive');
}
var obj = Object(num);
//CHECK#2
if (obj.constructor !== Number) {
$ERROR('#2: Object(Infinity) returns ToObject(Infinity)');
throw new Test262Error('#2: Object(Infinity) returns ToObject(Infinity)');
}
//CHECK#3
if (typeof obj !== "object") {
$ERROR('#3: Object(Infinity) returns ToObject(Infinity)');
throw new Test262Error('#3: Object(Infinity) returns ToObject(Infinity)');
}
//CHECK#4
if ((obj != Infinity) || (obj === Infinity)) {
$ERROR('#4: Object(Infinity) returns ToObject(Infinity)');
throw new Test262Error('#4: Object(Infinity) returns ToObject(Infinity)');
}

View File

@ -13,22 +13,22 @@ var str = '';
// CHECK#1
if (typeof(str) !== 'string') {
$ERROR('#1: "" is NOT a String');
throw new Test262Error('#1: "" is NOT a String');
}
var obj = Object(str);
//CHECK#2
if (obj.constructor !== String) {
$ERROR('#2: Object("") returns ToObject("")');
throw new Test262Error('#2: Object("") returns ToObject("")');
}
//CHECK#3
if (typeof obj !== "object") {
$ERROR('#3: Object("") returns ToObject("")');
throw new Test262Error('#3: Object("") returns ToObject("")');
}
//CHECK#4
if ((obj != "") || (obj === "")) {
$ERROR('#4: Object("") returns ToObject("")');
throw new Test262Error('#4: Object("") returns ToObject("")');
}

View File

@ -15,12 +15,12 @@ var func = function() {
//CHECK#1
if (typeof func !== 'function') {
$ERROR('#1: func = function(){return 1;} is NOT an function');
throw new Test262Error('#1: func = function(){return 1;} is NOT an function');
}
var n_obj = Object(func);
//CHECK#2
if ((n_obj !== func) || (n_obj() !== 1)) {
$ERROR('#2: Object(function) returns function');
throw new Test262Error('#2: Object(function) returns function');
}

View File

@ -13,14 +13,14 @@ description: >
//CHECK#1
if (typeof func !== 'function') {
$ERROR('#1: func = function(){return 1;} is NOT an function');
throw new Test262Error('#1: func = function(){return 1;} is NOT an function');
}
var n_obj = Object(func);
//CHECK#2
if ((n_obj !== func) || (n_obj() !== 1)) {
$ERROR('#2: Object(function) returns function');
throw new Test262Error('#2: Object(function) returns function');
}
function func() {

View File

@ -13,15 +13,15 @@ var obj = Object(1, 2, 3);
//CHECK#1
if (obj.constructor !== Number) {
$ERROR('#1: Since Object as a function calling is the same as function calling list of arguments can appears in braces;');
throw new Test262Error('#1: Since Object as a function calling is the same as function calling list of arguments can appears in braces;');
}
//CHECK#2
if (typeof obj !== "object") {
$ERROR('#2: Since Object as a function calling is the same as function calling list of arguments can appears in braces;');
throw new Test262Error('#2: Since Object as a function calling is the same as function calling list of arguments can appears in braces;');
}
//CHECK#3
if ((obj != 1) || (obj === 1)) {
$ERROR('3#: Since Object as a function calling is the same as function calling list of arguments can appears in braces;');
throw new Test262Error('3#: Since Object as a function calling is the same as function calling list of arguments can appears in braces;');
}

View File

@ -13,10 +13,10 @@ var obj = Object(null, 2, 3);
//CHECK#1
if (obj.constructor !== Object) {
$ERROR('#1: Since Object as a function calling is the same as function calling list of arguments can appears in braces;');
throw new Test262Error('#1: Since Object as a function calling is the same as function calling list of arguments can appears in braces;');
}
//CHECK#2
if (typeof obj !== "object") {
$ERROR('#2: Since Object as a function calling is the same as function calling list of arguments can appears in braces;');
throw new Test262Error('#2: Since Object as a function calling is the same as function calling list of arguments can appears in braces;');
}

View File

@ -13,15 +13,15 @@ var obj = Object((null, 2, 3), 1, 2);
//CHECK#1
if (obj.constructor !== Number) {
$ERROR('#1: Since Object as a function calling is the same as function calling list of arguments can appears in braces;');
throw new Test262Error('#1: Since Object as a function calling is the same as function calling list of arguments can appears in braces;');
}
//CHECK#2
if (typeof obj !== "object") {
$ERROR('#2: Since Object as a function calling is the same as function calling list of arguments can appears in braces;');
throw new Test262Error('#2: Since Object as a function calling is the same as function calling list of arguments can appears in braces;');
}
//CHECK#3
if ((obj != 3) || (obj === 3)) {
$ERROR('3#: Since Object as a function calling is the same as function calling list of arguments can appears in braces;');
throw new Test262Error('3#: Since Object as a function calling is the same as function calling list of arguments can appears in braces;');
}

View File

@ -18,26 +18,26 @@ var obj = new Object();
// CHECK#0
if (obj === undefined) {
$ERROR('#0: new Object() return the newly created native object.');
throw new Test262Error('#0: new Object() return the newly created native object.');
}
// CHECK#1
if (obj.constructor !== Object) {
$ERROR('#1: new Object() create a new native ECMAScript object');
throw new Test262Error('#1: new Object() create a new native ECMAScript object');
}
// CHECK#2
if (!(Object.prototype.isPrototypeOf(obj))) {
$ERROR('#2: when new Object() calls the [[Prototype]] property of the newly constructed object is set to the Object prototype object.');
throw new Test262Error('#2: when new Object() calls the [[Prototype]] property of the newly constructed object is set to the Object prototype object.');
}
// CHECK#3
var to_string_result = '[object ' + 'Object' + ']';
if (obj.toString() !== to_string_result) {
$ERROR('#3: when new Object() calls the [[Class]] property of the newly constructed object is set to "Object".');
throw new Test262Error('#3: when new Object() calls the [[Class]] property of the newly constructed object is set to "Object".');
}
// CHECK#4
if (obj.valueOf().toString() !== to_string_result.toString()) {
$ERROR('#4: when new Object() calls the newly constructed object has no [[Value]] property.');
throw new Test262Error('#4: when new Object() calls the newly constructed object has no [[Value]] property.');
}

View File

@ -19,26 +19,26 @@ var obj = new Object(void 0);
// CHECK#0
if (obj === undefined) {
$ERROR('#0: new Object(undefined) return the newly created native object.');
throw new Test262Error('#0: new Object(undefined) return the newly created native object.');
}
// CHECK#1
if (obj.constructor !== Object) {
$ERROR('#1: new Object(undefined) create a new native ECMAScript object');
throw new Test262Error('#1: new Object(undefined) create a new native ECMAScript object');
}
// CHECK#2
if (!(Object.prototype.isPrototypeOf(obj))) {
$ERROR('#2: when new Object(undefined) calls the [[Prototype]] property of the newly constructed object is set to the Object prototype object.');
throw new Test262Error('#2: when new Object(undefined) calls the [[Prototype]] property of the newly constructed object is set to the Object prototype object.');
}
// CHECK#3
var to_string_result = '[object ' + 'Object' + ']';
if (obj.toString() !== to_string_result) {
$ERROR('#3: when new Object(undefined) calls the [[Class]] property of the newly constructed object is set to "Object".');
throw new Test262Error('#3: when new Object(undefined) calls the [[Class]] property of the newly constructed object is set to "Object".');
}
// CHECK#4
if (obj.valueOf().toString() !== to_string_result.toString()) {
$ERROR('#4: when new Object(undefined) calls the newly constructed object has no [[Value]] property.');
throw new Test262Error('#4: when new Object(undefined) calls the newly constructed object has no [[Value]] property.');
}

View File

@ -18,26 +18,26 @@ var obj = new Object(null);
// CHECK#0
if (obj === undefined) {
$ERROR('#0: new Object(null) return the newly created native object.');
throw new Test262Error('#0: new Object(null) return the newly created native object.');
}
// CHECK#1
if (obj.constructor !== Object) {
$ERROR('#1: new Object(null) create a new native ECMAScript object');
throw new Test262Error('#1: new Object(null) create a new native ECMAScript object');
}
// CHECK#2
if (!(Object.prototype.isPrototypeOf(obj))) {
$ERROR('#2: when new Object(null) calls the [[Prototype]] property of the newly constructed object is set to the Object prototype object.');
throw new Test262Error('#2: when new Object(null) calls the [[Prototype]] property of the newly constructed object is set to the Object prototype object.');
}
// CHECK#3
var to_string_result = '[object ' + 'Object' + ']';
if (obj.toString() !== to_string_result) {
$ERROR('#3: when new Object(null) calls the [[Class]] property of the newly constructed object is set to "Object".');
throw new Test262Error('#3: when new Object(null) calls the [[Class]] property of the newly constructed object is set to "Object".');
}
// CHECK#4
if (obj.valueOf().toString() !== to_string_result.toString()) {
$ERROR('#4: when new Object(null) calls the newly constructed object has no [[Value]] property.');
throw new Test262Error('#4: when new Object(null) calls the newly constructed object has no [[Value]] property.');
}

View File

@ -18,26 +18,26 @@ var obj = new Object(undefined);
// CHECK#0
if (obj === undefined) {
$ERROR('#0: new Object(undefined) return the newly created native object.');
throw new Test262Error('#0: new Object(undefined) return the newly created native object.');
}
// CHECK#1
if (obj.constructor !== Object) {
$ERROR('#1: new Object(undefined) create a new native ECMAScript object');
throw new Test262Error('#1: new Object(undefined) create a new native ECMAScript object');
}
// CHECK#2
if (!(Object.prototype.isPrototypeOf(obj))) {
$ERROR('#2: when new Object(undefined) calls the [[Prototype]] property of the newly constructed object is set to the Object prototype object.');
throw new Test262Error('#2: when new Object(undefined) calls the [[Prototype]] property of the newly constructed object is set to the Object prototype object.');
}
// CHECK#3
var to_string_result = '[object ' + 'Object' + ']';
if (obj.toString() !== to_string_result) {
$ERROR('#3: when new Object(undefined) calls the [[Class]] property of the newly constructed object is set to "Object".');
throw new Test262Error('#3: when new Object(undefined) calls the [[Class]] property of the newly constructed object is set to "Object".');
}
// CHECK#4
if (obj.valueOf().toString() !== to_string_result.toString()) {
$ERROR('#4: when new Object(undefined) calls the newly constructed object has no [[Value]] property.');
throw new Test262Error('#4: when new Object(undefined) calls the newly constructed object has no [[Value]] property.');
}

View File

@ -20,28 +20,28 @@ var obj = new Object(x);
// CHECK#0
if (obj === undefined) {
$ERROR('#0: new Object(undefined) return the newly created native object.');
throw new Test262Error('#0: new Object(undefined) return the newly created native object.');
}
// CHECK#1
if (obj.constructor !== Object) {
$ERROR('#1: new Object(undefined) create a new native ECMAScript object');
throw new Test262Error('#1: new Object(undefined) create a new native ECMAScript object');
}
// CHECK#2
if (!(Object.prototype.isPrototypeOf(obj))) {
$ERROR('#2: when new Object(undefined) calls the [[Prototype]] property of the newly constructed object is set to the Object prototype object.');
throw new Test262Error('#2: when new Object(undefined) calls the [[Prototype]] property of the newly constructed object is set to the Object prototype object.');
}
// CHECK#3
var to_string_result = '[object ' + 'Object' + ']';
if (obj.toString() !== to_string_result) {
$ERROR('#3: when new Object(undefined) calls the [[Class]] property of the newly constructed object is set to "Object".');
throw new Test262Error('#3: when new Object(undefined) calls the [[Class]] property of the newly constructed object is set to "Object".');
}
// CHECK#4
if (obj.valueOf().toString() !== to_string_result.toString()) {
$ERROR('#4: when new Object(undefined) calls the newly constructed object has no [[Value]] property.');
throw new Test262Error('#4: when new Object(undefined) calls the newly constructed object has no [[Value]] property.');
}
var x;

View File

@ -17,10 +17,10 @@ var n_obj = new Object(obj);
//CHECK#1
if (n_obj !== obj) {
$ERROR('#1: When the Object constructor is called and if the value is an Object simply value returns.');
throw new Test262Error('#1: When the Object constructor is called and if the value is an Object simply value returns.');
}
//CHECK#2
if (n_obj['prop'] !== 1) {
$ERROR('#2: When the Object constructor is called and if the value is an Object simply value returns.');
throw new Test262Error('#2: When the Object constructor is called and if the value is an Object simply value returns.');
}

View File

@ -17,11 +17,11 @@ var n_obj = new Object(func);
//CHECK#1
if (n_obj !== func) {
$ERROR('#1: When the Object constructor is called and if the value is an Object simply value returns');
throw new Test262Error('#1: When the Object constructor is called and if the value is an Object simply value returns');
}
//CHECK#2
if (n_obj() !== 1) {
$ERROR('When the Object constructor is called and if the value is an Object simply value returns');
throw new Test262Error('When the Object constructor is called and if the value is an Object simply value returns');
}
//

View File

@ -17,10 +17,10 @@ arr.push(4);
//CHECK#1
if (n_obj !== arr) {
$ERROR('#1: When the Object constructor is called and if the value is an Object simply value returns.');
throw new Test262Error('#1: When the Object constructor is called and if the value is an Object simply value returns.');
}
//CHECK#2
if (n_obj[3] !== 4) {
$ERROR('#2: When the Object constructor is called and if the value is an Object simply value returns.');
throw new Test262Error('#2: When the Object constructor is called and if the value is an Object simply value returns.');
}

View File

@ -15,10 +15,10 @@ var n_obj = new Object(obj);
//CHECK#1
if (n_obj !== obj) {
$ERROR('#1: When the Object constructor is called and if the value is an Object simply value returns.');
throw new Test262Error('#1: When the Object constructor is called and if the value is an Object simply value returns.');
}
//CHECK#2
if ((n_obj.getFullYear() !== 1978) || (n_obj.getMonth() !== 3)) {
$ERROR('#2: When the Object constructor is called and if the value is an Object simply value returns.');
throw new Test262Error('#2: When the Object constructor is called and if the value is an Object simply value returns.');
}

View File

@ -13,12 +13,12 @@ var n_obj = new Object(func);
//CHECK#1
if (n_obj !== func) {
$ERROR('#1: When the Object constructor is called and if the value is an Object simply value returns');
throw new Test262Error('#1: When the Object constructor is called and if the value is an Object simply value returns');
}
//CHECK#2
if (n_obj() !== 1) {
$ERROR('When the Object constructor is called and if the value is an Object simply value returns');
throw new Test262Error('When the Object constructor is called and if the value is an Object simply value returns');
}
function func() {

View File

@ -11,7 +11,7 @@ description: The value is a function declaration
//CHECK#0
if (typeof func !== 'undefined') {
$ERROR('#0: function expression can\'t be declarated');
throw new Test262Error('#0: function expression can\'t be declarated');
}
var n_obj = new Object(function func() {
@ -20,15 +20,15 @@ var n_obj = new Object(function func() {
//CHECK#1
if (n_obj.constructor !== Function) {
$ERROR('#1: When the Object constructor is called and if the value is an Object simply value returns');
throw new Test262Error('#1: When the Object constructor is called and if the value is an Object simply value returns');
}
//CHECK#2
if (n_obj() !== 1) {
$ERROR('#2: When the Object constructor is called and if the value is an Object simply value returns');
throw new Test262Error('#2: When the Object constructor is called and if the value is an Object simply value returns');
}
//CHECK#3
if (typeof func !== 'undefined') {
$ERROR('#3: function expression can\'t be declarated');
throw new Test262Error('#3: function expression can\'t be declarated');
}

View File

@ -13,7 +13,7 @@ var str = 'Obi-Wan Kenobi';
//CHECK#1
if (typeof str !== 'string') {
$ERROR('#1: "Obi-Wan Kenobi" is NOT a String');
throw new Test262Error('#1: "Obi-Wan Kenobi" is NOT a String');
}
@ -21,20 +21,20 @@ var n_obj = new Object(str);
//CHECK#2
if (n_obj.constructor !== String) {
$ERROR('#2: When the Object constructor is called with String argument return ToObject(string)');
throw new Test262Error('#2: When the Object constructor is called with String argument return ToObject(string)');
}
//CHECK#3
if (typeof n_obj !== 'object') {
$ERROR('#3: When the Object constructor is called with String argument return ToObject(string)');
throw new Test262Error('#3: When the Object constructor is called with String argument return ToObject(string)');
}
//CHECK#4
if (n_obj != str) {
$ERROR('#4: When the Object constructor is called with String argument return ToObject(string)');
throw new Test262Error('#4: When the Object constructor is called with String argument return ToObject(string)');
}
//CHECK#5
if (n_obj === str) {
$ERROR('#5: When the Object constructor is called with String argument return ToObject(string)');
throw new Test262Error('#5: When the Object constructor is called with String argument return ToObject(string)');
}

View File

@ -13,27 +13,27 @@ var str = '';
//CHECK#1
if (typeof str !== 'string') {
$ERROR('#1: "" is NOT a String');
throw new Test262Error('#1: "" is NOT a String');
}
var n_obj = new Object(str);
//CHECK#2
if (n_obj.constructor !== String) {
$ERROR('#2: When the Object constructor is called with String argument return ToObject(string)');
throw new Test262Error('#2: When the Object constructor is called with String argument return ToObject(string)');
}
//CHECK#3
if (typeof n_obj !== 'object') {
$ERROR('#3: When the Object constructor is called with String argument return ToObject(string)');
throw new Test262Error('#3: When the Object constructor is called with String argument return ToObject(string)');
}
//CHECK#4
if (n_obj != str) {
$ERROR('#4: When the Object constructor is called with String argument return ToObject(string)');
throw new Test262Error('#4: When the Object constructor is called with String argument return ToObject(string)');
}
//CHECK#5
if (n_obj === str) {
$ERROR('#5: When the Object constructor is called with String argument return ToObject(string)');
throw new Test262Error('#5: When the Object constructor is called with String argument return ToObject(string)');
}

View File

@ -13,20 +13,20 @@ var n_obj = new Object("" + 1);
//CHECK#2
if (n_obj.constructor !== String) {
$ERROR('#2: When the Object constructor is called with String argument return ToObject(string)');
throw new Test262Error('#2: When the Object constructor is called with String argument return ToObject(string)');
}
//CHECK#3
if (typeof n_obj !== 'object') {
$ERROR('#3: When the Object constructor is called with String argument return ToObject(string)');
throw new Test262Error('#3: When the Object constructor is called with String argument return ToObject(string)');
}
//CHECK#4
if (n_obj != "1") {
$ERROR('#4: When the Object constructor is called with String argument return ToObject(string)');
throw new Test262Error('#4: When the Object constructor is called with String argument return ToObject(string)');
}
//CHECK#5
if (n_obj === "1") {
$ERROR('#5: When the Object constructor is called with String argument return ToObject(string)');
throw new Test262Error('#5: When the Object constructor is called with String argument return ToObject(string)');
}

View File

@ -13,27 +13,27 @@ var bool = true;
//CHECK#1
if (typeof bool !== 'boolean') {
$ERROR('#1: true is NOT a boolean');
throw new Test262Error('#1: true is NOT a boolean');
}
var n_obj = new Object(bool);
//CHECK#2
if (n_obj.constructor !== Boolean) {
$ERROR('#2: When the Object constructor is called with Boolean argument return ToObject(boolean)');
throw new Test262Error('#2: When the Object constructor is called with Boolean argument return ToObject(boolean)');
}
//CHECK#3
if (typeof n_obj !== 'object') {
$ERROR('#3: When the Object constructor is called with Boolean argument return ToObject(boolean)');
throw new Test262Error('#3: When the Object constructor is called with Boolean argument return ToObject(boolean)');
}
//CHECK#4
if (n_obj != bool) {
$ERROR('#4: When the Object constructor is called with Boolean argument return ToObject(boolean)');
throw new Test262Error('#4: When the Object constructor is called with Boolean argument return ToObject(boolean)');
}
//CHECK#5
if (n_obj === bool) {
$ERROR('#5: When the Object constructor is called with Boolean argument return ToObject(boolean)');
throw new Test262Error('#5: When the Object constructor is called with Boolean argument return ToObject(boolean)');
}

View File

@ -13,27 +13,27 @@ var bool = false;
//CHECK#1
if (typeof bool !== 'boolean') {
$ERROR('#1: false is NOT a boolean');
throw new Test262Error('#1: false is NOT a boolean');
}
var n_obj = new Object(bool);
//CHECK#2
if (n_obj.constructor !== Boolean) {
$ERROR('#2: When the Object constructor is called with Boolean argument return ToObject(boolean)');
throw new Test262Error('#2: When the Object constructor is called with Boolean argument return ToObject(boolean)');
}
//CHECK#3
if (typeof n_obj !== 'object') {
$ERROR('#3: When the Object constructor is called with Boolean argument return ToObject(boolean)');
throw new Test262Error('#3: When the Object constructor is called with Boolean argument return ToObject(boolean)');
}
//CHECK#4
if (n_obj != bool) {
$ERROR('#4: When the Object constructor is called with Boolean argument return ToObject(boolean)');
throw new Test262Error('#4: When the Object constructor is called with Boolean argument return ToObject(boolean)');
}
//CHECK#5
if (n_obj === bool) {
$ERROR('#5: When the Object constructor is called with Boolean argument return ToObject(boolean)');
throw new Test262Error('#5: When the Object constructor is called with Boolean argument return ToObject(boolean)');
}

View File

@ -13,20 +13,20 @@ var n_obj = new Object((1 === 1) && !(false));
//CHECK#2
if (n_obj.constructor !== Boolean) {
$ERROR('#2: When the Object constructor is called with Boolean argument return ToObject(boolean)');
throw new Test262Error('#2: When the Object constructor is called with Boolean argument return ToObject(boolean)');
}
//CHECK#3
if (typeof n_obj !== 'object') {
$ERROR('#3: When the Object constructor is called with Boolean argument return ToObject(boolean)');
throw new Test262Error('#3: When the Object constructor is called with Boolean argument return ToObject(boolean)');
}
//CHECK#4
if (n_obj != true) {
$ERROR('#4: When the Object constructor is called with Boolean argument return ToObject(boolean)');
throw new Test262Error('#4: When the Object constructor is called with Boolean argument return ToObject(boolean)');
}
//CHECK#5
if (n_obj === true) {
$ERROR('#5: When the Object constructor is called with Boolean argument return ToObject(boolean)');
throw new Test262Error('#5: When the Object constructor is called with Boolean argument return ToObject(boolean)');
}

View File

@ -13,27 +13,27 @@ var num = 1.0;
//CHECK#1
if (typeof num !== 'number') {
$ERROR('#1: 1.0 is NOT a number');
throw new Test262Error('#1: 1.0 is NOT a number');
}
var n_obj = new Object(num);
//CHECK#2
if (n_obj.constructor !== Number) {
$ERROR('#2: When the Object constructor is called with Number argument return ToObject(number)');
throw new Test262Error('#2: When the Object constructor is called with Number argument return ToObject(number)');
}
//CHECK#3
if (typeof n_obj !== 'object') {
$ERROR('#3: When the Object constructor is called with Number argument return ToObject(number)');
throw new Test262Error('#3: When the Object constructor is called with Number argument return ToObject(number)');
}
//CHECK#4
if (n_obj != num) {
$ERROR('#4: When the Object constructor is called with Number argument return ToObject(number)');
throw new Test262Error('#4: When the Object constructor is called with Number argument return ToObject(number)');
}
//CHECK#5
if (n_obj === num) {
$ERROR('#5: When the Object constructor is called with Number argument return ToObject(number)');
throw new Test262Error('#5: When the Object constructor is called with Number argument return ToObject(number)');
}

View File

@ -13,17 +13,17 @@ var num = NaN;
//CHECK#1
if (typeof num !== 'number') {
$ERROR('#1: NaN is NOT a number');
throw new Test262Error('#1: NaN is NOT a number');
}
var n_obj = new Object(num);
//CHECK#2
if (n_obj.constructor !== Number) {
$ERROR('#2: When the Object constructor is called with Number argument return ToObject(number)');
throw new Test262Error('#2: When the Object constructor is called with Number argument return ToObject(number)');
}
//CHECK#3
if (typeof n_obj !== 'object') {
$ERROR('#3: When the Object constructor is called with Number argument return ToObject(number)');
throw new Test262Error('#3: When the Object constructor is called with Number argument return ToObject(number)');
}

View File

@ -13,27 +13,27 @@ var num = Infinity;
//CHECK#1
if (typeof num !== 'number') {
$ERROR('#1: Infinity is NOT a number');
throw new Test262Error('#1: Infinity is NOT a number');
}
var n_obj = new Object(num);
//CHECK#2
if (n_obj.constructor !== Number) {
$ERROR('#2: When the Object constructor is called with Number argument return ToObject(number)');
throw new Test262Error('#2: When the Object constructor is called with Number argument return ToObject(number)');
}
//CHECK#3
if (typeof n_obj !== 'object') {
$ERROR('#3: When the Object constructor is called with Number argument return ToObject(number)');
throw new Test262Error('#3: When the Object constructor is called with Number argument return ToObject(number)');
}
//CHECK#4
if (n_obj != num) {
$ERROR('#4: When the Object constructor is called with Number argument return ToObject(number)');
throw new Test262Error('#4: When the Object constructor is called with Number argument return ToObject(number)');
}
//CHECK#5
if (n_obj === num) {
$ERROR('#5: When the Object constructor is called with Number argument return ToObject(number)');
throw new Test262Error('#5: When the Object constructor is called with Number argument return ToObject(number)');
}

View File

@ -15,20 +15,20 @@ var n_obj = new Object(2 * ([].length + {
//CHECK#2
if (n_obj.constructor !== Number) {
$ERROR('#2: When the Object constructor is called with Number argument return ToObject(number)');
throw new Test262Error('#2: When the Object constructor is called with Number argument return ToObject(number)');
}
//CHECK#3
if (typeof n_obj !== 'object') {
$ERROR('#3: When the Object constructor is called with Number argument return ToObject(number)');
throw new Test262Error('#3: When the Object constructor is called with Number argument return ToObject(number)');
}
//CHECK#4
if (n_obj != 2) {
$ERROR('#4: When the Object constructor is called with Number argument return ToObject(number)');
throw new Test262Error('#4: When the Object constructor is called with Number argument return ToObject(number)');
}
//CHECK#5
if (n_obj === 2) {
$ERROR('#5: When the Object constructor is called with Number argument return ToObject(number)');
throw new Test262Error('#5: When the Object constructor is called with Number argument return ToObject(number)');
}

View File

@ -13,15 +13,15 @@ var obj = new Object(1, 2, 3);
//CHECK#1
if (obj.constructor !== Number) {
$ERROR('#1: Since Object as a function calling is the same as function calling list of arguments can appears in braces;');
throw new Test262Error('#1: Since Object as a function calling is the same as function calling list of arguments can appears in braces;');
}
//CHECK#2
if (typeof obj !== "object") {
$ERROR('#2: Since Object as a function calling is the same as function calling list of arguments can appears in braces;');
throw new Test262Error('#2: Since Object as a function calling is the same as function calling list of arguments can appears in braces;');
}
//CHECK#3
if ((obj != 1) || (obj === 1)) {
$ERROR('3#: Since Object as a function calling is the same as function calling list of arguments can appears in braces;');
throw new Test262Error('3#: Since Object as a function calling is the same as function calling list of arguments can appears in braces;');
}

View File

@ -13,10 +13,10 @@ var obj = new Object(null, 2, 3);
//CHECK#1
if (obj.constructor !== Object) {
$ERROR('#1: Since Object as a function calling is the same as function calling list of arguments can appears in braces;');
throw new Test262Error('#1: Since Object as a function calling is the same as function calling list of arguments can appears in braces;');
}
//CHECK#2
if (typeof obj !== "object") {
$ERROR('#2: Since Object as a function calling is the same as function calling list of arguments can appears in braces;');
throw new Test262Error('#2: Since Object as a function calling is the same as function calling list of arguments can appears in braces;');
}

View File

@ -13,15 +13,15 @@ var obj = new Object((null, 2, 3), 1, 2);
//CHECK#1
if (obj.constructor !== Number) {
$ERROR('#1: Since Object as a function calling is the same as function calling list of arguments can appears in braces;');
throw new Test262Error('#1: Since Object as a function calling is the same as function calling list of arguments can appears in braces;');
}
//CHECK#2
if (typeof obj !== "object") {
$ERROR('#2: Since Object as a function calling is the same as function calling list of arguments can appears in braces;');
throw new Test262Error('#2: Since Object as a function calling is the same as function calling list of arguments can appears in braces;');
}
//CHECK#3
if ((obj != 3) || (obj === 3)) {
$ERROR('3#: Since Object as a function calling is the same as function calling list of arguments can appears in braces;');
throw new Test262Error('3#: Since Object as a function calling is the same as function calling list of arguments can appears in braces;');
}

View File

@ -8,5 +8,5 @@ description: Checking existence of the property "prototype"
---*/
if (!Object.hasOwnProperty("prototype")) {
$ERROR('#1: The Object constructor has the property "prototype"');
throw new Test262Error('#1: The Object constructor has the property "prototype"');
}

View File

@ -11,5 +11,5 @@ description: Checking Function.prototype.isPrototypeOf(Object)
// CHECK#
if (!(Function.prototype.isPrototypeOf(Object))) {
$ERROR('#1: the value of the internal [[Prototype]] property of the Object constructor is the Function prototype object.');
throw new Test262Error('#1: the value of the internal [[Prototype]] property of the Object constructor is the Function prototype object.');
}

View File

@ -9,10 +9,10 @@ description: Checking Object.length
//CHECK#1
if (!Object.hasOwnProperty("length")) {
$ERROR('#1: The Object constructor has the property "length"');
throw new Test262Error('#1: The Object constructor has the property "length"');
}
//CHECK#2
if (Object.length !== 1) {
$ERROR('#2: Object.length property value should be 1');
throw new Test262Error('#2: Object.length property value should be 1');
}

View File

@ -12,5 +12,5 @@ var obj = Object;
var thisobj = this.Object;
if (obj !== thisobj) {
$ERROR('Object is the property of global');
throw new Test262Error('Object is the property of global');
}

View File

@ -11,30 +11,30 @@ description: Trying to convert from Boolean to Object
// CHECK#1
if (Object(true).valueOf() !== true) {
$ERROR('#1: Object(true).valueOf() === true. Actual: ' + (Object(true).valueOf()));
throw new Test262Error('#1: Object(true).valueOf() === true. Actual: ' + (Object(true).valueOf()));
}
// CHECK#2
if (typeof Object(true) !== "object") {
$ERROR('#2: typeof Object(true) === "object". Actual: ' + (typeof Object(true)));
throw new Test262Error('#2: typeof Object(true) === "object". Actual: ' + (typeof Object(true)));
}
// CHECK#3
if (Object(true).constructor.prototype !== Boolean.prototype) {
$ERROR('#3: Object(true).constructor.prototype === Boolean.prototype. Actual: ' + (Object(true).constructor.prototype));
throw new Test262Error('#3: Object(true).constructor.prototype === Boolean.prototype. Actual: ' + (Object(true).constructor.prototype));
}
// CHECK#4
if (Object(false).valueOf() !== false) {
$ERROR('#4: Object(false).valueOf() === false. Actual: ' + (Object(false).valueOf()));
throw new Test262Error('#4: Object(false).valueOf() === false. Actual: ' + (Object(false).valueOf()));
}
// CHECK#5
if (typeof Object(false) !== "object") {
$ERROR('#5: typeof Object(false) === "object". Actual: ' + (typeof Object(false)));
throw new Test262Error('#5: typeof Object(false) === "object". Actual: ' + (typeof Object(false)));
}
// CHECK#6
if (Object(false).constructor.prototype !== Boolean.prototype) {
$ERROR('#6: Object(false).constructor.prototype === Boolean.prototype. Actual: ' + (Object(false).constructor.prototype));
throw new Test262Error('#6: Object(false).constructor.prototype === Boolean.prototype. Actual: ' + (Object(false).constructor.prototype));
}

View File

@ -11,124 +11,124 @@ description: Converting from various numbers to Object
// CHECK#1
if (Object(0).valueOf() !== 0) {
$ERROR('#1: Object(0).valueOf() === 0. Actual: ' + (Object(0).valueOf()));
throw new Test262Error('#1: Object(0).valueOf() === 0. Actual: ' + (Object(0).valueOf()));
}
// CHECK#2
if (typeof Object(0) !== "object") {
$ERROR('#2: typeof Object(0) === "object". Actual: ' + (typeof Object(0)));
throw new Test262Error('#2: typeof Object(0) === "object". Actual: ' + (typeof Object(0)));
}
// CHECK#3
if (Object(0).constructor.prototype !== Number.prototype) {
$ERROR('#3: Object(0).constructor.prototype === Number.prototype. Actual: ' + (Object(0).constructor.prototype));
throw new Test262Error('#3: Object(0).constructor.prototype === Number.prototype. Actual: ' + (Object(0).constructor.prototype));
}
// CHECK#4
if (Object(-0).valueOf() !== -0) {
$ERROR('#4.1: Object(-0).valueOf() === 0. Actual: ' + (Object(-0).valueOf()));
throw new Test262Error('#4.1: Object(-0).valueOf() === 0. Actual: ' + (Object(-0).valueOf()));
} else if (1 / Object(-0).valueOf() !== Number.NEGATIVE_INFINITY) {
$ERROR('#4.2: Object(-0).valueOf() === -0. Actual: +0');
throw new Test262Error('#4.2: Object(-0).valueOf() === -0. Actual: +0');
}
// CHECK#5
if (typeof Object(-0) !== "object") {
$ERROR('#5: typeof Object(-0) === "object". Actual: ' + (typeof Object(-0)));
throw new Test262Error('#5: typeof Object(-0) === "object". Actual: ' + (typeof Object(-0)));
}
// CHECK#6
if (Object(-0).constructor.prototype !== Number.prototype) {
$ERROR('#6: Object(-0).constructor.prototype === Number.prototype. Actual: ' + (Object(-0).constructor.prototype));
throw new Test262Error('#6: Object(-0).constructor.prototype === Number.prototype. Actual: ' + (Object(-0).constructor.prototype));
}
// CHECK#7
if (Object(1).valueOf() !== 1) {
$ERROR('#7: Object(1).valueOf() === 1. Actual: ' + (Object(1).valueOf()));
throw new Test262Error('#7: Object(1).valueOf() === 1. Actual: ' + (Object(1).valueOf()));
}
// CHECK#8
if (typeof Object(1) !== "object") {
$ERROR('#8: typeof Object(1) === "object". Actual: ' + (typeof Object(1)));
throw new Test262Error('#8: typeof Object(1) === "object". Actual: ' + (typeof Object(1)));
}
// CHECK#9
if (Object(1).constructor.prototype !== Number.prototype) {
$ERROR('#9: Object(1).constructor.prototype === Number.prototype. Actual: ' + (Object(1).constructor.prototype));
throw new Test262Error('#9: Object(1).constructor.prototype === Number.prototype. Actual: ' + (Object(1).constructor.prototype));
}
// CHECK#10
if (Object(-1).valueOf() !== -1) {
$ERROR('#10: Object(-1).valueOf() === -1. Actual: ' + (Object(-1).valueOf()));
throw new Test262Error('#10: Object(-1).valueOf() === -1. Actual: ' + (Object(-1).valueOf()));
}
// CHECK#11
if (typeof Object(-1) !== "object") {
$ERROR('#11: typeof Object(-1) === "object". Actual: ' + (typeof Object(-1)));
throw new Test262Error('#11: typeof Object(-1) === "object". Actual: ' + (typeof Object(-1)));
}
// CHECK#12
if (Object(-1).constructor.prototype !== Number.prototype) {
$ERROR('#12: Object(-1).constructor.prototype === Number.prototype. Actual: ' + (Object(-1).constructor.prototype));
throw new Test262Error('#12: Object(-1).constructor.prototype === Number.prototype. Actual: ' + (Object(-1).constructor.prototype));
}
// CHECK#13
if (Object(Number.MIN_VALUE).valueOf() !== Number.MIN_VALUE) {
$ERROR('#13: Object(Number.MIN_VALUE).valueOf() === Number.MIN_VALUE. Actual: ' + (Object(Number.MIN_VALUE).valueOf()));
throw new Test262Error('#13: Object(Number.MIN_VALUE).valueOf() === Number.MIN_VALUE. Actual: ' + (Object(Number.MIN_VALUE).valueOf()));
}
// CHECK#14
if (typeof Object(Number.MIN_VALUE) !== "object") {
$ERROR('#14: typeof Object(Number.MIN_VALUE) === "object". Actual: ' + (typeof Object(Number.MIN_VALUE)));
throw new Test262Error('#14: typeof Object(Number.MIN_VALUE) === "object". Actual: ' + (typeof Object(Number.MIN_VALUE)));
}
// CHECK#15
if (Object(Number.MIN_VALUE).constructor.prototype !== Number.prototype) {
$ERROR('#15: Object(Number.MIN_VALUE).constructor.prototype === Number.prototype. Actual: ' + (Object(Number.MIN_VALUE).constructor.prototype));
throw new Test262Error('#15: Object(Number.MIN_VALUE).constructor.prototype === Number.prototype. Actual: ' + (Object(Number.MIN_VALUE).constructor.prototype));
}
// CHECK#16
if (Object(Number.MAX_VALUE).valueOf() !== Number.MAX_VALUE) {
$ERROR('#16: Object(Number.MAX_VALUE).valueOf() === Number.MAX_VALUE. Actual: ' + (Object(Number.MAX_VALUE).valueOf()));
throw new Test262Error('#16: Object(Number.MAX_VALUE).valueOf() === Number.MAX_VALUE. Actual: ' + (Object(Number.MAX_VALUE).valueOf()));
}
// CHECK#17
if (typeof Object(Number.MAX_VALUE) !== "object") {
$ERROR('#17: typeof Object(Number.MAX_VALUE) === "object". Actual: ' + (typeof Object(Number.MAX_VALUE)));
throw new Test262Error('#17: typeof Object(Number.MAX_VALUE) === "object". Actual: ' + (typeof Object(Number.MAX_VALUE)));
}
// CHECK#18
if (Object(Number.MAX_VALUE).constructor.prototype !== Number.prototype) {
$ERROR('#18: Object(Number.MAX_VALUE).constructor.prototype === Number.prototype. Actual: ' + (Object(Number.MAX_VALUE).constructor.prototype));
throw new Test262Error('#18: Object(Number.MAX_VALUE).constructor.prototype === Number.prototype. Actual: ' + (Object(Number.MAX_VALUE).constructor.prototype));
}
// CHECK#19
if (Object(Number.POSITIVE_INFINITY).valueOf() !== Number.POSITIVE_INFINITY) {
$ERROR('#19: Object(Number.POSITIVE_INFINITY).valueOf() === Number.POSITIVE_INFINITY. Actual: ' + (Object(Number.POSITIVE_INFINITY).valueOf()));
throw new Test262Error('#19: Object(Number.POSITIVE_INFINITY).valueOf() === Number.POSITIVE_INFINITY. Actual: ' + (Object(Number.POSITIVE_INFINITY).valueOf()));
}
// CHECK#20
if (typeof Object(Number.POSITIVE_INFINITY) !== "object") {
$ERROR('#20: typeof Object(Number.POSITIVE_INFINITY) === "object". Actual: ' + (typeof Object(Number.POSITIVE_INFINITY)));
throw new Test262Error('#20: typeof Object(Number.POSITIVE_INFINITY) === "object". Actual: ' + (typeof Object(Number.POSITIVE_INFINITY)));
}
// CHECK#21
if (Object(Number.POSITIVE_INFINITY).constructor.prototype !== Number.prototype) {
$ERROR('#21: Object(Number.POSITIVE_INFINITY).constructor.prototype === Number.prototype. Actual: ' + (Object(Number.POSITIVE_INFINITY).constructor.prototype));
throw new Test262Error('#21: Object(Number.POSITIVE_INFINITY).constructor.prototype === Number.prototype. Actual: ' + (Object(Number.POSITIVE_INFINITY).constructor.prototype));
}
// CHECK#22
if (Object(Number.NEGATIVE_INFINITY).valueOf() !== Number.NEGATIVE_INFINITY) {
$ERROR('#22: Object(Number.NEGATIVE_INFINITY).valueOf() === Number.NEGATIVE_INFINITY. Actual: ' + (Object(Number.NEGATIVE_INFINITY).valueOf()));
throw new Test262Error('#22: Object(Number.NEGATIVE_INFINITY).valueOf() === Number.NEGATIVE_INFINITY. Actual: ' + (Object(Number.NEGATIVE_INFINITY).valueOf()));
}
// CHECK#23
if (typeof Object(Number.NEGATIVE_INFINITY) !== "object") {
$ERROR('#23: typeof Object(Number.NEGATIVE_INFINITY) === "object". Actual: ' + (typeof Object(Number.NEGATIVE_INFINITY)));
throw new Test262Error('#23: typeof Object(Number.NEGATIVE_INFINITY) === "object". Actual: ' + (typeof Object(Number.NEGATIVE_INFINITY)));
}
// CHECK#24
if (Object(Number.NEGATIVE_INFINITY).constructor.prototype !== Number.prototype) {
$ERROR('#24: Object(Number.NEGATIVE_INFINITY).constructor.prototype === Number.prototype. Actual: ' + (Object(Number.NEGATIVE_INFINITY).constructor.prototype));
throw new Test262Error('#24: Object(Number.NEGATIVE_INFINITY).constructor.prototype === Number.prototype. Actual: ' + (Object(Number.NEGATIVE_INFINITY).constructor.prototype));
}
// CHECK#25
@ -136,40 +136,40 @@ assert.sameValue(Object(NaN).valueOf(), NaN, "Object(NaN).valueOf()");
// CHECK#26
if (typeof Object(Number.NaN) !== "object") {
$ERROR('#26: typeof Object(Number.NaN) === "object". Actual: ' + (typeof Object(Number.NaN)));
throw new Test262Error('#26: typeof Object(Number.NaN) === "object". Actual: ' + (typeof Object(Number.NaN)));
}
// CHECK#27
if (Object(Number.NaN).constructor.prototype !== Number.prototype) {
$ERROR('#27: Object(Number.NaN).constructor.prototype === Number.prototype. Actual: ' + (Object(Number.NaN).constructor.prototype));
throw new Test262Error('#27: Object(Number.NaN).constructor.prototype === Number.prototype. Actual: ' + (Object(Number.NaN).constructor.prototype));
}
// CHECK#28
if (Object(1.2345).valueOf() !== 1.2345) {
$ERROR('#28: Object(1.2345).valueOf() === 1.2345. Actual: ' + (Object(1.2345).valueOf()));
throw new Test262Error('#28: Object(1.2345).valueOf() === 1.2345. Actual: ' + (Object(1.2345).valueOf()));
}
// CHECK#29
if (typeof Object(1.2345) !== "object") {
$ERROR('#29: typeof Object(1.2345) === "object". Actual: ' + (typeof Object(1.2345)));
throw new Test262Error('#29: typeof Object(1.2345) === "object". Actual: ' + (typeof Object(1.2345)));
}
// CHECK#30
if (Object(1.2345).constructor.prototype !== Number.prototype) {
$ERROR('#30: Object(1.2345).constructor.prototype === Number.prototype. Actual: ' + (Object(1.2345).constructor.prototype));
throw new Test262Error('#30: Object(1.2345).constructor.prototype === Number.prototype. Actual: ' + (Object(1.2345).constructor.prototype));
}
// CHECK#31
if (Object(-1.2345).valueOf() !== -1.2345) {
$ERROR('#31: Object(-1.2345).valueOf() === -1.2345. Actual: ' + (Object(-1.2345).valueOf()));
throw new Test262Error('#31: Object(-1.2345).valueOf() === -1.2345. Actual: ' + (Object(-1.2345).valueOf()));
}
// CHECK#32
if (typeof Object(-1.2345) !== "object") {
$ERROR('#32: typeof Object(-1.2345) === "object". Actual: ' + (typeof Object(-1.2345)));
throw new Test262Error('#32: typeof Object(-1.2345) === "object". Actual: ' + (typeof Object(-1.2345)));
}
// CHECK#33
if (Object(-1.2345).constructor.prototype !== Number.prototype) {
$ERROR('#33: Object(-1.2345).constructor.prototype === Number.prototype. Actual: ' + (Object(-1.2345).constructor.prototype));
throw new Test262Error('#33: Object(-1.2345).constructor.prototype === Number.prototype. Actual: ' + (Object(-1.2345).constructor.prototype));
}

View File

@ -11,60 +11,60 @@ description: Converting from various strings to Object
// CHECK#1
if (Object("some string").valueOf() !== "some string") {
$ERROR('#1: Object("some string").valueOf() === "some string". Actual: ' + (Object("some string").valueOf()));
throw new Test262Error('#1: Object("some string").valueOf() === "some string". Actual: ' + (Object("some string").valueOf()));
}
// CHECK#2
if (typeof Object("some string") !== "object") {
$ERROR('#2: typeof Object("some string") === "object". Actual: ' + (typeof Object("some string")));
throw new Test262Error('#2: typeof Object("some string") === "object". Actual: ' + (typeof Object("some string")));
}
// CHECK#3
if (Object("some string").constructor.prototype !== String.prototype) {
$ERROR('#3: Object("some string").constructor.prototype === String.prototype. Actual: ' + (Object("some string").constructor.prototype));
throw new Test262Error('#3: Object("some string").constructor.prototype === String.prototype. Actual: ' + (Object("some string").constructor.prototype));
}
// CHECK#4
if (Object("").valueOf() !== "") {
$ERROR('#4: Object("").valueOf() === false. Actual: ' + (Object("").valueOf()));
throw new Test262Error('#4: Object("").valueOf() === false. Actual: ' + (Object("").valueOf()));
}
// CHECK#5
if (typeof Object("") !== "object") {
$ERROR('#5: typeof Object("") === "object". Actual: ' + (typeof Object("")));
throw new Test262Error('#5: typeof Object("") === "object". Actual: ' + (typeof Object("")));
}
// CHECK#6
if (Object("").constructor.prototype !== String.prototype) {
$ERROR('#6: Object("").constructor.prototype === String.prototype. Actual: ' + (Object("").constructor.prototype));
throw new Test262Error('#6: Object("").constructor.prototype === String.prototype. Actual: ' + (Object("").constructor.prototype));
}
// CHECK#7
if (Object("\r\t\b\n\v\f").valueOf() !== "\r\t\b\n\v\f") {
$ERROR('#7: Object("\\r\\t\\b\\n\\v\\f").valueOf() === false. Actual: ' + (Object("\r\t\b\n\v\f").valueOf()));
throw new Test262Error('#7: Object("\\r\\t\\b\\n\\v\\f").valueOf() === false. Actual: ' + (Object("\r\t\b\n\v\f").valueOf()));
}
// CHECK#8
if (typeof Object("\r\t\b\n\v\f") !== "object") {
$ERROR('#8: typeof Object("\\r\\t\\b\\n\\v\\f") === "object". Actual: ' + (typeof Object("\r\t\b\n\v\f")));
throw new Test262Error('#8: typeof Object("\\r\\t\\b\\n\\v\\f") === "object". Actual: ' + (typeof Object("\r\t\b\n\v\f")));
}
// CHECK#9
if (Object("\r\t\b\n\v\f").constructor.prototype !== String.prototype) {
$ERROR('#9: Object("\\r\\t\\b\\n\\v\\f").constructor.prototype === String.prototype. Actual: ' + (Object("\r\t\b\n\v\f").constructor.prototype));
throw new Test262Error('#9: Object("\\r\\t\\b\\n\\v\\f").constructor.prototype === String.prototype. Actual: ' + (Object("\r\t\b\n\v\f").constructor.prototype));
}
// CHECK#10
if (Object(String(10)).valueOf() !== "10") {
$ERROR('#10: Object(String(10)).valueOf() === false. Actual: ' + (Object(String(10)).valueOf()));
throw new Test262Error('#10: Object(String(10)).valueOf() === false. Actual: ' + (Object(String(10)).valueOf()));
}
// CHECK#11
if (typeof Object(String(10)) !== "object") {
$ERROR('#11: typeof Object(String(10)) === "object". Actual: ' + (typeof Object(String(10))));
throw new Test262Error('#11: typeof Object(String(10)) === "object". Actual: ' + (typeof Object(String(10))));
}
// CHECK#12
if (Object(String(10)).constructor.prototype !== String.prototype) {
$ERROR('#12: Object(String(10)).constructor.prototype === String.prototype. Actual: ' + (Object(String(10)).constructor.prototype));
throw new Test262Error('#12: Object(String(10)).constructor.prototype === String.prototype. Actual: ' + (Object(String(10)).constructor.prototype));
}

View File

@ -21,21 +21,21 @@ var y = Object(x);
// CHECK#1
if (y.valueOf() !== x.valueOf()) {
$ERROR('#1: Object(obj).valueOf() === obj.valueOf(). Actual: ' + (Object(obj).valueOf()));
throw new Test262Error('#1: Object(obj).valueOf() === obj.valueOf(). Actual: ' + (Object(obj).valueOf()));
}
// CHECK#2
if (typeof y !== typeof x) {
$ERROR('#2: typeof Object(obj) === typeof obj. Actual: ' + (typeof Object(obj)));
throw new Test262Error('#2: typeof Object(obj) === typeof obj. Actual: ' + (typeof Object(obj)));
}
// CHECK#3
if (y.constructor.prototype !== x.constructor.prototype) {
$ERROR('#3: Object(obj).constructor.prototype === obj.constructor.prototype. Actual: ' + (Object(obj).constructor.prototype));
throw new Test262Error('#3: Object(obj).constructor.prototype === obj.constructor.prototype. Actual: ' + (Object(obj).constructor.prototype));
}
// CHECK#4
if (y !== x) {
$ERROR('#4: Object(obj) === obj');
throw new Test262Error('#4: Object(obj) === obj');
}

View File

@ -25,7 +25,7 @@ try {
Object.defineProperties(obj, this);
} catch (e) {
if (!(e instanceof TypeError)) {
$ERROR("Expected TypeError, got " + e);
throw new Test262Error("Expected TypeError, got " + e);
}
result = true;
} finally {

View File

@ -17,7 +17,7 @@ Object.defineProperties(arr, {
});
if (arr.length !== 0) {
$ERROR("Expected arr.length to be 0, actually " + arr.length);
throw new Test262Error("Expected arr.length to be 0, actually " + arr.length);
}
verifyEqualTo(arr, "length", 0);

View File

@ -17,7 +17,7 @@ Object.defineProperties(arr, {
});
if (arr.length !== 0) {
$ERROR("Expected arr.length to be 0, actually " + arr.length);
throw new Test262Error("Expected arr.length to be 0, actually " + arr.length);
}
arr.length = 2;

View File

@ -24,7 +24,7 @@ try {
configurable: true
}
});
$ERROR("Expected an exception.");
throw new Test262Error("Expected an exception.");
} catch (e) {
verifyEqualTo(fun, "prop", 11);
@ -35,7 +35,7 @@ try {
verifyNotConfigurable(fun, "prop");
if (!(e instanceof TypeError)) {
$ERROR("Expected TypeError, got " + e);
throw new Test262Error("Expected TypeError, got " + e);
}
}

View File

@ -23,7 +23,7 @@ try {
configurable: true
}
});
$ERROR("Expected an exception.");
throw new Test262Error("Expected an exception.");
} catch (e) {
verifyEqualTo(arr, "prop", 11);
@ -34,7 +34,7 @@ try {
verifyNotConfigurable(arr, "prop");
if (!(e instanceof TypeError)) {
$ERROR("Expected TypeError, got " + e);
throw new Test262Error("Expected TypeError, got " + e);
}
}

View File

@ -23,7 +23,7 @@ try {
configurable: true
}
});
$ERROR("Expected an exception.");
throw new Test262Error("Expected an exception.");
} catch (e) {
verifyEqualTo(str, "prop", 11);
@ -34,7 +34,7 @@ try {
verifyNotConfigurable(str, "prop");
if (!(e instanceof TypeError)) {
$ERROR("Expected TypeError, got " + e);
throw new Test262Error("Expected TypeError, got " + e);
}
}

View File

@ -24,7 +24,7 @@ try {
configurable: true
}
});
$ERROR("Expected an exception.");
throw new Test262Error("Expected an exception.");
} catch (e) {
verifyEqualTo(obj, "prop", 11);
@ -35,7 +35,7 @@ try {
verifyNotConfigurable(obj, "prop");
if (!(e instanceof TypeError)) {
$ERROR("Expected TypeError, got " + e);
throw new Test262Error("Expected TypeError, got " + e);
}
}

View File

@ -24,7 +24,7 @@ try {
configurable: true
}
});
$ERROR("Expected an exception.");
throw new Test262Error("Expected an exception.");
} catch (e) {
verifyEqualTo(obj, "prop", 11);
@ -35,7 +35,7 @@ try {
verifyNotConfigurable(obj, "prop");
if (!(e instanceof TypeError)) {
$ERROR("Expected TypeError, got " + e);
throw new Test262Error("Expected TypeError, got " + e);
}
}

View File

@ -28,7 +28,7 @@ try {
}
});
$ERROR("expected to throw TypeError")
throw new Test262Error("expected to throw TypeError")
} catch (e) {
assert(e instanceof TypeError);
assert.sameValue(arr.length, 2);

View File

@ -28,7 +28,7 @@ try {
}
});
$ERROR("Expected to throw TypeError");
throw new Test262Error("Expected to throw TypeError");
} catch (e) {
assert(e instanceof TypeError);
assert(arr.hasOwnProperty("1"));

View File

@ -24,7 +24,7 @@ try {
configurable: true
}
});
$ERROR("Expected an exception.");
throw new Test262Error("Expected an exception.");
} catch (e) {
verifyEqualTo(obj, "prop", 11);
@ -35,7 +35,7 @@ try {
verifyNotConfigurable(obj, "prop");
if (!(e instanceof TypeError)) {
$ERROR("Expected TypeError, got " + e);
throw new Test262Error("Expected TypeError, got " + e);
}
}

View File

@ -24,7 +24,7 @@ try {
configurable: true
}
});
$ERROR("Expected an exception.");
throw new Test262Error("Expected an exception.");
} catch (e) {
verifyEqualTo(obj, "prop", 11);
@ -35,7 +35,7 @@ try {
verifyNotConfigurable(obj, "prop");
if (!(e instanceof TypeError)) {
$ERROR("Expected TypeError, got " + e);
throw new Test262Error("Expected TypeError, got " + e);
}
}

View File

@ -28,7 +28,7 @@ Object.defineProperties(arr, {
});
if (!Object.prototype.hasOwnProperty.call(arr, "0")) {
$ERROR("Expected hasOwnProperty to return true.");
throw new Test262Error("Expected hasOwnProperty to return true.");
}
arr[0] = 101;
@ -36,7 +36,7 @@ arr[0] = 101;
verifyEqualTo(arr, 0, 101);
if (arr.verifySetter !== 101) {
$ERROR('Expected arr.verifySetter === 101, actually ' + arr.verifySetter);
throw new Test262Error('Expected arr.verifySetter === 101, actually ' + arr.verifySetter);
}
verifyNotConfigurable(arr, 0);

View File

@ -24,7 +24,7 @@ try {
configurable: true
}
});
$ERROR("Expected an exception.");
throw new Test262Error("Expected an exception.");
} catch (e) {
verifyEqualTo(obj, "prop", 11);
@ -35,7 +35,7 @@ try {
verifyNotConfigurable(obj, "prop");
if (!(e instanceof TypeError)) {
$ERROR("Expected TypeError, got " + e);
throw new Test262Error("Expected TypeError, got " + e);
}
}

View File

@ -22,7 +22,7 @@ try {
value: +0
}
});
$ERROR("Expected an exception.");
throw new Test262Error("Expected an exception.");
} catch (e) {
verifyEqualTo(arr, "0", -0);
@ -33,7 +33,7 @@ try {
verifyNotConfigurable(arr, "0");
if (!(e instanceof TypeError)) {
$ERROR("Expected TypeError, got " + e);
throw new Test262Error("Expected TypeError, got " + e);
}
}

View File

@ -22,7 +22,7 @@ try {
value: -0
}
});
$ERROR("Expected an exception.");
throw new Test262Error("Expected an exception.");
} catch (e) {
verifyEqualTo(arr, "0", +0);
@ -33,7 +33,7 @@ try {
verifyNotConfigurable(arr, "0");
if (!(e instanceof TypeError)) {
$ERROR("Expected TypeError, got " + e);
throw new Test262Error("Expected TypeError, got " + e);
}
}

View File

@ -36,7 +36,7 @@ try {
verifyNotConfigurable(arr, "1");
if (!(e instanceof TypeError)) {
$ERROR("Expected TypeError, got " + e);
throw new Test262Error("Expected TypeError, got " + e);
}
}

View File

@ -29,7 +29,7 @@ try {
enumerable: true
}
});
$ERROR("Expected an exception.");
throw new Test262Error("Expected an exception.");
} catch (e) {
verifyEqualTo(arr, "1", 3);
@ -40,7 +40,7 @@ try {
verifyNotConfigurable(arr, "1");
if (!(e instanceof TypeError)) {
$ERROR("Expected TypeError, got " + e);
throw new Test262Error("Expected TypeError, got " + e);
}
}

View File

@ -30,7 +30,7 @@ try {
value: 13
}
});
$ERROR("Expected an exception.");
throw new Test262Error("Expected an exception.");
} catch (e) {
verifyWritable(arr, "1", "setVerifyHelpProp");
@ -40,7 +40,7 @@ try {
verifyNotConfigurable(arr, "1");
if (!(e instanceof TypeError)) {
$ERROR("Expected TypeError, got " + e);
throw new Test262Error("Expected TypeError, got " + e);
}
}

View File

@ -25,7 +25,7 @@ try {
set: function() {}
}
});
$ERROR("Expected an exception.");
throw new Test262Error("Expected an exception.");
} catch (e) {
verifyEqualTo(arr, "1", 3);
@ -36,7 +36,7 @@ try {
verifyNotConfigurable(arr, "1");
if (!(e instanceof TypeError)) {
$ERROR("Expected TypeError, got " + e);
throw new Test262Error("Expected TypeError, got " + e);
}
}

View File

@ -28,7 +28,7 @@ try {
writable: true
}
});
$ERROR("Expected an exception.");
throw new Test262Error("Expected an exception.");
} catch (e) {
verifyEqualTo(arr, "1", undefined);
@ -39,7 +39,7 @@ try {
verifyNotConfigurable(arr, "1");
if (!(e instanceof TypeError)) {
$ERROR("Expected TypeError, got " + e);
throw new Test262Error("Expected TypeError, got " + e);
}
}

View File

@ -30,7 +30,7 @@ try {
value: "abc"
}
});
$ERROR("Expected an exception.");
throw new Test262Error("Expected an exception.");
} catch (e) {
verifyEqualTo(arr, "1", 3);
@ -41,7 +41,7 @@ try {
verifyNotConfigurable(arr, "1");
if (!(e instanceof TypeError)) {
$ERROR("Expected TypeError, got " + e);
throw new Test262Error("Expected TypeError, got " + e);
}
}

View File

@ -24,7 +24,7 @@ try {
value: -0
}
});
$ERROR("Expected an exception.");
throw new Test262Error("Expected an exception.");
} catch (e) {
verifyEqualTo(arr, "1", +0);
@ -35,7 +35,7 @@ try {
verifyNotConfigurable(arr, "1");
if (!(e instanceof TypeError)) {
$ERROR("Expected TypeError, got " + e);
throw new Test262Error("Expected TypeError, got " + e);
}
}

View File

@ -25,7 +25,7 @@ try {
}
});
$ERROR("Expected an exception.");
throw new Test262Error("Expected an exception.");
} catch (e) {
verifyEqualTo(arr, "1", -0);
@ -36,7 +36,7 @@ try {
verifyNotConfigurable(arr, "1");
if (!(e instanceof TypeError)) {
$ERROR("Expected TypeError, got " + e);
throw new Test262Error("Expected TypeError, got " + e);
}
}

View File

@ -26,7 +26,7 @@ try {
value: 36
}
});
$ERROR("Expected an exception.");
throw new Test262Error("Expected an exception.");
} catch (e) {
verifyEqualTo(arr, "1", 12);
@ -37,7 +37,7 @@ try {
verifyNotConfigurable(arr, "1");
if (!(e instanceof TypeError)) {
$ERROR("Expected TypeError, got " + e);
throw new Test262Error("Expected TypeError, got " + e);
}
}

View File

@ -25,7 +25,7 @@ try {
value: "efgh"
}
});
$ERROR("Expected an exception.");
throw new Test262Error("Expected an exception.");
} catch (e) {
verifyEqualTo(arr, "1", "abcd");
@ -36,7 +36,7 @@ try {
verifyNotConfigurable(arr, "1");
if (!(e instanceof TypeError)) {
$ERROR("Expected TypeError, got " + e);
throw new Test262Error("Expected TypeError, got " + e);
}
}

View File

@ -26,7 +26,7 @@ try {
}
});
$ERROR("Expected an exception.");
throw new Test262Error("Expected an exception.");
} catch (e) {
verifyEqualTo(arr, "1", true);
@ -37,7 +37,7 @@ try {
verifyNotConfigurable(arr, "1");
if (!(e instanceof TypeError)) {
$ERROR("Expected TypeError, got " + e);
throw new Test262Error("Expected TypeError, got " + e);
}
}

View File

@ -32,7 +32,7 @@ try {
}
});
$ERROR("Expected an exception.");
throw new Test262Error("Expected an exception.");
} catch (e) {
verifyEqualTo(arr, "1", obj1);
@ -43,7 +43,7 @@ try {
verifyNotConfigurable(arr, "1");
if (!(e instanceof TypeError)) {
$ERROR("Expected TypeError, got " + e);
throw new Test262Error("Expected TypeError, got " + e);
}
}

View File

@ -30,7 +30,7 @@ try {
}
});
$ERROR("Expected an exception.");
throw new Test262Error("Expected an exception.");
} catch (e) {
verifyWritable(arr, "1", "setVerifyHelpProp");
@ -39,7 +39,7 @@ try {
verifyNotConfigurable(arr, "1");
if (!(e instanceof TypeError)) {
$ERROR("Expected TypeError, got " + e);
throw new Test262Error("Expected TypeError, got " + e);
}
}

View File

@ -29,7 +29,7 @@ try {
}
});
$ERROR("Expected an exception.");
throw new Test262Error("Expected an exception.");
} catch (e) {
verifyWritable(arr, "1", "setVerifyHelpProp");
@ -38,7 +38,7 @@ try {
verifyNotConfigurable(arr, "1");
if (!(e instanceof TypeError)) {
$ERROR("Expected TypeError, got " + e);
throw new Test262Error("Expected TypeError, got " + e);
}
}

View File

@ -32,7 +32,7 @@ try {
}
});
$ERROR("Expected an exception.");
throw new Test262Error("Expected an exception.");
} catch (e) {
verifyEqualTo(arr, "1", get_fun());
@ -41,7 +41,7 @@ try {
verifyNotConfigurable(arr, "1");
if (!(e instanceof TypeError)) {
$ERROR("Expected TypeError, got " + e);
throw new Test262Error("Expected TypeError, got " + e);
}
}

View File

@ -28,7 +28,7 @@ try {
get: undefined
}
});
$ERROR("Expected an exception.");
throw new Test262Error("Expected an exception.");
} catch (e) {
verifyEqualTo(arr, "1", get_fun());
@ -37,7 +37,7 @@ try {
verifyNotConfigurable(arr, "1");
if (!(e instanceof TypeError)) {
$ERROR("Expected TypeError, got " + e);
throw new Test262Error("Expected TypeError, got " + e);
}
}

View File

@ -31,5 +31,5 @@ verifyEnumerable(arr, "property");
verifyConfigurable(arr, "property");
if (arr.length !== 0) {
$ERROR('Expected arr.length === 0, actually ' + arr.length);
throw new Test262Error('Expected arr.length === 0, actually ' + arr.length);
}

View File

@ -38,5 +38,5 @@ verifyEnumerable(arr, "property");
verifyConfigurable(arr, "property");
if (arr.length !== 0) {
$ERROR('Expected arr.length === 0, actually ' + arr.length);
throw new Test262Error('Expected arr.length === 0, actually ' + arr.length);
}

View File

@ -30,5 +30,5 @@ verifyNotEnumerable(arr, "property");
verifyNotConfigurable(arr, "property");
if (arr.length !== 0) {
$ERROR('Expected arr.length === 0, actually ' + arr.length);
throw new Test262Error('Expected arr.length === 0, actually ' + arr.length);
}

View File

@ -24,7 +24,7 @@ try {
value: 36
}
});
$ERROR("Expected an exception.");
throw new Test262Error("Expected an exception.");
} catch (e) {
verifyEqualTo(arr, "property", 12);
@ -35,7 +35,7 @@ try {
verifyNotConfigurable(arr, "property");
if (!(e instanceof TypeError)) {
$ERROR("Expected TypeError, got " + e);
throw new Test262Error("Expected TypeError, got " + e);
}
}

View File

@ -24,7 +24,7 @@ try {
writable: true
}
});
$ERROR("Expected an exception.");
throw new Test262Error("Expected an exception.");
} catch (e) {
verifyEqualTo(arr, "property", undefined);
@ -35,7 +35,7 @@ try {
verifyNotConfigurable(arr, "property");
if (!(e instanceof TypeError)) {
$ERROR("Expected TypeError, got " + e);
throw new Test262Error("Expected TypeError, got " + e);
}
}

View File

@ -25,7 +25,7 @@ try {
enumerable: true
}
});
$ERROR("Expected an exception.");
throw new Test262Error("Expected an exception.");
} catch (e) {
verifyEqualTo(arr, "property", 12);
@ -36,7 +36,7 @@ try {
verifyNotConfigurable(arr, "property");
if (!(e instanceof TypeError)) {
$ERROR("Expected TypeError, got " + e);
throw new Test262Error("Expected TypeError, got " + e);
}
}

View File

@ -24,7 +24,7 @@ try {
configurable: true
}
});
$ERROR("Expected an exception.");
throw new Test262Error("Expected an exception.");
} catch (e) {
verifyEqualTo(arr, "property", 12);
@ -35,7 +35,7 @@ try {
verifyNotConfigurable(arr, "property");
if (!(e instanceof TypeError)) {
$ERROR("Expected TypeError, got " + e);
throw new Test262Error("Expected TypeError, got " + e);
}
}

View File

@ -33,7 +33,7 @@ try {
}
}
});
$ERROR("Expected an exception.");
throw new Test262Error("Expected an exception.");
} catch (e) {
verifyEqualTo(arr, "property", get_fun());
@ -44,7 +44,7 @@ try {
verifyNotConfigurable(arr, "property");
if (!(e instanceof TypeError)) {
$ERROR("Expected TypeError, got " + e);
throw new Test262Error("Expected TypeError, got " + e);
}
}

View File

@ -35,7 +35,7 @@ try {
verifyNotConfigurable(arr, "property");
if (!(e instanceof TypeError)) {
$ERROR("Expected TypeError, got " + e);
throw new Test262Error("Expected TypeError, got " + e);
}
}

View File

@ -28,7 +28,7 @@ try {
enumerable: true
}
});
$ERROR("Expected an exception.");
throw new Test262Error("Expected an exception.");
} catch (e) {
verifyWritable(arr, "property", "setVerifyHelpProp");
@ -37,7 +37,7 @@ try {
verifyNotConfigurable(arr, "property");
if (!(e instanceof TypeError)) {
$ERROR("Expected TypeError, got " + e);
throw new Test262Error("Expected TypeError, got " + e);
}
}

View File

@ -28,7 +28,7 @@ try {
configurable: true
}
});
$ERROR("Expected an exception.");
throw new Test262Error("Expected an exception.");
} catch (e) {
verifyWritable(arr, "property", "setVerifyHelpProp");
@ -37,7 +37,7 @@ try {
verifyNotConfigurable(arr, "property");
if (!(e instanceof TypeError)) {
$ERROR("Expected TypeError, got " + e);
throw new Test262Error("Expected TypeError, got " + e);
}
}

View File

@ -21,9 +21,9 @@ Object.defineProperties(obj, {
verifyNotWritable(obj, "prop");
if (!obj.hasOwnProperty("prop")) {
$ERROR('Expected obj.hasOwnProperty("prop") to be true, actually ' + obj.hasOwnProperty("prop"));
throw new Test262Error('Expected obj.hasOwnProperty("prop") to be true, actually ' + obj.hasOwnProperty("prop"));
}
if (obj.prop !== 1001) {
$ERROR('Expected obj.prop === 1001, actually ' + obj.prop);
throw new Test262Error('Expected obj.prop === 1001, actually ' + obj.prop);
}

View File

@ -32,7 +32,7 @@ try {
}
});
$ERROR("Expected an exception.");
throw new Test262Error("Expected an exception.");
} catch (e) {
verifyEqualTo(arg, "0", 0);
@ -43,7 +43,7 @@ try {
verifyNotConfigurable(arg, "0");
if (!(e instanceof TypeError)) {
$ERROR("Expected TypeError, got " + e);
throw new Test262Error("Expected TypeError, got " + e);
}
}

View File

@ -33,7 +33,7 @@ try {
}
});
$ERROR("Expected an exception.");
throw new Test262Error("Expected an exception.");
} catch (e) {
verifyEqualTo(arg, "0", 0);
@ -44,7 +44,7 @@ try {
verifyNotConfigurable(arg, "0");
if (!(e instanceof TypeError)) {
$ERROR("Expected TypeError, got " + e);
throw new Test262Error("Expected TypeError, got " + e);
}
}

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