Merge pull request #396 from anba/remove-runTestCase-Object

Replace runTestCase in built-ins/Object
This commit is contained in:
Brian Terlson 2015-08-11 10:42:00 -07:00
commit b155e612ac
1511 changed files with 3497 additions and 9575 deletions

View File

@ -4,12 +4,6 @@
/*--- /*---
es5id: 15.2.3.5-0-1 es5id: 15.2.3.5-0-1
description: Object.create must exist as a function description: Object.create must exist as a function
includes: [runTestCase.js]
---*/ ---*/
function testcase() { assert.sameValue(typeof(Object.create), "function", 'typeof(Object.create)');
if (typeof(Object.create) === "function") {
return true;
}
}
runTestCase(testcase);

View File

@ -4,12 +4,6 @@
/*--- /*---
es5id: 15.2.3.5-0-2 es5id: 15.2.3.5-0-2
description: Object.create must exist as a function taking 2 parameters description: Object.create must exist as a function taking 2 parameters
includes: [runTestCase.js]
---*/ ---*/
function testcase() { assert.sameValue(Object.create.length, 2, 'Object.create.length');
if (Object.create.length === 2) {
return true;
}
}
runTestCase(testcase);

View File

@ -7,17 +7,11 @@ info: >
This can be checked using isPrototypeOf, or getPrototypeOf. This can be checked using isPrototypeOf, or getPrototypeOf.
es5id: 15.2.3.5-2-1 es5id: 15.2.3.5-2-1
description: Object.create creates new Object description: Object.create creates new Object
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
function base() {} function base() {}
var b = new base(); var b = new base();
var prop = new Object(); var prop = new Object();
var d = Object.create(b); var d = Object.create(b);
if (typeof d === 'object') { assert.sameValue(typeof d, 'object', 'typeof d');
return true;
}
}
runTestCase(testcase);

View File

@ -4,12 +4,8 @@
/*--- /*---
es5id: 15.2.3.5-2-2 es5id: 15.2.3.5-2-2
description: Object.create - returned object is an instance of Object description: Object.create - returned object is an instance of Object
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var newObj = Object.create({}); var newObj = Object.create({});
return newObj instanceof Object;
} assert(newObj instanceof Object, 'newObj instanceof Object !== true');
runTestCase(testcase);

View File

@ -7,17 +7,11 @@ info: >
This can be checked using isPrototypeOf, or getPrototypeOf. This can be checked using isPrototypeOf, or getPrototypeOf.
es5id: 15.2.3.5-3-1 es5id: 15.2.3.5-3-1
description: Object.create sets the prototype of the passed-in object description: Object.create sets the prototype of the passed-in object
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
function base() {} function base() {}
var b = new base(); var b = new base();
var d = Object.create(b); var d = Object.create(b);
if (Object.getPrototypeOf(d) === b && assert.sameValue(Object.getPrototypeOf(d), b, 'Object.getPrototypeOf(d)');
b.isPrototypeOf(d) === true) { assert.sameValue(b.isPrototypeOf(d), true, 'b.isPrototypeOf(d)');
return true;
}
}
runTestCase(testcase);

View File

@ -9,23 +9,17 @@ es5id: 15.2.3.5-4-1
description: > description: >
Object.create sets the prototype of the passed-in object and adds Object.create sets the prototype of the passed-in object and adds
new properties new properties
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
function base() {} function base() {}
var b = new base(); var b = new base();
var prop = new Object(); var prop = new Object();
var d = Object.create(b,{ "x": {value: true,writable: false}, var d = Object.create(b,{ "x": {value: true,writable: false},
"y": {value: "str",writable: false} }); "y": {value: "str",writable: false} });
if (Object.getPrototypeOf(d) === b && assert.sameValue(Object.getPrototypeOf(d), b, 'Object.getPrototypeOf(d)');
b.isPrototypeOf(d) === true && assert.sameValue(b.isPrototypeOf(d), true, 'b.isPrototypeOf(d)');
d.x === true && assert.sameValue(d.x, true, 'd.x');
d.y === "str" && assert.sameValue(d.y, "str", 'd.y');
b.x === undefined && assert.sameValue(b.x, undefined, 'b.x');
b.y === undefined) { assert.sameValue(b.y, undefined, 'b.y');
return true;
}
}
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.5-4-102
description: > description: >
Object.create - 'configurable' property of one property in Object.create - 'configurable' property of one property in
'Properties' is an inherited data property (8.10.5 step 4.a) 'Properties' is an inherited data property (8.10.5 step 4.a)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var proto = { var proto = {
configurable: true configurable: true
}; };
@ -27,7 +24,5 @@ function testcase() {
delete newObj.prop; delete newObj.prop;
var result2 = newObj.hasOwnProperty("prop"); var result2 = newObj.hasOwnProperty("prop");
return result1 === true && result2 === false; assert.sameValue(result1, true, 'result1');
assert.sameValue(result2, false, 'result2');
}
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.5-4-105
description: > description: >
Object.create - 'configurable' property of one property in Object.create - 'configurable' property of one property in
'Properties' is own accessor property (8.10.5 step 4.a) 'Properties' is own accessor property (8.10.5 step 4.a)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var descObj = {}; var descObj = {};
Object.defineProperty(descObj, "configurable", { Object.defineProperty(descObj, "configurable", {
get: function () { get: function () {
@ -25,6 +22,5 @@ function testcase() {
delete newObj.prop; delete newObj.prop;
var result2 = newObj.hasOwnProperty("prop"); var result2 = newObj.hasOwnProperty("prop");
return result1 === true && result2 === false; assert.sameValue(result1, true, 'result1');
} assert.sameValue(result2, false, 'result2');
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.5-4-106
description: > description: >
Object.create - 'configurable' property of one property in Object.create - 'configurable' property of one property in
'Properties' is an inherited accessor property (8.10.5 step 4.a) 'Properties' is an inherited accessor property (8.10.5 step 4.a)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var proto = {}; var proto = {};
Object.defineProperty(proto, "configurable", { Object.defineProperty(proto, "configurable", {
@ -30,6 +27,5 @@ function testcase() {
delete newObj.prop; delete newObj.prop;
var result2 = newObj.hasOwnProperty("prop"); var result2 = newObj.hasOwnProperty("prop");
return result1 === true && result2 === false; assert.sameValue(result1, true, 'result1');
} assert.sameValue(result2, false, 'result2');
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.5-4-11
description: > description: >
Object.create - argument 'Properties' is a Date object (15.2.3.7 Object.create - argument 'Properties' is a Date object (15.2.3.7
step 2) step 2)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var props = new Date(); var props = new Date();
var result = false; var result = false;
@ -22,6 +19,6 @@ function testcase() {
enumerable: true enumerable: true
}); });
var newObj = Object.create({}, props); var newObj = Object.create({}, props);
return result && newObj.hasOwnProperty("prop");
} assert(result, 'result !== true');
runTestCase(testcase); assert(newObj.hasOwnProperty("prop"), 'newObj.hasOwnProperty("prop") !== true');

View File

@ -7,11 +7,8 @@ description: >
Object.create - one property in 'Properties' is a Function object Object.create - one property in 'Properties' is a Function object
which implements its own [[Get]] method to access the which implements its own [[Get]] method to access the
'configurable' property (8.10.5 step 4.a) 'configurable' property (8.10.5 step 4.a)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var descObj = function () { }; var descObj = function () { };
descObj.configurable = true; descObj.configurable = true;
@ -24,6 +21,5 @@ function testcase() {
delete newObj.prop; delete newObj.prop;
var result2 = newObj.hasOwnProperty("prop"); var result2 = newObj.hasOwnProperty("prop");
return result1 === true && result2 === false; assert.sameValue(result1, true, 'result1');
} assert.sameValue(result2, false, 'result2');
runTestCase(testcase);

View File

@ -7,11 +7,8 @@ description: >
Object.create - one property in 'Properties' is an Array object Object.create - one property in 'Properties' is an Array object
that uses Object's [[Get]] method to access the 'configurable' that uses Object's [[Get]] method to access the 'configurable'
property (8.10.5 step 4.a) property (8.10.5 step 4.a)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var descObj = []; var descObj = [];
descObj.configurable = true; descObj.configurable = true;
@ -24,6 +21,5 @@ function testcase() {
delete newObj.prop; delete newObj.prop;
var result2 = newObj.hasOwnProperty("prop"); var result2 = newObj.hasOwnProperty("prop");
return result1 === true && result2 === false; assert.sameValue(result1, true, 'result1');
} assert.sameValue(result2, false, 'result2');
runTestCase(testcase);

View File

@ -7,11 +7,8 @@ description: >
Object.create - one property in 'Properties' is a String object Object.create - one property in 'Properties' is a String object
that uses Object's [[Get]] method to access the 'configurable' that uses Object's [[Get]] method to access the 'configurable'
property (8.10.5 step 4.a) property (8.10.5 step 4.a)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var descObj = new String(); var descObj = new String();
descObj.configurable = true; descObj.configurable = true;
@ -23,6 +20,5 @@ function testcase() {
delete newObj.prop; delete newObj.prop;
var result2 = newObj.hasOwnProperty("prop"); var result2 = newObj.hasOwnProperty("prop");
return result1 === true && result2 === false; assert.sameValue(result1, true, 'result1');
} assert.sameValue(result2, false, 'result2');
runTestCase(testcase);

View File

@ -7,11 +7,8 @@ description: >
Object.create - one property in 'Properties' is a Boolean object Object.create - one property in 'Properties' is a Boolean object
that uses Object's [[Get]] method to access the 'configurable' that uses Object's [[Get]] method to access the 'configurable'
property (8.10.5 step 4.a) property (8.10.5 step 4.a)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var descObj = new Boolean(false); var descObj = new Boolean(false);
descObj.configurable = true; descObj.configurable = true;
@ -24,6 +21,5 @@ function testcase() {
delete newObj.prop; delete newObj.prop;
var result2 = newObj.hasOwnProperty("prop"); var result2 = newObj.hasOwnProperty("prop");
return result1 === true && result2 === false; assert.sameValue(result1, true, 'result1');
} assert.sameValue(result2, false, 'result2');
runTestCase(testcase);

View File

@ -7,11 +7,8 @@ description: >
Object.create - one property in 'Properties' is a Number object Object.create - one property in 'Properties' is a Number object
that uses Object's [[Get]] method to access the 'configurable' that uses Object's [[Get]] method to access the 'configurable'
property (8.10.5 step 4.a) property (8.10.5 step 4.a)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var descObj = new Number(-9); var descObj = new Number(-9);
descObj.configurable = true; descObj.configurable = true;
@ -24,6 +21,5 @@ function testcase() {
delete newObj.prop; delete newObj.prop;
var result2 = newObj.hasOwnProperty("prop"); var result2 = newObj.hasOwnProperty("prop");
return result1 === true && result2 === false; assert.sameValue(result1, true, 'result1');
} assert.sameValue(result2, false, 'result2');
runTestCase(testcase);

View File

@ -7,11 +7,8 @@ description: >
Object.create - one property in 'Properties' is a Date object that Object.create - one property in 'Properties' is a Date object that
uses Object's [[Get]] method to access the 'configurable' property uses Object's [[Get]] method to access the 'configurable' property
(8.10.5 step 4.a) (8.10.5 step 4.a)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var descObj = new Date(); var descObj = new Date();
descObj.configurable = true; descObj.configurable = true;
@ -24,6 +21,5 @@ function testcase() {
delete newObj.prop; delete newObj.prop;
var result2 = newObj.hasOwnProperty("prop"); var result2 = newObj.hasOwnProperty("prop");
return result1 === true && result2 === false; assert.sameValue(result1, true, 'result1');
} assert.sameValue(result2, false, 'result2');
runTestCase(testcase);

View File

@ -7,11 +7,8 @@ description: >
Object.create - one property in 'Properties' is a Date object that Object.create - one property in 'Properties' is a Date object that
uses Object's [[Get]] method to access the 'configurable' property uses Object's [[Get]] method to access the 'configurable' property
(8.10.5 step 4.a) (8.10.5 step 4.a)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var descObj = new RegExp(); var descObj = new RegExp();
descObj.configurable = true; descObj.configurable = true;
@ -24,6 +21,5 @@ function testcase() {
delete newObj.prop; delete newObj.prop;
var result2 = newObj.hasOwnProperty("prop"); var result2 = newObj.hasOwnProperty("prop");
return result1 === true && result2 === false; assert.sameValue(result1, true, 'result1');
} assert.sameValue(result2, false, 'result2');
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.5-4-12
description: > description: >
Object.create - argument 'Properties' is a RegExp object (15.2.3.7 Object.create - argument 'Properties' is a RegExp object (15.2.3.7
step 2) step 2)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var props = new RegExp(); var props = new RegExp();
var result = false; var result = false;
@ -22,6 +19,6 @@ function testcase() {
enumerable: true enumerable: true
}); });
var newObj = Object.create({}, props); var newObj = Object.create({}, props);
return result && newObj.hasOwnProperty("prop");
} assert(result, 'result !== true');
runTestCase(testcase); assert(newObj.hasOwnProperty("prop"), 'newObj.hasOwnProperty("prop") !== true');

View File

@ -7,11 +7,8 @@ description: >
Object.create - one property in 'Properties' is an Error object Object.create - one property in 'Properties' is an Error object
that uses Object's [[Get]] method to access the 'configurable' that uses Object's [[Get]] method to access the 'configurable'
property (8.10.5 step 4.a) property (8.10.5 step 4.a)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var descObj = new Error(); var descObj = new Error();
descObj.configurable = true; descObj.configurable = true;
@ -24,6 +21,5 @@ function testcase() {
delete newObj.prop; delete newObj.prop;
var result2 = newObj.hasOwnProperty("prop"); var result2 = newObj.hasOwnProperty("prop");
return result1 === true && result2 === false; assert.sameValue(result1, true, 'result1');
} assert.sameValue(result2, false, 'result2');
runTestCase(testcase);

View File

@ -7,11 +7,8 @@ description: >
Object.create - one property in 'Properties' is an Arguments Object.create - one property in 'Properties' is an Arguments
object which implements its own [[Get]] method to access the object which implements its own [[Get]] method to access the
'configurable' property (8.10.5 step 4.a) 'configurable' property (8.10.5 step 4.a)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var argObj = (function () { return arguments; })(); var argObj = (function () { return arguments; })();
argObj.configurable = true; argObj.configurable = true;
@ -23,6 +20,5 @@ function testcase() {
delete newObj.prop; delete newObj.prop;
var result2 = newObj.hasOwnProperty("prop"); var result2 = newObj.hasOwnProperty("prop");
return result1 === true && result2 === false; assert.sameValue(result1, true, 'result1');
} assert.sameValue(result2, false, 'result2');
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.5-4-127
description: > description: >
Object.create - 'configurable' property of one property in Object.create - 'configurable' property of one property in
'Properties' is true (8.10.5 step 4.b) 'Properties' is true (8.10.5 step 4.b)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var newObj = Object.create({}, { var newObj = Object.create({}, {
prop: { prop: {
configurable: true configurable: true
@ -23,6 +20,5 @@ function testcase() {
var afterDeleted = newObj.hasOwnProperty("prop"); var afterDeleted = newObj.hasOwnProperty("prop");
return beforeDeleted === true && afterDeleted === false; assert.sameValue(beforeDeleted, true, 'beforeDeleted');
} assert.sameValue(afterDeleted, false, 'afterDeleted');
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.5-4-133
description: > description: >
Object.create - 'configurable' property of one property in Object.create - 'configurable' property of one property in
'Properties' is a positive number (8.10.5 step 4.b) 'Properties' is a positive number (8.10.5 step 4.b)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var newObj = Object.create({}, { var newObj = Object.create({}, {
prop: { prop: {
configurable: 123 configurable: 123
@ -23,6 +20,5 @@ function testcase() {
var afterDeleted = newObj.hasOwnProperty("prop"); var afterDeleted = newObj.hasOwnProperty("prop");
return beforeDeleted === true && afterDeleted === false; assert.sameValue(beforeDeleted, true, 'beforeDeleted');
} assert.sameValue(afterDeleted, false, 'afterDeleted');
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.5-4-134
description: > description: >
Object.create - 'configurable' property of one property in Object.create - 'configurable' property of one property in
'Properties' is a negative number (8.10.5 step 4.b) 'Properties' is a negative number (8.10.5 step 4.b)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var newObj = Object.create({}, { var newObj = Object.create({}, {
prop: { prop: {
configurable: -123 configurable: -123
@ -23,6 +20,5 @@ function testcase() {
var afterDeleted = newObj.hasOwnProperty("prop"); var afterDeleted = newObj.hasOwnProperty("prop");
return beforeDeleted === true && afterDeleted === false; assert.sameValue(beforeDeleted, true, 'beforeDeleted');
} assert.sameValue(afterDeleted, false, 'afterDeleted');
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.5-4-136
description: > description: >
Object.create - 'configurable' property of one property in Object.create - 'configurable' property of one property in
'Properties' is a non-empty string (8.10.5 step 4.b) 'Properties' is a non-empty string (8.10.5 step 4.b)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var newObj = Object.create({}, { var newObj = Object.create({}, {
prop: { prop: {
configurable: "abc" configurable: "abc"
@ -23,6 +20,5 @@ function testcase() {
var afterDeleted = newObj.hasOwnProperty("prop"); var afterDeleted = newObj.hasOwnProperty("prop");
return beforeDeleted === true && afterDeleted === false; assert.sameValue(beforeDeleted, true, 'beforeDeleted');
} assert.sameValue(afterDeleted, false, 'afterDeleted');
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.5-4-137
description: > description: >
Object.create - 'configurable' property of one property in Object.create - 'configurable' property of one property in
'Properties' is a Function object (8.10.5 step 4.b) 'Properties' is a Function object (8.10.5 step 4.b)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var newObj = Object.create({}, { var newObj = Object.create({}, {
prop: { prop: {
configurable: function () { } configurable: function () { }
@ -23,6 +20,5 @@ function testcase() {
var afterDeleted = newObj.hasOwnProperty("prop"); var afterDeleted = newObj.hasOwnProperty("prop");
return beforeDeleted === true && afterDeleted === false; assert.sameValue(beforeDeleted, true, 'beforeDeleted');
} assert.sameValue(afterDeleted, false, 'afterDeleted');
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.5-4-138
description: > description: >
Object.create - 'configurable' property of one property in Object.create - 'configurable' property of one property in
'Properties' is an Array object (8.10.5 step 4.b) 'Properties' is an Array object (8.10.5 step 4.b)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var newObj = Object.create({}, { var newObj = Object.create({}, {
prop: { prop: {
configurable: [] configurable: []
@ -23,6 +20,5 @@ function testcase() {
var afterDeleted = newObj.hasOwnProperty("prop"); var afterDeleted = newObj.hasOwnProperty("prop");
return beforeDeleted === true && afterDeleted === false; assert.sameValue(beforeDeleted, true, 'beforeDeleted');
} assert.sameValue(afterDeleted, false, 'afterDeleted');
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.5-4-139
description: > description: >
Object.create - 'configurable' property of one property in Object.create - 'configurable' property of one property in
'Properties' is a String object (8.10.5 step 4.b) 'Properties' is a String object (8.10.5 step 4.b)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var newObj = Object.create({}, { var newObj = Object.create({}, {
prop: { prop: {
configurable: new String("abc") configurable: new String("abc")
@ -23,6 +20,5 @@ function testcase() {
var afterDeleted = newObj.hasOwnProperty("prop"); var afterDeleted = newObj.hasOwnProperty("prop");
return beforeDeleted === true && afterDeleted === false; assert.sameValue(beforeDeleted, true, 'beforeDeleted');
} assert.sameValue(afterDeleted, false, 'afterDeleted');
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.5-4-14
description: > description: >
Object.create - argument 'Properties' is an Error object (15.2.3.7 Object.create - argument 'Properties' is an Error object (15.2.3.7
step 2) step 2)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var props = new Error("test"); var props = new Error("test");
var result = false; var result = false;
@ -26,6 +23,6 @@ function testcase() {
enumerable: true enumerable: true
}); });
var newObj = Object.create({}, props); var newObj = Object.create({}, props);
return result && newObj.hasOwnProperty("prop15_2_3_5_4_14");
} assert(result, 'result !== true');
runTestCase(testcase); assert(newObj.hasOwnProperty("prop15_2_3_5_4_14"), 'newObj.hasOwnProperty("prop15_2_3_5_4_14") !== true');

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.5-4-140
description: > description: >
Object.create - 'configurable' property of one property in Object.create - 'configurable' property of one property in
'Properties' is a Boolean object (8.10.5 step 4.b) 'Properties' is a Boolean object (8.10.5 step 4.b)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var newObj = Object.create({}, { var newObj = Object.create({}, {
prop: { prop: {
configurable: new Boolean(true) configurable: new Boolean(true)
@ -23,6 +20,5 @@ function testcase() {
var afterDeleted = newObj.hasOwnProperty("prop"); var afterDeleted = newObj.hasOwnProperty("prop");
return beforeDeleted === true && afterDeleted === false; assert.sameValue(beforeDeleted, true, 'beforeDeleted');
} assert.sameValue(afterDeleted, false, 'afterDeleted');
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.5-4-141
description: > description: >
Object.create - 'configurable' property of one property in Object.create - 'configurable' property of one property in
'Properties' is a Number object (8.10.5 step 4.b) 'Properties' is a Number object (8.10.5 step 4.b)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var newObj = Object.create({}, { var newObj = Object.create({}, {
prop: { prop: {
configurable: new Number(123) configurable: new Number(123)
@ -23,6 +20,5 @@ function testcase() {
var afterDeleted = newObj.hasOwnProperty("prop"); var afterDeleted = newObj.hasOwnProperty("prop");
return beforeDeleted === true && afterDeleted === false; assert.sameValue(beforeDeleted, true, 'beforeDeleted');
} assert.sameValue(afterDeleted, false, 'afterDeleted');
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.5-4-142
description: > description: >
Object.create - 'configurable' property of one property in Object.create - 'configurable' property of one property in
'Properties' is the Math object (8.10.5 step 4.b) 'Properties' is the Math object (8.10.5 step 4.b)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var newObj = Object.create({}, { var newObj = Object.create({}, {
prop: { prop: {
configurable: Math configurable: Math
@ -23,6 +20,5 @@ function testcase() {
var afterDeleted = newObj.hasOwnProperty("prop"); var afterDeleted = newObj.hasOwnProperty("prop");
return beforeDeleted === true && afterDeleted === false; assert.sameValue(beforeDeleted, true, 'beforeDeleted');
} assert.sameValue(afterDeleted, false, 'afterDeleted');
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.5-4-143
description: > description: >
Object.create - 'configurable' property of one property in Object.create - 'configurable' property of one property in
'Properties' is a Date object (8.10.5 step 4.b) 'Properties' is a Date object (8.10.5 step 4.b)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var newObj = Object.create({}, { var newObj = Object.create({}, {
prop: { prop: {
configurable: new Date() configurable: new Date()
@ -23,6 +20,5 @@ function testcase() {
var afterDeleted = newObj.hasOwnProperty("prop"); var afterDeleted = newObj.hasOwnProperty("prop");
return beforeDeleted === true && afterDeleted === false; assert.sameValue(beforeDeleted, true, 'beforeDeleted');
} assert.sameValue(afterDeleted, false, 'afterDeleted');
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.5-4-144
description: > description: >
Object.create - 'configurable' property of one property in Object.create - 'configurable' property of one property in
'Properties' is a RegExp object (8.10.5 step 4.b) 'Properties' is a RegExp object (8.10.5 step 4.b)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var newObj = Object.create({}, { var newObj = Object.create({}, {
prop: { prop: {
configurable: new RegExp() configurable: new RegExp()
@ -23,6 +20,5 @@ function testcase() {
var afterDeleted = newObj.hasOwnProperty("prop"); var afterDeleted = newObj.hasOwnProperty("prop");
return beforeDeleted === true && afterDeleted === false; assert.sameValue(beforeDeleted, true, 'beforeDeleted');
} assert.sameValue(afterDeleted, false, 'afterDeleted');
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.5-4-145
description: > description: >
Object.create - 'configurable' property of one property in Object.create - 'configurable' property of one property in
'Properties' is the JSON object (8.10.5 step 4.b) 'Properties' is the JSON object (8.10.5 step 4.b)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var newObj = Object.create({}, { var newObj = Object.create({}, {
prop: { prop: {
configurable: JSON configurable: JSON
@ -23,6 +20,5 @@ function testcase() {
var afterDeleted = newObj.hasOwnProperty("prop"); var afterDeleted = newObj.hasOwnProperty("prop");
return beforeDeleted === true && afterDeleted === false; assert.sameValue(beforeDeleted, true, 'beforeDeleted');
} assert.sameValue(afterDeleted, false, 'afterDeleted');
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.5-4-146
description: > description: >
Object.create - 'configurable' property of one property in Object.create - 'configurable' property of one property in
'Properties' is an Error object (8.10.5 step 4.b) 'Properties' is an Error object (8.10.5 step 4.b)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var newObj = Object.create({}, { var newObj = Object.create({}, {
prop: { prop: {
configurable: new Error() configurable: new Error()
@ -23,6 +20,5 @@ function testcase() {
var afterDeleted = newObj.hasOwnProperty("prop"); var afterDeleted = newObj.hasOwnProperty("prop");
return beforeDeleted === true && afterDeleted === false; assert.sameValue(beforeDeleted, true, 'beforeDeleted');
} assert.sameValue(afterDeleted, false, 'afterDeleted');
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.5-4-147
description: > description: >
Object.create - 'configurable' property of one property in Object.create - 'configurable' property of one property in
'Properties' is an Arguments object (8.10.5 step 4.b) 'Properties' is an Arguments object (8.10.5 step 4.b)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var argObj = (function () { return arguments; })(); var argObj = (function () { return arguments; })();
var newObj = Object.create({}, { var newObj = Object.create({}, {
@ -25,6 +22,5 @@ function testcase() {
var afterDeleted = newObj.hasOwnProperty("prop"); var afterDeleted = newObj.hasOwnProperty("prop");
return beforeDeleted === true && afterDeleted === false; assert.sameValue(beforeDeleted, true, 'beforeDeleted');
} assert.sameValue(afterDeleted, false, 'afterDeleted');
runTestCase(testcase);

View File

@ -6,13 +6,9 @@ es5id: 15.2.3.5-4-149
description: > description: >
Object.create - 'configurable' property of one property in Object.create - 'configurable' property of one property in
'Properties' is the global object (8.10.5 step 4.b) 'Properties' is the global object (8.10.5 step 4.b)
includes: includes: [fnGlobalObject.js]
- runTestCase.js
- fnGlobalObject.js
---*/ ---*/
function testcase() {
var newObj = Object.create({}, { var newObj = Object.create({}, {
prop: { prop: {
configurable: fnGlobalObject() configurable: fnGlobalObject()
@ -25,6 +21,5 @@ function testcase() {
var afterDeleted = newObj.hasOwnProperty("prop"); var afterDeleted = newObj.hasOwnProperty("prop");
return beforeDeleted === true && afterDeleted === false; assert.sameValue(beforeDeleted, true, 'beforeDeleted');
} assert.sameValue(afterDeleted, false, 'afterDeleted');
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.5-4-15
description: > description: >
Object.create - argument 'Properties' is the Aguments object Object.create - argument 'Properties' is the Aguments object
(15.2.3.7 step 2) (15.2.3.7 step 2)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var result = false; var result = false;
var argObj = (function () { return arguments; })(); var argObj = (function () { return arguments; })();
@ -24,6 +21,6 @@ function testcase() {
}); });
var newObj = Object.create({}, argObj); var newObj = Object.create({}, argObj);
return result && newObj.hasOwnProperty("prop");
} assert(result, 'result !== true');
runTestCase(testcase); assert(newObj.hasOwnProperty("prop"), 'newObj.hasOwnProperty("prop") !== true');

View File

@ -7,11 +7,8 @@ description: >
Object.create - 'configurable' property of one property in Object.create - 'configurable' property of one property in
'Properties' is a string (value is 'false') which is treated as 'Properties' is a string (value is 'false') which is treated as
the value true (8.10.5 step 4.b) the value true (8.10.5 step 4.b)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var newObj = Object.create({}, { var newObj = Object.create({}, {
prop: { prop: {
configurable: "false" configurable: "false"
@ -24,6 +21,5 @@ function testcase() {
var afterDeleted = newObj.hasOwnProperty("prop"); var afterDeleted = newObj.hasOwnProperty("prop");
return beforeDeleted === true && afterDeleted === false; assert.sameValue(beforeDeleted, true, 'beforeDeleted');
} assert.sameValue(afterDeleted, false, 'afterDeleted');
runTestCase(testcase);

View File

@ -7,11 +7,8 @@ description: >
Object.create - 'configurable' property of one property in Object.create - 'configurable' property of one property in
'Properties' is new Boolean(false) which is treated as the value 'Properties' is new Boolean(false) which is treated as the value
true (8.10.5 step 4.b) true (8.10.5 step 4.b)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var newObj = Object.create({}, { var newObj = Object.create({}, {
prop: { prop: {
configurable: new Boolean(false) configurable: new Boolean(false)
@ -24,6 +21,5 @@ function testcase() {
var afterDeleted = newObj.hasOwnProperty("prop"); var afterDeleted = newObj.hasOwnProperty("prop");
return beforeDeleted === true && afterDeleted === false; assert.sameValue(beforeDeleted, true, 'beforeDeleted');
} assert.sameValue(afterDeleted, false, 'afterDeleted');
runTestCase(testcase);

View File

@ -6,17 +6,12 @@ es5id: 15.2.3.5-4-152
description: > description: >
Object.create - 'value' property of one property in 'Properties' Object.create - 'value' property of one property in 'Properties'
is present (8.10.5 step 5) is present (8.10.5 step 5)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var newObj = Object.create({}, { var newObj = Object.create({}, {
prop: { prop: {
value: 100 value: 100
} }
}); });
return newObj.prop === 100; assert.sameValue(newObj.prop, 100, 'newObj.prop');
}
runTestCase(testcase);

View File

@ -6,15 +6,11 @@ es5id: 15.2.3.5-4-153
description: > description: >
Object.create - 'value' property of one property in 'Properties' Object.create - 'value' property of one property in 'Properties'
is not present (8.10.5 step 5) is not present (8.10.5 step 5)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var newObj = Object.create({}, { var newObj = Object.create({}, {
prop: {} prop: {}
}); });
return newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined"; assert(newObj.hasOwnProperty("prop"), 'newObj.hasOwnProperty("prop") !== true');
} assert.sameValue(typeof (newObj.prop), "undefined", 'typeof (newObj.prop)');
runTestCase(testcase);

View File

@ -6,17 +6,12 @@ es5id: 15.2.3.5-4-154
description: > description: >
Object.create - 'value' property of one property in 'Properties' Object.create - 'value' property of one property in 'Properties'
is own data property (8.10.5 step 5.a) is own data property (8.10.5 step 5.a)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var newObj = Object.create({}, { var newObj = Object.create({}, {
prop: { prop: {
value: "ownDataProperty" value: "ownDataProperty"
} }
}); });
return newObj.prop === "ownDataProperty"; assert.sameValue(newObj.prop, "ownDataProperty", 'newObj.prop');
}
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.5-4-155
description: > description: >
Object.create - 'value' property of one property in 'Properties' Object.create - 'value' property of one property in 'Properties'
is an inherited data property (8.10.5 step 5.a) is an inherited data property (8.10.5 step 5.a)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var proto = { var proto = {
value: "inheritedDataProperty" value: "inheritedDataProperty"
}; };
@ -24,6 +21,4 @@ function testcase() {
prop: descObj prop: descObj
}); });
return newObj.prop === "inheritedDataProperty"; assert.sameValue(newObj.prop, "inheritedDataProperty", 'newObj.prop');
}
runTestCase(testcase);

View File

@ -7,11 +7,8 @@ description: >
Object.create - 'value' property of one property in 'Properties' Object.create - 'value' property of one property in 'Properties'
is own data property that overrides an inherited data property is own data property that overrides an inherited data property
(8.10.5 step 5.a) (8.10.5 step 5.a)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var proto = { var proto = {
value: "inheritedDataProperty" value: "inheritedDataProperty"
}; };
@ -27,6 +24,4 @@ function testcase() {
prop: descObj prop: descObj
}); });
return newObj.prop === "ownDataProperty"; assert.sameValue(newObj.prop, "ownDataProperty", 'newObj.prop');
}
runTestCase(testcase);

View File

@ -7,11 +7,8 @@ description: >
Object.create - 'value' property of one property in 'Properties' Object.create - 'value' property of one property in 'Properties'
is own data property that overrides an inherited accessor property is own data property that overrides an inherited accessor property
(8.10.5 step 5.a) (8.10.5 step 5.a)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var proto = {}; var proto = {};
Object.defineProperty(proto, "value", { Object.defineProperty(proto, "value", {
@ -35,6 +32,4 @@ function testcase() {
prop: descObj prop: descObj
}); });
return newObj.prop === "ownDataProperty"; assert.sameValue(newObj.prop, "ownDataProperty", 'newObj.prop');
}
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.5-4-158
description: > description: >
Object.create - 'value' property of one property in 'Properties' Object.create - 'value' property of one property in 'Properties'
is own accessor property (8.10.5 step 5.a) is own accessor property (8.10.5 step 5.a)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var descObj = {}; var descObj = {};
Object.defineProperty(descObj, "value", { Object.defineProperty(descObj, "value", {
@ -23,6 +20,4 @@ function testcase() {
prop: descObj prop: descObj
}); });
return newObj.prop === "ownAccessorProperty"; assert.sameValue(newObj.prop, "ownAccessorProperty", 'newObj.prop');
}
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.5-4-159
description: > description: >
Object.create - 'value' property of one property in 'Properties' Object.create - 'value' property of one property in 'Properties'
is an inherited accessor property (8.10.5 step 5.a) is an inherited accessor property (8.10.5 step 5.a)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var proto = {}; var proto = {};
Object.defineProperty(proto, "value", { Object.defineProperty(proto, "value", {
@ -28,6 +25,4 @@ function testcase() {
prop: descObj prop: descObj
}); });
return newObj.prop === "inheritedAccessorProperty"; assert.sameValue(newObj.prop, "inheritedAccessorProperty", 'newObj.prop');
}
runTestCase(testcase);

View File

@ -6,14 +6,10 @@ es5id: 15.2.3.5-4-16
description: > description: >
Object.create - own enumerable data property in 'Properties' is Object.create - own enumerable data property in 'Properties' is
defined in 'obj' (15.2.3.7 step 3) defined in 'obj' (15.2.3.7 step 3)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var newObj = Object.create({}, { var newObj = Object.create({}, {
prop: {} prop: {}
}); });
return newObj.hasOwnProperty("prop");
} assert(newObj.hasOwnProperty("prop"), 'newObj.hasOwnProperty("prop") !== true');
runTestCase(testcase);

View File

@ -7,11 +7,8 @@ description: >
Object.create - 'value' property of one property in 'Properties' Object.create - 'value' property of one property in 'Properties'
is own accessor property that overrides an inherited data property is own accessor property that overrides an inherited data property
(8.10.5 step 5.a) (8.10.5 step 5.a)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var proto = { var proto = {
value: "inheritedDataProperty" value: "inheritedDataProperty"
}; };
@ -31,6 +28,4 @@ function testcase() {
prop: descObj prop: descObj
}); });
return newObj.prop === "ownAccessorProperty"; assert.sameValue(newObj.prop, "ownAccessorProperty", 'newObj.prop');
}
runTestCase(testcase);

View File

@ -7,11 +7,8 @@ description: >
Object.create - 'value' property of one property in 'Properties' Object.create - 'value' property of one property in 'Properties'
is own accessor property that overrides an inherited accessor is own accessor property that overrides an inherited accessor
property (8.10.5 step 5.a) property (8.10.5 step 5.a)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var proto = {}; var proto = {};
Object.defineProperty(proto, "value", { Object.defineProperty(proto, "value", {
@ -35,6 +32,4 @@ function testcase() {
prop: descObj prop: descObj
}); });
return newObj.prop === "ownAccessorProperty"; assert.sameValue(newObj.prop, "ownAccessorProperty", 'newObj.prop');
}
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.5-4-162
description: > description: >
Object.create - 'value' property of one property in 'Properties' Object.create - 'value' property of one property in 'Properties'
is own accessor property without a get function (8.10.5 step 5.a) is own accessor property without a get function (8.10.5 step 5.a)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var descObj = {}; var descObj = {};
Object.defineProperty(descObj, "value", { Object.defineProperty(descObj, "value", {
@ -21,6 +18,5 @@ function testcase() {
prop: descObj prop: descObj
}); });
return newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined"; assert(newObj.hasOwnProperty("prop"), 'newObj.hasOwnProperty("prop") !== true');
} assert.sameValue(typeof (newObj.prop), "undefined", 'typeof (newObj.prop)');
runTestCase(testcase);

View File

@ -7,11 +7,8 @@ description: >
Object.create - 'value' property of one property in 'Properties' Object.create - 'value' property of one property in 'Properties'
is own accessor property without a get function, which overrides is own accessor property without a get function, which overrides
an inherited accessor property (8.10.5 step 5.a) an inherited accessor property (8.10.5 step 5.a)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var proto = {}; var proto = {};
Object.defineProperty(proto, "value", { Object.defineProperty(proto, "value", {
@ -33,6 +30,5 @@ function testcase() {
prop: descObj prop: descObj
}); });
return newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined"; assert(newObj.hasOwnProperty("prop"), 'newObj.hasOwnProperty("prop") !== true');
} assert.sameValue(typeof (newObj.prop), "undefined", 'typeof (newObj.prop)');
runTestCase(testcase);

View File

@ -7,11 +7,8 @@ description: >
Object.create - 'value' property of one property in 'Properties' Object.create - 'value' property of one property in 'Properties'
is an inherited accessor property without a get function (8.10.5 is an inherited accessor property without a get function (8.10.5
step 5.a) step 5.a)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var proto = {}; var proto = {};
Object.defineProperty(proto, "value", { Object.defineProperty(proto, "value", {
@ -27,6 +24,5 @@ function testcase() {
prop: descObj prop: descObj
}); });
return newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined"; assert(newObj.hasOwnProperty("prop"), 'newObj.hasOwnProperty("prop") !== true');
} assert.sameValue(typeof (newObj.prop), "undefined", 'typeof (newObj.prop)');
runTestCase(testcase);

View File

@ -7,11 +7,8 @@ description: >
Object.create - one property in 'Properties' is a Function object Object.create - one property in 'Properties' is a Function object
which implements its own [[Get]] method to access the 'value' which implements its own [[Get]] method to access the 'value'
property (8.10.5 step 5.a) property (8.10.5 step 5.a)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var Func = function (a, b) { var Func = function (a, b) {
return a + b; return a + b;
}; };
@ -22,6 +19,5 @@ function testcase() {
var newObj = Object.create({}, { var newObj = Object.create({}, {
prop: fun prop: fun
}); });
return newObj.prop === "FunValue";
} assert.sameValue(newObj.prop, "FunValue", 'newObj.prop');
runTestCase(testcase);

View File

@ -7,11 +7,8 @@ description: >
Object.create - one property in 'Properties' is an Array object Object.create - one property in 'Properties' is an Array object
that uses Object's [[Get]] method to access the 'value' property that uses Object's [[Get]] method to access the 'value' property
(8.10.5 step 5.a) (8.10.5 step 5.a)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var arr = [1, 2, 3]; var arr = [1, 2, 3];
arr.value = "ArrValue"; arr.value = "ArrValue";
@ -20,6 +17,4 @@ function testcase() {
prop: arr prop: arr
}); });
return newObj.prop === "ArrValue"; assert.sameValue(newObj.prop, "ArrValue", 'newObj.prop');
}
runTestCase(testcase);

View File

@ -7,11 +7,8 @@ description: >
Object.create - one property in 'Properties' is a String object Object.create - one property in 'Properties' is a String object
that uses Object's [[Get]] method to access the 'value' property that uses Object's [[Get]] method to access the 'value' property
(8.10.5 step 5.a) (8.10.5 step 5.a)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var str = new String("abc"); var str = new String("abc");
str.value = "StrValue"; str.value = "StrValue";
@ -20,6 +17,4 @@ function testcase() {
prop: str prop: str
}); });
return newObj.prop === "StrValue"; assert.sameValue(newObj.prop, "StrValue", 'newObj.prop');
}
runTestCase(testcase);

View File

@ -7,11 +7,8 @@ description: >
Object.create - one property in 'Properties' is a Boolean object Object.create - one property in 'Properties' is a Boolean object
that uses Object's [[Get]] method to access the 'value' property that uses Object's [[Get]] method to access the 'value' property
(8.10.5 step 5.a) (8.10.5 step 5.a)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var booleanObj = new Boolean(false); var booleanObj = new Boolean(false);
booleanObj.value = "BooleanValue"; booleanObj.value = "BooleanValue";
@ -20,6 +17,4 @@ function testcase() {
prop: booleanObj prop: booleanObj
}); });
return newObj.prop === "BooleanValue"; assert.sameValue(newObj.prop, "BooleanValue", 'newObj.prop');
}
runTestCase(testcase);

View File

@ -7,11 +7,8 @@ description: >
Object.create - one property in 'Properties' is a Number object Object.create - one property in 'Properties' is a Number object
that uses Object's [[Get]] method to access the 'value' property that uses Object's [[Get]] method to access the 'value' property
(8.10.5 step 5.a) (8.10.5 step 5.a)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var numObj = new Number(123); var numObj = new Number(123);
numObj.value = "NumValue"; numObj.value = "NumValue";
@ -20,6 +17,4 @@ function testcase() {
prop: numObj prop: numObj
}); });
return newObj.prop === "NumValue"; assert.sameValue(newObj.prop, "NumValue", 'newObj.prop');
}
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.5-4-17
description: > description: >
Object.create - own data property in 'Properties' which is not Object.create - own data property in 'Properties' which is not
enumerable is not defined in 'obj' (15.2.3.7 step 3) enumerable is not defined in 'obj' (15.2.3.7 step 3)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var props = {}; var props = {};
Object.defineProperty(props, "prop", { Object.defineProperty(props, "prop", {
value: {}, value: {},
@ -18,6 +15,4 @@ function testcase() {
}); });
var newObj = Object.create({}, props); var newObj = Object.create({}, props);
return !newObj.hasOwnProperty("prop"); assert.sameValue(newObj.hasOwnProperty("prop"), false, 'newObj.hasOwnProperty("prop")');
}
runTestCase(testcase);

View File

@ -7,11 +7,8 @@ description: >
Object.create - one property in 'Properties' is a Date object that Object.create - one property in 'Properties' is a Date object that
uses Object's [[Get]] method to access the 'value' property uses Object's [[Get]] method to access the 'value' property
(8.10.5 step 5.a) (8.10.5 step 5.a)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var dateObj = new Date(); var dateObj = new Date();
dateObj.value = "DateValue"; dateObj.value = "DateValue";
@ -20,6 +17,4 @@ function testcase() {
prop: dateObj prop: dateObj
}); });
return newObj.prop === "DateValue"; assert.sameValue(newObj.prop, "DateValue", 'newObj.prop');
}
runTestCase(testcase);

View File

@ -7,11 +7,8 @@ description: >
Object.create - one property in 'Properties' is a RegExp object Object.create - one property in 'Properties' is a RegExp object
that uses Object's [[Get]] method to access the 'value' property that uses Object's [[Get]] method to access the 'value' property
(8.10.5 step 5.a) (8.10.5 step 5.a)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var regObj = new RegExp(); var regObj = new RegExp();
regObj.value = "RegExpValue"; regObj.value = "RegExpValue";
@ -20,6 +17,4 @@ function testcase() {
prop: regObj prop: regObj
}); });
return newObj.prop === "RegExpValue"; assert.sameValue(newObj.prop, "RegExpValue", 'newObj.prop');
}
runTestCase(testcase);

View File

@ -7,11 +7,8 @@ description: >
Object.create - one property in 'Properties' is an Error object Object.create - one property in 'Properties' is an Error object
that uses Object's [[Get]] method to access the 'value' property that uses Object's [[Get]] method to access the 'value' property
(8.10.5 step 5.a) (8.10.5 step 5.a)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var errorObj = new Error(); var errorObj = new Error();
errorObj.value = "ErrorValue"; errorObj.value = "ErrorValue";
@ -20,6 +17,4 @@ function testcase() {
prop: errorObj prop: errorObj
}); });
return newObj.prop === "ErrorValue"; assert.sameValue(newObj.prop, "ErrorValue", 'newObj.prop');
}
runTestCase(testcase);

View File

@ -7,11 +7,8 @@ description: >
Object.create - one property in 'Properties' is an Arguments Object.create - one property in 'Properties' is an Arguments
object which implements its own [[Get]] method to access the object which implements its own [[Get]] method to access the
'value' property (8.10.5 step 5.a) 'value' property (8.10.5 step 5.a)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var argObj = (function () { return arguments; })(); var argObj = (function () { return arguments; })();
argObj.value = "ArgValue"; argObj.value = "ArgValue";
@ -20,6 +17,4 @@ function testcase() {
prop: argObj prop: argObj
}); });
return newObj.prop === "ArgValue"; assert.sameValue(newObj.prop, "ArgValue", 'newObj.prop');
}
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.5-4-178
description: > description: >
Object.create - 'writable' property of one property in Object.create - 'writable' property of one property in
'Properties' is true (8.10.5 step 6) 'Properties' is true (8.10.5 step 6)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var newObj = Object.create({}, { var newObj = Object.create({}, {
prop: { prop: {
writable: true writable: true
@ -23,6 +20,5 @@ function testcase() {
var afterWrite = (newObj.prop === "isWritable"); var afterWrite = (newObj.prop === "isWritable");
return beforeWrite === true && afterWrite === true; assert.sameValue(beforeWrite, true, 'beforeWrite');
} assert.sameValue(afterWrite, true, 'afterWrite');
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.5-4-18
description: > description: >
Object.create - an enumerable inherited data property in Object.create - an enumerable inherited data property in
'Properties' is not defined in 'obj' (15.2.3.7 step 3) 'Properties' is not defined in 'obj' (15.2.3.7 step 3)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var proto = {}; var proto = {};
proto.prop = {}; proto.prop = {};
@ -21,6 +18,4 @@ function testcase() {
var newObj = Object.create({}, child); var newObj = Object.create({}, child);
return !newObj.hasOwnProperty("prop"); assert.sameValue(newObj.hasOwnProperty("prop"), false, 'newObj.hasOwnProperty("prop")');
}
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.5-4-180
description: > description: >
Object.create - 'writable' property of one property in Object.create - 'writable' property of one property in
'Properties' is own data property (8.10.5 step 6.a) 'Properties' is own data property (8.10.5 step 6.a)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var newObj = Object.create({}, { var newObj = Object.create({}, {
prop: { prop: {
writable: true writable: true
@ -23,6 +20,5 @@ function testcase() {
var afterWrite = (newObj.prop === "isWritable"); var afterWrite = (newObj.prop === "isWritable");
return beforeWrite === true && afterWrite === true; assert.sameValue(beforeWrite, true, 'beforeWrite');
} assert.sameValue(afterWrite, true, 'afterWrite');
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.5-4-181
description: > description: >
Object.create - 'writable' property of one property in Object.create - 'writable' property of one property in
'Properties' is an inherited data property (8.10.5 step 6.a) 'Properties' is an inherited data property (8.10.5 step 6.a)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var proto = { var proto = {
writable: true writable: true
}; };
@ -30,6 +27,5 @@ function testcase() {
var afterWrite = (newObj.prop === "isWritable"); var afterWrite = (newObj.prop === "isWritable");
return beforeWrite === true && afterWrite === true; assert.sameValue(beforeWrite, true, 'beforeWrite');
} assert.sameValue(afterWrite, true, 'afterWrite');
runTestCase(testcase);

View File

@ -7,11 +7,8 @@ description: >
Object.create - 'writable' property of one property in Object.create - 'writable' property of one property in
'Properties' is own data property that overrides an inherited data 'Properties' is own data property that overrides an inherited data
property (8.10.5 step 6.a) property (8.10.5 step 6.a)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var proto = { var proto = {
writable: false writable: false
}; };
@ -33,6 +30,5 @@ function testcase() {
var afterWrite = (newObj.prop === "isWritable"); var afterWrite = (newObj.prop === "isWritable");
return beforeWrite === true && afterWrite === true; assert.sameValue(beforeWrite, true, 'beforeWrite');
} assert.sameValue(afterWrite, true, 'afterWrite');
runTestCase(testcase);

View File

@ -7,11 +7,8 @@ description: >
Object.create - 'writable' property of one property in Object.create - 'writable' property of one property in
'Properties' is own data property that overrides an inherited 'Properties' is own data property that overrides an inherited
accessor property (8.10.5 step 6.a) accessor property (8.10.5 step 6.a)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var proto = {}; var proto = {};
Object.defineProperty(proto, "writable", { Object.defineProperty(proto, "writable", {
@ -39,6 +36,5 @@ function testcase() {
var afterWrite = (newObj.prop === "isWritable"); var afterWrite = (newObj.prop === "isWritable");
return beforeWrite === true && afterWrite === true; assert.sameValue(beforeWrite, true, 'beforeWrite');
} assert.sameValue(afterWrite, true, 'afterWrite');
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.5-4-184
description: > description: >
Object.create - 'writable' property of one property in Object.create - 'writable' property of one property in
'Properties' is own accessor property (8.10.5 step 6.a) 'Properties' is own accessor property (8.10.5 step 6.a)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var descObj = {}; var descObj = {};
Object.defineProperty(descObj, "writable", { Object.defineProperty(descObj, "writable", {
@ -29,6 +26,5 @@ function testcase() {
var afterWrite = (newObj.prop === "isWritable"); var afterWrite = (newObj.prop === "isWritable");
return beforeWrite === true && afterWrite === true; assert.sameValue(beforeWrite, true, 'beforeWrite');
} assert.sameValue(afterWrite, true, 'afterWrite');
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.5-4-185
description: > description: >
Object.create - 'writable' property of one property in Object.create - 'writable' property of one property in
'Properties' is an inherited accessor property (8.10.5 step 6.a) 'Properties' is an inherited accessor property (8.10.5 step 6.a)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var proto = {}; var proto = {};
Object.defineProperty(proto, "writable", { Object.defineProperty(proto, "writable", {
@ -34,6 +31,5 @@ function testcase() {
var afterWrite = (newObj.prop === "isWritable"); var afterWrite = (newObj.prop === "isWritable");
return beforeWrite === true && afterWrite === true; assert.sameValue(beforeWrite, true, 'beforeWrite');
} assert.sameValue(afterWrite, true, 'afterWrite');
runTestCase(testcase);

View File

@ -7,11 +7,8 @@ description: >
Object.create - 'writable' property of one property in Object.create - 'writable' property of one property in
'Properties' is own accessor property that overrides an inherited 'Properties' is own accessor property that overrides an inherited
data property (8.10.5 step 6.a) data property (8.10.5 step 6.a)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var proto = { var proto = {
writable: false writable: false
}; };
@ -37,6 +34,5 @@ function testcase() {
var afterWrite = (newObj.prop === "isWritable"); var afterWrite = (newObj.prop === "isWritable");
return beforeWrite === true && afterWrite === true; assert.sameValue(beforeWrite, true, 'beforeWrite');
} assert.sameValue(afterWrite, true, 'afterWrite');
runTestCase(testcase);

View File

@ -7,11 +7,8 @@ description: >
Object.create - 'writable' property of one property in Object.create - 'writable' property of one property in
'Properties' is own accessor property that overrides an inherited 'Properties' is own accessor property that overrides an inherited
accessor property (8.10.5 step 6.a) accessor property (8.10.5 step 6.a)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var proto = {}; var proto = {};
Object.defineProperty(proto, "writable", { Object.defineProperty(proto, "writable", {
@ -41,6 +38,5 @@ function testcase() {
var afterWrite = (newObj.prop === "isWritable"); var afterWrite = (newObj.prop === "isWritable");
return beforeWrite === true && afterWrite === true; assert.sameValue(beforeWrite, true, 'beforeWrite');
} assert.sameValue(afterWrite, true, 'afterWrite');
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.5-4-19
description: > description: >
Object.create - own enumerable accessor property in 'Properties' Object.create - own enumerable accessor property in 'Properties'
is defined in 'obj' (15.2.3.7 step 3) is defined in 'obj' (15.2.3.7 step 3)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var props = {}; var props = {};
Object.defineProperty(props, "prop", { Object.defineProperty(props, "prop", {
@ -22,6 +19,4 @@ function testcase() {
var newObj = Object.create({}, props); var newObj = Object.create({}, props);
return newObj.hasOwnProperty("prop"); assert(newObj.hasOwnProperty("prop"), 'newObj.hasOwnProperty("prop") !== true');
}
runTestCase(testcase);

View File

@ -7,11 +7,8 @@ description: >
Object.create - one property in 'Properties' is a Function object Object.create - one property in 'Properties' is a Function object
which implements its own [[Get]] method to access the 'writable' which implements its own [[Get]] method to access the 'writable'
property (8.10.5 step 6.a) property (8.10.5 step 6.a)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var Func = function (a, b) { var Func = function (a, b) {
return a + b; return a + b;
}; };
@ -29,6 +26,5 @@ function testcase() {
var afterWrite = (newObj.prop === "isWritable"); var afterWrite = (newObj.prop === "isWritable");
return beforeWrite === true && afterWrite === true; assert.sameValue(beforeWrite, true, 'beforeWrite');
} assert.sameValue(afterWrite, true, 'afterWrite');
runTestCase(testcase);

View File

@ -7,11 +7,8 @@ description: >
Object.create - one property in 'Properties' is an Array object Object.create - one property in 'Properties' is an Array object
that uses Object's [[Get]] method to access the 'writable' that uses Object's [[Get]] method to access the 'writable'
property (8.10.5 step 6.a) property (8.10.5 step 6.a)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var array = [1, 2, 3]; var array = [1, 2, 3];
array.writable = true; array.writable = true;
@ -26,6 +23,5 @@ function testcase() {
var afterWrite = (newObj.prop === "isWritable"); var afterWrite = (newObj.prop === "isWritable");
return beforeWrite === true && afterWrite === true; assert.sameValue(beforeWrite, true, 'beforeWrite');
} assert.sameValue(afterWrite, true, 'afterWrite');
runTestCase(testcase);

View File

@ -7,11 +7,8 @@ description: >
Object.create - one property in 'Properties' is a String object Object.create - one property in 'Properties' is a String object
that uses Object's [[Get]] method to access the 'writable' that uses Object's [[Get]] method to access the 'writable'
property (8.10.5 step 6.a) property (8.10.5 step 6.a)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var str = new String("abc"); var str = new String("abc");
str.writable = true; str.writable = true;
@ -26,6 +23,5 @@ function testcase() {
var afterWrite = (newObj.prop === "isWritable"); var afterWrite = (newObj.prop === "isWritable");
return beforeWrite === true && afterWrite === true; assert.sameValue(beforeWrite, true, 'beforeWrite');
} assert.sameValue(afterWrite, true, 'afterWrite');
runTestCase(testcase);

View File

@ -7,11 +7,8 @@ description: >
Object.create - one property in 'Properties' is a Boolean object Object.create - one property in 'Properties' is a Boolean object
that uses Object's [[Get]] method to access the 'writable' that uses Object's [[Get]] method to access the 'writable'
property (8.10.5 step 6.a) property (8.10.5 step 6.a)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var booleanObj = new Boolean(false); var booleanObj = new Boolean(false);
booleanObj.writable = true; booleanObj.writable = true;
@ -26,6 +23,5 @@ function testcase() {
var afterWrite = (newObj.prop === "isWritable"); var afterWrite = (newObj.prop === "isWritable");
return beforeWrite === true && afterWrite === true; assert.sameValue(beforeWrite, true, 'beforeWrite');
} assert.sameValue(afterWrite, true, 'afterWrite');
runTestCase(testcase);

View File

@ -7,11 +7,8 @@ description: >
Object.create - one property in 'Properties' is a Number object Object.create - one property in 'Properties' is a Number object
that uses Object's [[Get]] method to access the 'writable' that uses Object's [[Get]] method to access the 'writable'
property (8.10.5 step 6.a) property (8.10.5 step 6.a)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var numObj = new Number(123); var numObj = new Number(123);
numObj.writable = true; numObj.writable = true;
@ -26,6 +23,5 @@ function testcase() {
var afterWrite = (newObj.prop === "isWritable"); var afterWrite = (newObj.prop === "isWritable");
return beforeWrite === true && afterWrite === true; assert.sameValue(beforeWrite, true, 'beforeWrite');
} assert.sameValue(afterWrite, true, 'afterWrite');
runTestCase(testcase);

View File

@ -7,11 +7,8 @@ description: >
Object.create - one property in 'Properties' is a Date object that Object.create - one property in 'Properties' is a Date object that
uses Object's [[Get]] method to access the 'writable' property uses Object's [[Get]] method to access the 'writable' property
(8.10.5 step 6.a) (8.10.5 step 6.a)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var dateObj = new Date(); var dateObj = new Date();
dateObj.writable = true; dateObj.writable = true;
@ -26,6 +23,5 @@ function testcase() {
var afterWrite = (newObj.prop === "isWritable"); var afterWrite = (newObj.prop === "isWritable");
return beforeWrite === true && afterWrite === true; assert.sameValue(beforeWrite, true, 'beforeWrite');
} assert.sameValue(afterWrite, true, 'afterWrite');
runTestCase(testcase);

View File

@ -7,11 +7,8 @@ description: >
Object.create - one property in 'Properties' is a RegExp object Object.create - one property in 'Properties' is a RegExp object
that uses Object's [[Get]] method to access the 'writable' that uses Object's [[Get]] method to access the 'writable'
property (8.10.5 step 6.a) property (8.10.5 step 6.a)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var regObj = new RegExp(); var regObj = new RegExp();
regObj.writable = true; regObj.writable = true;
@ -26,6 +23,5 @@ function testcase() {
var afterWrite = (newObj.prop === "isWritable"); var afterWrite = (newObj.prop === "isWritable");
return beforeWrite === true && afterWrite === true; assert.sameValue(beforeWrite, true, 'beforeWrite');
} assert.sameValue(afterWrite, true, 'afterWrite');
runTestCase(testcase);

View File

@ -4,12 +4,8 @@
/*--- /*---
es5id: 15.2.3.5-4-2 es5id: 15.2.3.5-4-2
description: Object.create - 'Properties' is undefined description: Object.create - 'Properties' is undefined
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var newObj = Object.create({}, undefined); var newObj = Object.create({}, undefined);
return (newObj instanceof Object);
} assert((newObj instanceof Object), '(newObj instanceof Object) !== true');
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.5-4-20
description: > description: >
Object.create - own accessor property in 'Properties' which is not Object.create - own accessor property in 'Properties' which is not
enumerable is not defined in 'obj' (15.2.3.7 step 3) enumerable is not defined in 'obj' (15.2.3.7 step 3)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var props = {}; var props = {};
Object.defineProperty(props, "prop", { Object.defineProperty(props, "prop", {
@ -22,6 +19,4 @@ function testcase() {
var newObj = Object.create({}, props); var newObj = Object.create({}, props);
return !newObj.hasOwnProperty("prop"); assert.sameValue(newObj.hasOwnProperty("prop"), false, 'newObj.hasOwnProperty("prop")');
}
runTestCase(testcase);

View File

@ -7,11 +7,8 @@ description: >
Object.create - one property in 'Properties' is an Error object Object.create - one property in 'Properties' is an Error object
that uses Object's [[Get]] method to access the 'writable' that uses Object's [[Get]] method to access the 'writable'
property (8.10.5 step 6.a) property (8.10.5 step 6.a)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var errorObj = new Error(); var errorObj = new Error();
errorObj.writable = true; errorObj.writable = true;
@ -26,6 +23,5 @@ function testcase() {
var afterWrite = (newObj.prop === "isWritable"); var afterWrite = (newObj.prop === "isWritable");
return beforeWrite === true && afterWrite === true; assert.sameValue(beforeWrite, true, 'beforeWrite');
} assert.sameValue(afterWrite, true, 'afterWrite');
runTestCase(testcase);

View File

@ -7,11 +7,8 @@ description: >
Object.create - one property in 'Properties' is an Arguments Object.create - one property in 'Properties' is an Arguments
object which implements its own [[Get]] method to access the object which implements its own [[Get]] method to access the
'writable' property (8.10.5 step 6.a) 'writable' property (8.10.5 step 6.a)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var argObj = (function () { return arguments; })(); var argObj = (function () { return arguments; })();
argObj.writable = true; argObj.writable = true;
@ -26,7 +23,5 @@ function testcase() {
var afterWrite = (newObj.prop === "isWritable"); var afterWrite = (newObj.prop === "isWritable");
return beforeWrite === true && afterWrite === true; assert.sameValue(beforeWrite, true, 'beforeWrite');
assert.sameValue(afterWrite, true, 'afterWrite');
}
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.5-4-206
description: > description: >
Object.create - 'writable' property of one property in Object.create - 'writable' property of one property in
'Properties' is true (8.10.5 step 6.b) 'Properties' is true (8.10.5 step 6.b)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var newObj = Object.create({}, { var newObj = Object.create({}, {
prop: { prop: {
writable: true writable: true
@ -20,6 +17,5 @@ function testcase() {
newObj.prop = 121; newObj.prop = 121;
return hasProperty && newObj.prop === 121; assert(hasProperty, 'hasProperty !== true');
} assert.sameValue(newObj.prop, 121, 'newObj.prop');
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.5-4-21
description: > description: >
Object.create - an enumerable inherited accessor property in Object.create - an enumerable inherited accessor property in
'Properties' is not defined in 'obj' (15.2.3.7 step 3) 'Properties' is not defined in 'obj' (15.2.3.7 step 3)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var proto = {}; var proto = {};
Object.defineProperty(proto, "prop", { Object.defineProperty(proto, "prop", {
@ -26,6 +23,4 @@ function testcase() {
var newObj = Object.create({}, child); var newObj = Object.create({}, child);
return !newObj.hasOwnProperty("prop"); assert.sameValue(newObj.hasOwnProperty("prop"), false, 'newObj.hasOwnProperty("prop")');
}
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.5-4-212
description: > description: >
Object.create - 'writable' property of one property in Object.create - 'writable' property of one property in
'Properties' is a positive number primitive (8.10.5 step 6.b) 'Properties' is a positive number primitive (8.10.5 step 6.b)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var newObj = Object.create({}, { var newObj = Object.create({}, {
prop: { prop: {
writable: 12 writable: 12
@ -20,6 +17,5 @@ function testcase() {
newObj.prop = 121; newObj.prop = 121;
return hasProperty && newObj.prop === 121; assert(hasProperty, 'hasProperty !== true');
} assert.sameValue(newObj.prop, 121, 'newObj.prop');
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.5-4-213
description: > description: >
Object.create - 'writable' property of one property in Object.create - 'writable' property of one property in
'Properties' is a negative number primitive (8.10.5 step 6.b) 'Properties' is a negative number primitive (8.10.5 step 6.b)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var newObj = Object.create({}, { var newObj = Object.create({}, {
prop: { prop: {
writable: -9 writable: -9
@ -20,6 +17,5 @@ function testcase() {
newObj.prop = 121; newObj.prop = 121;
return hasProperty && newObj.prop === 121; assert(hasProperty, 'hasProperty !== true');
} assert.sameValue(newObj.prop, 121, 'newObj.prop');
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.5-4-215
description: > description: >
Object.create - 'writable' property of one property in Object.create - 'writable' property of one property in
'Properties' is a non-empty string (8.10.5 step 6.b) 'Properties' is a non-empty string (8.10.5 step 6.b)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var newObj = Object.create({}, { var newObj = Object.create({}, {
prop: { prop: {
writable: "abc" writable: "abc"
@ -20,6 +17,5 @@ function testcase() {
newObj.prop = 121; newObj.prop = 121;
return hasProperty && newObj.prop === 121; assert(hasProperty, 'hasProperty !== true');
} assert.sameValue(newObj.prop, 121, 'newObj.prop');
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.5-4-216
description: > description: >
Object.create - 'writable' property of one property in Object.create - 'writable' property of one property in
'Properties' is a Function object (8.10.5 step 6.b) 'Properties' is a Function object (8.10.5 step 6.b)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var newObj = Object.create({}, { var newObj = Object.create({}, {
prop: { prop: {
writable: function () { } writable: function () { }
@ -20,6 +17,5 @@ function testcase() {
newObj.prop = 121; newObj.prop = 121;
return hasProperty && newObj.prop === 121; assert(hasProperty, 'hasProperty !== true');
} assert.sameValue(newObj.prop, 121, 'newObj.prop');
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.5-4-217
description: > description: >
Object.create - 'writable' property of one property in Object.create - 'writable' property of one property in
'Properties' is an Array object (8.10.5 step 6.b) 'Properties' is an Array object (8.10.5 step 6.b)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var newObj = Object.create({}, { var newObj = Object.create({}, {
prop: { prop: {
writable: [] writable: []
@ -20,6 +17,5 @@ function testcase() {
newObj.prop = 121; newObj.prop = 121;
return hasProperty && newObj.prop === 121; assert(hasProperty, 'hasProperty !== true');
} assert.sameValue(newObj.prop, 121, 'newObj.prop');
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.5-4-218
description: > description: >
Object.create - 'writable' property of one property in Object.create - 'writable' property of one property in
'Properties' is a String object (8.10.5 step 6.b) 'Properties' is a String object (8.10.5 step 6.b)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var newObj = Object.create({}, { var newObj = Object.create({}, {
prop: { prop: {
writable: new String() writable: new String()
@ -20,6 +17,5 @@ function testcase() {
newObj.prop = 121; newObj.prop = 121;
return hasProperty && newObj.prop === 121; assert(hasProperty, 'hasProperty !== true');
} assert.sameValue(newObj.prop, 121, 'newObj.prop');
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.5-4-219
description: > description: >
Object.create - 'writable' property of one property in Object.create - 'writable' property of one property in
'Properties' is a Boolean object (8.10.5 step 6.b) 'Properties' is a Boolean object (8.10.5 step 6.b)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var newObj = Object.create({}, { var newObj = Object.create({}, {
prop: { prop: {
writable: new Boolean() writable: new Boolean()
@ -20,6 +17,5 @@ function testcase() {
newObj.prop = 121; newObj.prop = 121;
return hasProperty && newObj.prop === 121; assert(hasProperty, 'hasProperty !== true');
} assert.sameValue(newObj.prop, 121, 'newObj.prop');
runTestCase(testcase);

View File

@ -7,11 +7,8 @@ description: >
Object.create - own enumerable data property that overrides an Object.create - own enumerable data property that overrides an
enumerable inherited data property in 'Properties' is defined in enumerable inherited data property in 'Properties' is defined in
'obj' (15.2.3.7 step 5.a) 'obj' (15.2.3.7 step 5.a)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var proto = {}; var proto = {};
proto.prop = { proto.prop = {
value: "abc" value: "abc"
@ -26,6 +23,5 @@ function testcase() {
}; };
var newObj = Object.create({}, child); var newObj = Object.create({}, child);
return newObj.hasOwnProperty("prop") && newObj.prop === "bbq"; assert(newObj.hasOwnProperty("prop"), 'newObj.hasOwnProperty("prop") !== true');
} assert.sameValue(newObj.prop, "bbq", 'newObj.prop');
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.5-4-220
description: > description: >
Object.create - 'writable' property of one property in Object.create - 'writable' property of one property in
'Properties' is a Number object (8.10.5 step 6.b) 'Properties' is a Number object (8.10.5 step 6.b)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var newObj = Object.create({}, { var newObj = Object.create({}, {
prop: { prop: {
writable: new Number() writable: new Number()
@ -20,6 +17,5 @@ function testcase() {
newObj.prop = 121; newObj.prop = 121;
return hasProperty && newObj.prop === 121; assert(hasProperty, 'hasProperty !== true');
} assert.sameValue(newObj.prop, 121, 'newObj.prop');
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.5-4-221
description: > description: >
Object.create - 'writable' property of one property in Object.create - 'writable' property of one property in
'Properties' is the Math object (8.10.5 step 6.b) 'Properties' is the Math object (8.10.5 step 6.b)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var newObj = Object.create({}, { var newObj = Object.create({}, {
prop: { prop: {
writable: Math writable: Math
@ -20,6 +17,5 @@ function testcase() {
newObj.prop = 121; newObj.prop = 121;
return hasProperty && newObj.prop === 121; assert(hasProperty, 'hasProperty !== true');
} assert.sameValue(newObj.prop, 121, 'newObj.prop');
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.5-4-222
description: > description: >
Object.create - 'writable' property of one property in Object.create - 'writable' property of one property in
'Properties' is a Date object (8.10.5 step 6.b) 'Properties' is a Date object (8.10.5 step 6.b)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var newObj = Object.create({}, { var newObj = Object.create({}, {
prop: { prop: {
writable: new Date() writable: new Date()
@ -20,6 +17,5 @@ function testcase() {
newObj.prop = 121; newObj.prop = 121;
return hasProperty && newObj.prop === 121; assert(hasProperty, 'hasProperty !== true');
} assert.sameValue(newObj.prop, 121, 'newObj.prop');
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.5-4-223
description: > description: >
Object.create - 'writable' property of one property in Object.create - 'writable' property of one property in
'Properties' is a RegExp object (8.10.5 step 6.b) 'Properties' is a RegExp object (8.10.5 step 6.b)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var newObj = Object.create({}, { var newObj = Object.create({}, {
prop: { prop: {
writable: new RegExp() writable: new RegExp()
@ -20,6 +17,5 @@ function testcase() {
newObj.prop = 121; newObj.prop = 121;
return hasProperty && newObj.prop === 121; assert(hasProperty, 'hasProperty !== true');
} assert.sameValue(newObj.prop, 121, 'newObj.prop');
runTestCase(testcase);

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