Replace runTestCase with assert helpers [test/built-ins/Object/defineProperties]

This commit is contained in:
André Bargull 2015-08-11 17:53:17 +02:00
parent 0a37298b46
commit 44bc67797e
251 changed files with 503 additions and 1430 deletions

View File

@ -4,13 +4,8 @@
/*--- /*---
es5id: 15.2.3.7-0-1 es5id: 15.2.3.7-0-1
description: Object.defineProperties must exist as a function description: Object.defineProperties must exist as a function
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var f = Object.defineProperties; var f = Object.defineProperties;
if (typeof(f) === "function") {
return true; assert.sameValue(typeof(f), "function", 'typeof(f)');
}
}
runTestCase(testcase);

View File

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

View File

@ -4,11 +4,8 @@
/*--- /*---
es5id: 15.2.3.7-2-10 es5id: 15.2.3.7-2-10
description: Object.defineProperties - argument 'Properties' is an Array object description: Object.defineProperties - argument 'Properties' is an Array object
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
var props = []; var props = [];
var result = false; var result = false;
@ -22,6 +19,5 @@ function testcase() {
}); });
Object.defineProperties(obj, props); Object.defineProperties(obj, props);
return result;
} assert(result, 'result !== true');
runTestCase(testcase);

View File

@ -4,11 +4,8 @@
/*--- /*---
es5id: 15.2.3.7-2-12 es5id: 15.2.3.7-2-12
description: Object.defineProperties - argument 'Properties' is a Date object description: Object.defineProperties - argument 'Properties' is a Date object
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
var props = new Date(); var props = new Date();
var result = false; var result = false;
@ -22,6 +19,5 @@ function testcase() {
}); });
Object.defineProperties(obj, props); Object.defineProperties(obj, props);
return result;
} assert(result, 'result !== true');
runTestCase(testcase);

View File

@ -4,11 +4,8 @@
/*--- /*---
es5id: 15.2.3.7-2-13 es5id: 15.2.3.7-2-13
description: Object.defineProperties - argument 'Properties' is a RegExp object description: Object.defineProperties - argument 'Properties' is a RegExp object
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
var props = new RegExp(); var props = new RegExp();
var result = false; var result = false;
@ -22,6 +19,5 @@ function testcase() {
}); });
Object.defineProperties(obj, props); Object.defineProperties(obj, props);
return result;
} assert(result, 'result !== true');
runTestCase(testcase);

View File

@ -4,11 +4,8 @@
/*--- /*---
es5id: 15.2.3.7-2-15 es5id: 15.2.3.7-2-15
description: Object.defineProperties - argument 'Properties' is an Error object description: Object.defineProperties - argument 'Properties' is an Error object
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
var props = new Error("test"); var props = new Error("test");
var obj1 = { var obj1 = {
@ -29,6 +26,5 @@ function testcase() {
}); });
Object.defineProperties(obj, props); Object.defineProperties(obj, props);
return result;
} assert(result, 'result !== true');
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.7-2-16
description: > description: >
Object.defineProperties - argument 'Properties' is the Arguments Object.defineProperties - argument 'Properties' is the Arguments
object object
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
var result = false; var result = false;
@ -28,6 +25,5 @@ function testcase() {
}); });
Object.defineProperties(obj, props); Object.defineProperties(obj, props);
return result;
} assert(result, 'result !== true');
runTestCase(testcase);

View File

@ -6,13 +6,9 @@ es5id: 15.2.3.7-2-3
description: > description: >
Object.defineProperties - argument 'Properties' is a boolean whose Object.defineProperties - argument 'Properties' is a boolean whose
value is false value is false
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
var obj1 = Object.defineProperties(obj, false); var obj1 = Object.defineProperties(obj, false);
return obj === obj1;
} assert.sameValue(obj, obj1, 'obj');
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.7-2-4
description: > description: >
Object.defineProperties - argument 'Properties' is a Boolean Object.defineProperties - argument 'Properties' is a Boolean
object whose primitive value is true object whose primitive value is true
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
var props = new Boolean(true); var props = new Boolean(true);
var result = false; var result = false;
@ -24,6 +21,5 @@ function testcase() {
}); });
Object.defineProperties(obj, props); Object.defineProperties(obj, props);
return result;
} assert(result, 'result !== true');
runTestCase(testcase);

View File

@ -6,14 +6,9 @@ es5id: 15.2.3.7-2-5
description: > description: >
Object.defineProperties - argument 'Properties' is any interesting Object.defineProperties - argument 'Properties' is any interesting
number number
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = { "123": 100 }; var obj = { "123": 100 };
var obj1 = Object.defineProperties(obj, -12); var obj1 = Object.defineProperties(obj, -12);
return obj === obj1;
} assert.sameValue(obj, obj1, 'obj');
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.7-2-6
description: > description: >
Object.defineProperties - argument 'Properties' is a Number object Object.defineProperties - argument 'Properties' is a Number object
whose primitive value is any interesting number whose primitive value is any interesting number
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
var props = new Number(-12); var props = new Number(-12);
var result = false; var result = false;
@ -24,6 +21,5 @@ function testcase() {
}); });
Object.defineProperties(obj, props); Object.defineProperties(obj, props);
return result;
} assert(result, 'result !== true');
runTestCase(testcase);

View File

@ -6,14 +6,9 @@ es5id: 15.2.3.7-2-7
description: > description: >
Object.defineProperties - argument 'Properties' is a string whose Object.defineProperties - argument 'Properties' is a string whose
value is any interesting string value is any interesting string
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = { "123": 100 }; var obj = { "123": 100 };
var obj1 = Object.defineProperties(obj, ""); var obj1 = Object.defineProperties(obj, "");
return obj === obj1;
} assert.sameValue(obj, obj1, 'obj');
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.7-2-8
description: > description: >
Object.defineProperties - argument 'Properties' is a String object Object.defineProperties - argument 'Properties' is a String object
whose primitive value is any interesting string whose primitive value is any interesting string
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
var props = new String(); var props = new String();
var result = false; var result = false;
@ -24,6 +21,5 @@ function testcase() {
}); });
Object.defineProperties(obj, props); Object.defineProperties(obj, props);
return result;
} assert(result, 'result !== true');
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.7-2-9
description: > description: >
Object.defineProperties - argument 'Properties' is a Function Object.defineProperties - argument 'Properties' is a Function
object object
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
var props = function () { }; var props = function () { };
var result = false; var result = false;
@ -24,6 +21,5 @@ function testcase() {
}); });
Object.defineProperties(obj, props); Object.defineProperties(obj, props);
return result;
} assert(result, 'result !== true');
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.7-3-1
description: > description: >
Object.defineProperties - enumerable own data property of Object.defineProperties - enumerable own data property of
'Properties' is defined in 'O' 'Properties' is defined in 'O'
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
var props = {}; var props = {};
Object.defineProperty(props, "prop", { Object.defineProperty(props, "prop", {
@ -20,6 +17,4 @@ function testcase() {
Object.defineProperties(obj, props); Object.defineProperties(obj, props);
return obj.hasOwnProperty("prop"); assert(obj.hasOwnProperty("prop"), 'obj.hasOwnProperty("prop") !== true');
}
runTestCase(testcase);

View File

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

View File

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

View File

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

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.7-3-5
description: > description: >
Object.defineProperties - own accessor property of 'Properties' Object.defineProperties - own accessor property of 'Properties'
which is not enumerable is not defined in 'O' which is not enumerable is not defined in 'O'
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
var props = {}; var props = {};
@ -24,6 +21,4 @@ function testcase() {
Object.defineProperties(obj, props); Object.defineProperties(obj, props);
return !obj.hasOwnProperty("prop"); assert.sameValue(obj.hasOwnProperty("prop"), false, 'obj.hasOwnProperty("prop")');
}
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.7-3-6
description: > description: >
Object.defineProperties - enumerable inherited accessor property Object.defineProperties - enumerable inherited accessor property
of 'Properties' is not defined in 'O' of 'Properties' is not defined in 'O'
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
var proto = {}; var proto = {};
@ -27,6 +24,4 @@ function testcase() {
Object.defineProperties(obj, child); Object.defineProperties(obj, child);
return !obj.hasOwnProperty("prop"); assert.sameValue(obj.hasOwnProperty("prop"), false, 'obj.hasOwnProperty("prop")');
}
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.7-3-7
description: > description: >
Object.defineProperties - no additional property is defined in 'O' Object.defineProperties - no additional property is defined in 'O'
when 'Properties' doesn't contain enumerable own property when 'Properties' doesn't contain enumerable own property
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
var props = {}; var props = {};
@ -29,6 +26,5 @@ function testcase() {
Object.defineProperties(obj, props); Object.defineProperties(obj, props);
return !obj.hasOwnProperty("prop1") && !obj.hasOwnProperty("prop2"); assert.sameValue(obj.hasOwnProperty("prop1"), false, 'obj.hasOwnProperty("prop1")');
} assert.sameValue(obj.hasOwnProperty("prop2"), false, 'obj.hasOwnProperty("prop2")');
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.7-3-8
description: > description: >
Object.defineProperties - no additional property is defined in 'O' Object.defineProperties - no additional property is defined in 'O'
when 'Properties' doesn't contain enumerable own property when 'Properties' doesn't contain enumerable own property
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
var props = {}; var props = {};
@ -29,6 +26,5 @@ function testcase() {
Object.defineProperties(obj, props); Object.defineProperties(obj, props);
return !obj.hasOwnProperty("prop1") && obj.hasOwnProperty("prop2"); assert.sameValue(obj.hasOwnProperty("prop1"), false, 'obj.hasOwnProperty("prop1")');
} assert(obj.hasOwnProperty("prop2"), 'obj.hasOwnProperty("prop2") !== true');
runTestCase(testcase);

View File

@ -7,11 +7,8 @@ description: >
Object.defineProperties - 'P' is own data property that overrides Object.defineProperties - 'P' is own data property that overrides
enumerable inherited data property of 'Properties' is defined in enumerable inherited data property of 'Properties' is defined in
'O' 'O'
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
var proto = {}; var proto = {};
@ -36,6 +33,5 @@ function testcase() {
Object.defineProperties(obj, child); Object.defineProperties(obj, child);
return obj.hasOwnProperty("prop") && obj.prop === 12; assert(obj.hasOwnProperty("prop"), 'obj.hasOwnProperty("prop") !== true');
} assert.sameValue(obj.prop, 12, 'obj.prop');
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.7-5-a-10
description: > description: >
Object.defineProperties - 'Properties' is a Boolean object which Object.defineProperties - 'Properties' is a Boolean object which
implements its own [[Get]] method to get enumerable own property implements its own [[Get]] method to get enumerable own property
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
var props = new Boolean(false); var props = new Boolean(false);
@ -22,6 +19,5 @@ function testcase() {
}); });
Object.defineProperties(obj, props); Object.defineProperties(obj, props);
return obj.hasOwnProperty("prop") && obj.prop === 10; assert(obj.hasOwnProperty("prop"), 'obj.hasOwnProperty("prop") !== true');
} assert.sameValue(obj.prop, 10, 'obj.prop');
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.7-5-a-11
description: > description: >
Object.defineProperties - 'Properties' is a Number object which Object.defineProperties - 'Properties' is a Number object which
implements its own [[Get]] method to get enumerable own property implements its own [[Get]] method to get enumerable own property
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
var props = new Number(-9); var props = new Number(-9);
@ -22,6 +19,5 @@ function testcase() {
}); });
Object.defineProperties(obj, props); Object.defineProperties(obj, props);
return obj.hasOwnProperty("prop") && obj.prop === 12; assert(obj.hasOwnProperty("prop"), 'obj.hasOwnProperty("prop") !== true');
} assert.sameValue(obj.prop, 12, 'obj.prop');
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.7-5-a-13
description: > description: >
Object.defineProperties - 'Properties' is a Date object which Object.defineProperties - 'Properties' is a Date object which
implements its own [[Get]] method to get enumerable own property implements its own [[Get]] method to get enumerable own property
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
var props = new Date(); var props = new Date();
@ -22,6 +19,5 @@ function testcase() {
}); });
Object.defineProperties(obj, props); Object.defineProperties(obj, props);
return obj.hasOwnProperty("prop") && obj.prop === 13; assert(obj.hasOwnProperty("prop"), 'obj.hasOwnProperty("prop") !== true');
} assert.sameValue(obj.prop, 13, 'obj.prop');
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.7-5-a-14
description: > description: >
Object.defineProperties - 'Properties' is a RegExp object which Object.defineProperties - 'Properties' is a RegExp object which
implements its own [[Get]] method to get enumerable own property implements its own [[Get]] method to get enumerable own property
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
var props = new RegExp(); var props = new RegExp();
@ -22,6 +19,5 @@ function testcase() {
}); });
Object.defineProperties(obj, props); Object.defineProperties(obj, props);
return obj.hasOwnProperty("prop") && obj.prop === 14; assert(obj.hasOwnProperty("prop"), 'obj.hasOwnProperty("prop") !== true');
} assert.sameValue(obj.prop, 14, 'obj.prop');
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.7-5-a-16
description: > description: >
Object.defineProperties - 'Properties' is an Error object which Object.defineProperties - 'Properties' is an Error object which
implements its own [[Get]] method to get enumerable own property implements its own [[Get]] method to get enumerable own property
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
var props = new Error("test"); var props = new Error("test");
var obj1 = { var obj1 = {
@ -25,6 +22,5 @@ function testcase() {
}; };
Object.defineProperties(obj, props); Object.defineProperties(obj, props);
return obj.hasOwnProperty("prop") && obj.prop === 16; assert(obj.hasOwnProperty("prop"), 'obj.hasOwnProperty("prop") !== true');
} assert.sameValue(obj.prop, 16, 'obj.prop');
runTestCase(testcase);

View File

@ -7,11 +7,8 @@ description: >
Object.defineProperties - 'Properties' is the Arguments object Object.defineProperties - 'Properties' is the Arguments object
which implements its own [[Get]] method to get enumerable own which implements its own [[Get]] method to get enumerable own
property property
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
var arg; var arg;
@ -28,6 +25,5 @@ function testcase() {
Object.defineProperties(obj, arg); Object.defineProperties(obj, arg);
return obj.hasOwnProperty("prop") && obj.prop === 17; assert(obj.hasOwnProperty("prop"), 'obj.hasOwnProperty("prop") !== true');
} assert.sameValue(obj.prop, 17, 'obj.prop');
runTestCase(testcase);

View File

@ -7,11 +7,8 @@ description: >
Object.defineProperties - 'P' is own data property that overrides Object.defineProperties - 'P' is own data property that overrides
enumerable inherited accessor property of 'Properties' is defined enumerable inherited accessor property of 'Properties' is defined
in 'O' in 'O'
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
var proto = {}; var proto = {};
@ -36,6 +33,5 @@ function testcase() {
}); });
Object.defineProperties(obj, child); Object.defineProperties(obj, child);
return obj.hasOwnProperty("prop") && obj.prop === 12; assert(obj.hasOwnProperty("prop"), 'obj.hasOwnProperty("prop") !== true');
} assert.sameValue(obj.prop, 12, 'obj.prop');
runTestCase(testcase);

View File

@ -7,11 +7,8 @@ description: >
Object.defineProperties - enumerable own accessor property of Object.defineProperties - enumerable own accessor property of
'Properties' that overrides enumerable inherited data property of 'Properties' that overrides enumerable inherited data property of
'Properties' is defined in 'O' 'Properties' is defined in 'O'
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
var proto = {}; var proto = {};
@ -37,6 +34,5 @@ function testcase() {
}); });
Object.defineProperties(obj, child); Object.defineProperties(obj, child);
return obj.hasOwnProperty("prop") && obj.prop === 12; assert(obj.hasOwnProperty("prop"), 'obj.hasOwnProperty("prop") !== true');
} assert.sameValue(obj.prop, 12, 'obj.prop');
runTestCase(testcase);

View File

@ -7,11 +7,8 @@ description: >
Object.defineProperties - enumerable own accessor property of Object.defineProperties - enumerable own accessor property of
'Properties' that overrides enumerable inherited accessor property 'Properties' that overrides enumerable inherited accessor property
of 'Properties' is defined in 'O' of 'Properties' is defined in 'O'
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
var proto = {}; var proto = {};
@ -39,6 +36,5 @@ function testcase() {
}); });
Object.defineProperties(obj, child); Object.defineProperties(obj, child);
return obj.hasOwnProperty("prop") && obj.prop === 12; assert(obj.hasOwnProperty("prop"), 'obj.hasOwnProperty("prop") !== true');
} assert.sameValue(obj.prop, 12, 'obj.prop');
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.7-5-a-5
description: > description: >
Object.defineProperties - enumerable own accessor property of Object.defineProperties - enumerable own accessor property of
'Properties' without a get function is defined in 'O' 'Properties' without a get function is defined in 'O'
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
var props = {}; var props = {};
@ -25,6 +22,5 @@ function testcase() {
Object.defineProperties(obj, props); Object.defineProperties(obj, props);
return obj.hasOwnProperty("prop") && typeof obj.prop === "undefined"; assert(obj.hasOwnProperty("prop"), 'obj.hasOwnProperty("prop") !== true');
} assert.sameValue(typeof obj.prop, "undefined", 'typeof obj.prop');
runTestCase(testcase);

View File

@ -7,11 +7,8 @@ description: >
Object.defineProperties - enumerable own accessor property of Object.defineProperties - enumerable own accessor property of
'Properties' without a get function that overrides enumerable 'Properties' without a get function that overrides enumerable
inherited accessor property of 'Properties' is defined in 'O' inherited accessor property of 'Properties' is defined in 'O'
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
var proto = {}; var proto = {};
@ -37,6 +34,5 @@ function testcase() {
}); });
Object.defineProperties(obj, child); Object.defineProperties(obj, child);
return obj.hasOwnProperty("prop") && typeof obj.prop === "undefined"; assert(obj.hasOwnProperty("prop"), 'obj.hasOwnProperty("prop") !== true');
} assert.sameValue(typeof obj.prop, "undefined", 'typeof obj.prop');
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.7-5-a-7
description: > description: >
Object.defineProperties - 'Properties' is a Function object which Object.defineProperties - 'Properties' is a Function object which
implements its own [[Get]] method to get enumerable own property implements its own [[Get]] method to get enumerable own property
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
var props = function () { }; var props = function () { };
@ -23,6 +20,5 @@ function testcase() {
Object.defineProperties(obj, props); Object.defineProperties(obj, props);
return obj.hasOwnProperty("prop") && obj.prop === 7; assert(obj.hasOwnProperty("prop"), 'obj.hasOwnProperty("prop") !== true');
} assert.sameValue(obj.prop, 7, 'obj.prop');
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.7-5-a-8
description: > description: >
Object.defineProperties - 'Properties' is an Array object which Object.defineProperties - 'Properties' is an Array object which
implements its own [[Get]] method to get enumerable own property implements its own [[Get]] method to get enumerable own property
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
var props = []; var props = [];
var descObj = { var descObj = {
@ -23,6 +20,5 @@ function testcase() {
}); });
Object.defineProperties(obj, props); Object.defineProperties(obj, props);
return obj.hasOwnProperty("prop") && obj.prop === 8; assert(obj.hasOwnProperty("prop"), 'obj.hasOwnProperty("prop") !== true');
} assert.sameValue(obj.prop, 8, 'obj.prop');
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.7-5-a-9
description: > description: >
Object.defineProperties - 'Properties' is a String object which Object.defineProperties - 'Properties' is a String object which
implements its own [[Get]] method to get enumerable own property implements its own [[Get]] method to get enumerable own property
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
var props = new String(); var props = new String();
@ -22,6 +19,5 @@ function testcase() {
}); });
Object.defineProperties(obj, props); Object.defineProperties(obj, props);
return obj.hasOwnProperty("prop") && obj.prop === 9; assert(obj.hasOwnProperty("prop"), 'obj.hasOwnProperty("prop") !== true');
} assert.sameValue(obj.prop, 9, 'obj.prop');
runTestCase(testcase);

View File

@ -7,11 +7,8 @@ description: >
Object.defineProperties - 'enumerable' property of 'descObj' is Object.defineProperties - 'enumerable' property of 'descObj' is
own data property that overrides an inherited data property own data property that overrides an inherited data property
(8.10.5 step 3.a) (8.10.5 step 3.a)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
var accessed = false; var accessed = false;
@ -35,6 +32,5 @@ function testcase() {
accessed = true; accessed = true;
} }
} }
return !accessed;
} assert.sameValue(accessed, false, 'accessed');
runTestCase(testcase);

View File

@ -6,10 +6,8 @@ es5id: 15.2.3.7-5-b-100
description: > description: >
Object.defineProperties - value of 'configurable' property of Object.defineProperties - value of 'configurable' property of
'descObj' is Boolean object (8.10.5 step 4.b) 'descObj' is Boolean object (8.10.5 step 4.b)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
Object.defineProperties(obj, { Object.defineProperties(obj, {
@ -21,6 +19,5 @@ function testcase() {
var preCheck = obj.hasOwnProperty("property"); var preCheck = obj.hasOwnProperty("property");
delete obj.property; delete obj.property;
return preCheck && !obj.hasOwnProperty("property"); assert(preCheck, 'preCheck !== true');
} assert.sameValue(obj.hasOwnProperty("property"), false, 'obj.hasOwnProperty("property")');
runTestCase(testcase);

View File

@ -6,10 +6,8 @@ es5id: 15.2.3.7-5-b-101
description: > description: >
Object.defineProperties - value of 'configurable' property of Object.defineProperties - value of 'configurable' property of
'descObj' is Number object (8.10.5 step 4.b) 'descObj' is Number object (8.10.5 step 4.b)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
Object.defineProperties(obj, { Object.defineProperties(obj, {
@ -20,6 +18,5 @@ function testcase() {
var preCheck = obj.hasOwnProperty("property"); var preCheck = obj.hasOwnProperty("property");
delete obj.property; delete obj.property;
return preCheck && !obj.hasOwnProperty("property"); assert(preCheck, 'preCheck !== true');
} assert.sameValue(obj.hasOwnProperty("property"), false, 'obj.hasOwnProperty("property")');
runTestCase(testcase);

View File

@ -6,10 +6,8 @@ es5id: 15.2.3.7-5-b-102
description: > description: >
Object.defineProperties - value of 'configurable' property of Object.defineProperties - value of 'configurable' property of
'descObj' is the Math object (8.10.5 step 4.b) 'descObj' is the Math object (8.10.5 step 4.b)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
Object.defineProperties(obj, { Object.defineProperties(obj, {
@ -20,6 +18,5 @@ function testcase() {
var preCheck = obj.hasOwnProperty("property"); var preCheck = obj.hasOwnProperty("property");
delete obj.property; delete obj.property;
return preCheck && !obj.hasOwnProperty("property"); assert(preCheck, 'preCheck !== true');
} assert.sameValue(obj.hasOwnProperty("property"), false, 'obj.hasOwnProperty("property")');
runTestCase(testcase);

View File

@ -6,10 +6,8 @@ es5id: 15.2.3.7-5-b-103
description: > description: >
Object.defineProperties - value of 'configurable' property of Object.defineProperties - value of 'configurable' property of
'descObj' is Date object (8.10.5 step 4.b) 'descObj' is Date object (8.10.5 step 4.b)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
Object.defineProperties(obj, { Object.defineProperties(obj, {
@ -20,6 +18,5 @@ function testcase() {
var preCheck = obj.hasOwnProperty("property"); var preCheck = obj.hasOwnProperty("property");
delete obj.property; delete obj.property;
return preCheck && !obj.hasOwnProperty("property"); assert(preCheck, 'preCheck !== true');
} assert.sameValue(obj.hasOwnProperty("property"), false, 'obj.hasOwnProperty("property")');
runTestCase(testcase);

View File

@ -6,10 +6,8 @@ es5id: 15.2.3.7-5-b-104
description: > description: >
Object.defineProperties - value of 'configurable' property of Object.defineProperties - value of 'configurable' property of
'descObj' is RegExp object (8.10.5 step 4.b) 'descObj' is RegExp object (8.10.5 step 4.b)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
Object.defineProperties(obj, { Object.defineProperties(obj, {
@ -20,7 +18,5 @@ function testcase() {
var preCheck = obj.hasOwnProperty("property"); var preCheck = obj.hasOwnProperty("property");
delete obj.property; delete obj.property;
return preCheck && !obj.hasOwnProperty("property"); assert(preCheck, 'preCheck !== true');
assert.sameValue(obj.hasOwnProperty("property"), false, 'obj.hasOwnProperty("property")');
}
runTestCase(testcase);

View File

@ -6,10 +6,8 @@ es5id: 15.2.3.7-5-b-105
description: > description: >
Object.defineProperties - value of 'configurable' property of Object.defineProperties - value of 'configurable' property of
'descObj' is the JSON object (8.10.5 step 4.b) 'descObj' is the JSON object (8.10.5 step 4.b)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
Object.defineProperties(obj, { Object.defineProperties(obj, {
@ -20,6 +18,5 @@ function testcase() {
var preCheck = obj.hasOwnProperty("property"); var preCheck = obj.hasOwnProperty("property");
delete obj.property; delete obj.property;
return preCheck && !obj.hasOwnProperty("property"); assert(preCheck, 'preCheck !== true');
} assert.sameValue(obj.hasOwnProperty("property"), false, 'obj.hasOwnProperty("property")');
runTestCase(testcase);

View File

@ -6,10 +6,8 @@ es5id: 15.2.3.7-5-b-106
description: > description: >
Object.defineProperties - value of 'configurable' property of Object.defineProperties - value of 'configurable' property of
'descObj' is Error object (8.10.5 step 4.b) 'descObj' is Error object (8.10.5 step 4.b)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
Object.defineProperties(obj, { Object.defineProperties(obj, {
@ -20,6 +18,5 @@ function testcase() {
var preCheck = obj.hasOwnProperty("property"); var preCheck = obj.hasOwnProperty("property");
delete obj.property; delete obj.property;
return preCheck && !obj.hasOwnProperty("property"); assert(preCheck, 'preCheck !== true');
} assert.sameValue(obj.hasOwnProperty("property"), false, 'obj.hasOwnProperty("property")');
runTestCase(testcase);

View File

@ -6,10 +6,8 @@ es5id: 15.2.3.7-5-b-107
description: > description: >
Object.defineProperties - value of 'configurable' property of Object.defineProperties - value of 'configurable' property of
'descObj' is the Argument object (8.10.5 step 4.b) 'descObj' is the Argument object (8.10.5 step 4.b)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
var func = function (a, b, c) { var func = function (a, b, c) {
@ -26,7 +24,5 @@ function testcase() {
var preCheck = obj.hasOwnProperty("property"); var preCheck = obj.hasOwnProperty("property");
delete obj.property; delete obj.property;
return preCheck && !obj.hasOwnProperty("property"); assert(preCheck, 'preCheck !== true');
assert.sameValue(obj.hasOwnProperty("property"), false, 'obj.hasOwnProperty("property")');
}
runTestCase(testcase);

View File

@ -6,12 +6,9 @@ es5id: 15.2.3.7-5-b-109
description: > description: >
Object.defineProperties - value of 'configurable' property of Object.defineProperties - value of 'configurable' property of
'descObj' is the global object (8.10.5 step 4.b) 'descObj' is the global object (8.10.5 step 4.b)
includes: includes: [fnGlobalObject.js]
- runTestCase.js
- fnGlobalObject.js
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
Object.defineProperties(obj, { Object.defineProperties(obj, {
@ -22,6 +19,5 @@ function testcase() {
var preCheck = obj.hasOwnProperty("property"); var preCheck = obj.hasOwnProperty("property");
delete obj.property; delete obj.property;
return preCheck && !obj.hasOwnProperty("property"); assert(preCheck, 'preCheck !== true');
} assert.sameValue(obj.hasOwnProperty("property"), false, 'obj.hasOwnProperty("property")');
runTestCase(testcase);

View File

@ -7,11 +7,8 @@ description: >
Object.defineProperties - 'enumerable' property of 'descObj' is Object.defineProperties - 'enumerable' property of 'descObj' is
own data property that overrides an inherited accessor property own data property that overrides an inherited accessor property
(8.10.5 step 3.a) (8.10.5 step 3.a)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
var proto = {}; var proto = {};
var accessed = false; var accessed = false;
@ -39,6 +36,5 @@ function testcase() {
accessed = true; accessed = true;
} }
} }
return !accessed;
} assert.sameValue(accessed, false, 'accessed');
runTestCase(testcase);

View File

@ -7,10 +7,8 @@ description: >
Object.defineProperties - value of 'configurable' property of Object.defineProperties - value of 'configurable' property of
'descObj' is a string (value is 'false') which is treated as true 'descObj' is a string (value is 'false') which is treated as true
value (8.10.5 step 4.b) value (8.10.5 step 4.b)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
Object.defineProperties(obj, { Object.defineProperties(obj, {
@ -21,6 +19,5 @@ function testcase() {
var preCheck = obj.hasOwnProperty("property"); var preCheck = obj.hasOwnProperty("property");
delete obj.property; delete obj.property;
return preCheck && !obj.hasOwnProperty("property"); assert(preCheck, 'preCheck !== true');
} assert.sameValue(obj.hasOwnProperty("property"), false, 'obj.hasOwnProperty("property")');
runTestCase(testcase);

View File

@ -7,10 +7,8 @@ description: >
Object.defineProperties - value of 'configurable' property of Object.defineProperties - value of 'configurable' property of
'descObj' is new Boolean(false) which is treated as true value 'descObj' is new Boolean(false) which is treated as true value
(8.10.5 step 4.b) (8.10.5 step 4.b)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
Object.defineProperties(obj, { Object.defineProperties(obj, {
@ -21,6 +19,5 @@ function testcase() {
var preCheck = obj.hasOwnProperty("property"); var preCheck = obj.hasOwnProperty("property");
delete obj.property; delete obj.property;
return preCheck && !obj.hasOwnProperty("property"); assert(preCheck, 'preCheck !== true');
} assert.sameValue(obj.hasOwnProperty("property"), false, 'obj.hasOwnProperty("property")');
runTestCase(testcase);

View File

@ -6,10 +6,8 @@ es5id: 15.2.3.7-5-b-112
description: > description: >
Object.defineProperties - 'value' property of 'descObj' is present Object.defineProperties - 'value' property of 'descObj' is present
(8.10.5 step 5) (8.10.5 step 5)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
Object.defineProperties(obj, { Object.defineProperties(obj, {
@ -18,6 +16,4 @@ function testcase() {
} }
}); });
return obj.property === 300; assert.sameValue(obj.property, 300, 'obj.property');
}
runTestCase(testcase);

View File

@ -6,10 +6,8 @@ es5id: 15.2.3.7-5-b-113
description: > description: >
Object.defineProperties - 'value' property of 'descObj' is not Object.defineProperties - 'value' property of 'descObj' is not
present (8.10.5 step 5) present (8.10.5 step 5)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
Object.defineProperties(obj, { Object.defineProperties(obj, {
@ -18,6 +16,5 @@ function testcase() {
} }
}); });
return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; assert(obj.hasOwnProperty("property"), 'obj.hasOwnProperty("property") !== true');
} assert.sameValue(typeof (obj.property), "undefined", 'typeof (obj.property)');
runTestCase(testcase);

View File

@ -6,10 +6,8 @@ es5id: 15.2.3.7-5-b-114
description: > description: >
Object.defineProperties - 'value' property of 'descObj' is own Object.defineProperties - 'value' property of 'descObj' is own
data property (8.10.5 step 5.a) data property (8.10.5 step 5.a)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
Object.defineProperties(obj, { Object.defineProperties(obj, {
@ -18,6 +16,4 @@ function testcase() {
} }
}); });
return obj.property === "ownDataProperty"; assert.sameValue(obj.property, "ownDataProperty", 'obj.property');
}
runTestCase(testcase);

View File

@ -6,10 +6,8 @@ es5id: 15.2.3.7-5-b-115
description: > description: >
Object.defineProperties - 'value' property of 'descObj' is Object.defineProperties - 'value' property of 'descObj' is
inherited data property (8.10.5 step 5.a) inherited data property (8.10.5 step 5.a)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
var proto = { var proto = {
@ -25,7 +23,4 @@ function testcase() {
property: descObj property: descObj
}); });
return obj.property === "inheritedDataProperty"; assert.sameValue(obj.property, "inheritedDataProperty", 'obj.property');
}
runTestCase(testcase);

View File

@ -7,10 +7,8 @@ description: >
Object.defineProperties - 'value' property of 'descObj' is own Object.defineProperties - 'value' property of 'descObj' is own
data property that overrides an inherited data property (8.10.5 data property that overrides an inherited data property (8.10.5
step 5.a) step 5.a)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
var proto = { var proto = {
@ -28,7 +26,4 @@ function testcase() {
property: descObj property: descObj
}); });
return obj.property === "ownDataProperty"; assert.sameValue(obj.property, "ownDataProperty", 'obj.property');
}
runTestCase(testcase);

View File

@ -7,10 +7,8 @@ description: >
Object.defineProperties - 'value' property of 'descObj' is own Object.defineProperties - 'value' property of 'descObj' is own
data property that overrides an inherited accessor property 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 obj = {}; var obj = {};
var proto = {}; var proto = {};
@ -34,7 +32,4 @@ function testcase() {
property: descObj property: descObj
}); });
return obj.property === "ownDataProperty"; assert.sameValue(obj.property, "ownDataProperty", 'obj.property');
}
runTestCase(testcase);

View File

@ -6,10 +6,8 @@ es5id: 15.2.3.7-5-b-118
description: > description: >
Object.defineProperties - 'value' property of 'descObj' is own Object.defineProperties - 'value' property of 'descObj' is own
accessor property (8.10.5 step 5.a) accessor property (8.10.5 step 5.a)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
var descObj = {}; var descObj = {};
@ -24,6 +22,4 @@ function testcase() {
property: descObj property: descObj
}); });
return obj.property === "ownAccessorProperty"; assert.sameValue(obj.property, "ownAccessorProperty", 'obj.property');
}
runTestCase(testcase);

View File

@ -6,10 +6,8 @@ es5id: 15.2.3.7-5-b-119
description: > description: >
Object.defineProperties - 'value' property of 'descObj' is Object.defineProperties - 'value' property of 'descObj' is
inherited accessor property (8.10.5 step 5.a) inherited accessor property (8.10.5 step 5.a)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
var proto = {}; var proto = {};
@ -29,7 +27,4 @@ function testcase() {
property: descObj property: descObj
}); });
return obj.property === "inheritedAccessorProperty"; assert.sameValue(obj.property, "inheritedAccessorProperty", 'obj.property');
}
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.7-5-b-12
description: > description: >
Object.defineProperties - 'enumerable' property of 'descObj' is Object.defineProperties - 'enumerable' property of 'descObj' is
own accessor property (8.10.5 step 3.a) own accessor property (8.10.5 step 3.a)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
var accessed = false; var accessed = false;
var descObj = {}; var descObj = {};
@ -29,6 +26,5 @@ function testcase() {
accessed = true; accessed = true;
} }
} }
return accessed;
} assert(accessed, 'accessed !== true');
runTestCase(testcase);

View File

@ -7,10 +7,8 @@ description: >
Object.defineProperties - 'value' property of 'descObj' is own Object.defineProperties - 'value' property of 'descObj' is own
accessor property that overrides an inherited data property 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 obj = {}; var obj = {};
var proto = { var proto = {
@ -33,7 +31,4 @@ function testcase() {
property: descObj property: descObj
}); });
return obj.property === "ownAccessorProperty"; assert.sameValue(obj.property, "ownAccessorProperty", 'obj.property');
}
runTestCase(testcase);

View File

@ -7,10 +7,8 @@ description: >
Object.defineProperties - 'value' property of 'descObj' is own Object.defineProperties - 'value' property of 'descObj' is own
accessor property that overrides an inherited accessor property accessor 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 obj = {}; var obj = {};
var proto = {}; var proto = {};
@ -36,7 +34,4 @@ function testcase() {
property: descObj property: descObj
}); });
return obj.property === "ownAccessorProperty"; assert.sameValue(obj.property, "ownAccessorProperty", 'obj.property');
}
runTestCase(testcase);

View File

@ -6,10 +6,8 @@ es5id: 15.2.3.7-5-b-122
description: > description: >
Object.defineProperties - 'value' property of 'descObj' is own Object.defineProperties - 'value' property of 'descObj' is own
accessor property without a get function (8.10.5 step 5.a) accessor property without a get function (8.10.5 step 5.a)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
var descObj = {}; var descObj = {};
@ -22,6 +20,5 @@ function testcase() {
property: descObj property: descObj
}); });
return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; assert(obj.hasOwnProperty("property"), 'obj.hasOwnProperty("property") !== true');
} assert.sameValue(typeof (obj.property), "undefined", 'typeof (obj.property)');
runTestCase(testcase);

View File

@ -7,10 +7,8 @@ description: >
Object.defineProperties - 'value' property of 'descObj' is own Object.defineProperties - 'value' property of 'descObj' is own
accessor property without a get function that overrides an accessor property without a get function that overrides an
inherited accessor property (8.10.5 step 5.a) inherited accessor property (8.10.5 step 5.a)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
var proto = {}; var proto = {};
@ -34,6 +32,5 @@ function testcase() {
property: descObj property: descObj
}); });
return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; assert(obj.hasOwnProperty("property"), 'obj.hasOwnProperty("property") !== true');
} assert.sameValue(typeof (obj.property), "undefined", 'typeof (obj.property)');
runTestCase(testcase);

View File

@ -7,10 +7,8 @@ description: >
Object.defineProperties - 'value' property of 'descObj' is Object.defineProperties - 'value' property of 'descObj' is
inherited accessor property without a get function (8.10.5 step inherited accessor property without a get function (8.10.5 step
5.a) 5.a)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
var proto = {}; var proto = {};
@ -28,6 +26,5 @@ function testcase() {
property: descObj property: descObj
}); });
return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined"; assert(obj.hasOwnProperty("property"), 'obj.hasOwnProperty("property") !== true');
} assert.sameValue(typeof (obj.property), "undefined", 'typeof (obj.property)');
runTestCase(testcase);

View File

@ -7,10 +7,8 @@ description: >
Object.defineProperties - 'descObj' is a Function object which Object.defineProperties - 'descObj' is a Function object which
implements its own [[Get]] method to get 'value' property (8.10.5 implements its own [[Get]] method to get 'value' property (8.10.5
step 5.a) step 5.a)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
var func = function (a, b) { var func = function (a, b) {
@ -23,6 +21,4 @@ function testcase() {
property: func property: func
}); });
return obj.property === "Function"; assert.sameValue(obj.property, "Function", 'obj.property');
}
runTestCase(testcase);

View File

@ -7,10 +7,8 @@ description: >
Object.defineProperties - 'descObj' is an Array object which Object.defineProperties - 'descObj' is an Array object which
implements its own [[Get]] method to get 'value' property (8.10.5 implements its own [[Get]] method to get 'value' property (8.10.5
step 5.a) step 5.a)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
var arr = [1, 2, 3]; var arr = [1, 2, 3];
@ -21,6 +19,4 @@ function testcase() {
property: arr property: arr
}); });
return obj.property === "Array"; assert.sameValue(obj.property, "Array", 'obj.property');
}
runTestCase(testcase);

View File

@ -7,10 +7,8 @@ description: >
Object.defineProperties - 'descObj' is a String object which Object.defineProperties - 'descObj' is a String object which
implements its own [[Get]] method to get 'value' property (8.10.5 implements its own [[Get]] method to get 'value' property (8.10.5
step 5.a) step 5.a)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
var str = new String("abc"); var str = new String("abc");
@ -21,6 +19,4 @@ function testcase() {
property: str property: str
}); });
return obj.property === "String"; assert.sameValue(obj.property, "String", 'obj.property');
}
runTestCase(testcase);

View File

@ -7,10 +7,8 @@ description: >
Object.defineProperties - 'descObj' is a Boolean object which Object.defineProperties - 'descObj' is a Boolean object which
implements its own [[Get]] method to get 'value' property (8.10.5 implements its own [[Get]] method to get 'value' property (8.10.5
step 5.a) step 5.a)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
var descObj = new Boolean(false); var descObj = new Boolean(false);
@ -21,6 +19,4 @@ function testcase() {
property: descObj property: descObj
}); });
return obj.property === "Boolean"; assert.sameValue(obj.property, "Boolean", 'obj.property');
}
runTestCase(testcase);

View File

@ -7,10 +7,8 @@ description: >
Object.defineProperties - 'descObj' is a Number object which Object.defineProperties - 'descObj' is a Number object which
implements its own [[Get]] method to get 'value' property (8.10.5 implements its own [[Get]] method to get 'value' property (8.10.5
step 5.a) step 5.a)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
var descObj = new Number(-9); var descObj = new Number(-9);
@ -21,6 +19,4 @@ function testcase() {
property: descObj property: descObj
}); });
return obj.property === "Number"; assert.sameValue(obj.property, "Number", 'obj.property');
}
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.7-5-b-13
description: > description: >
Object.defineProperties - 'enumerable' property of 'descObj' is Object.defineProperties - 'enumerable' property of 'descObj' is
inherited accessor property (8.10.5 step 3.a) inherited accessor property (8.10.5 step 3.a)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
var proto = {}; var proto = {};
var accessed = false; var accessed = false;
@ -33,6 +30,5 @@ function testcase() {
accessed = true; accessed = true;
} }
} }
return accessed;
} assert(accessed, 'accessed !== true');
runTestCase(testcase);

View File

@ -7,10 +7,8 @@ description: >
Object.defineProperties - 'descObj' is a Date object which Object.defineProperties - 'descObj' is a Date object which
implements its own [[Get]] method to get 'value' property (8.10.5 implements its own [[Get]] method to get 'value' property (8.10.5
step 5.a) step 5.a)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
var descObj = new Date(); var descObj = new Date();
@ -21,6 +19,4 @@ function testcase() {
property: descObj property: descObj
}); });
return obj.property === "Date"; assert.sameValue(obj.property, "Date", 'obj.property');
}
runTestCase(testcase);

View File

@ -7,10 +7,8 @@ description: >
Object.defineProperties - 'descObj' is a RegExp object which Object.defineProperties - 'descObj' is a RegExp object which
implements its own [[Get]] method to get 'value' property (8.10.5 implements its own [[Get]] method to get 'value' property (8.10.5
step 5.a) step 5.a)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
var descObj = new RegExp(); var descObj = new RegExp();
@ -21,6 +19,4 @@ function testcase() {
property: descObj property: descObj
}); });
return obj.property === "RegExp"; assert.sameValue(obj.property, "RegExp", 'obj.property');
}
runTestCase(testcase);

View File

@ -7,10 +7,8 @@ description: >
Object.defineProperties - 'descObj' is an Error object which Object.defineProperties - 'descObj' is an Error object which
implements its own [[Get]] method to get 'value' property (8.10.5 implements its own [[Get]] method to get 'value' property (8.10.5
step 5.a) step 5.a)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
var descObj = new Error(); var descObj = new Error();
@ -21,6 +19,4 @@ function testcase() {
property: descObj property: descObj
}); });
return obj.property === "Error"; assert.sameValue(obj.property, "Error", 'obj.property');
}
runTestCase(testcase);

View File

@ -7,10 +7,8 @@ description: >
Object.defineProperties - 'descObj' is the Arguments object which Object.defineProperties - 'descObj' is the Arguments object which
implements its own [[Get]] method to get 'value' property (8.10.5 implements its own [[Get]] method to get 'value' property (8.10.5
step 5.a) step 5.a)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
var func = function (a, b) { var func = function (a, b) {
@ -23,6 +21,4 @@ function testcase() {
return obj.property === "arguments"; return obj.property === "arguments";
}; };
return func(); assert(func(), 'func() !== true');
}
runTestCase(testcase);

View File

@ -7,11 +7,8 @@ description: >
Object.defineProperties - 'enumerable' property of 'descObj' is Object.defineProperties - 'enumerable' property of 'descObj' is
own accessor property that overrides an inherited data property own accessor property that overrides an inherited data property
(8.10.5 step 3.a) (8.10.5 step 3.a)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
var accessed = false; var accessed = false;
var proto = { var proto = {
@ -36,6 +33,5 @@ function testcase() {
accessed = true; accessed = true;
} }
} }
return !accessed;
} assert.sameValue(accessed, false, 'accessed');
runTestCase(testcase);

View File

@ -6,10 +6,8 @@ es5id: 15.2.3.7-5-b-145
description: > description: >
Object.defineProperties - 'writable' property of 'descObj' is Object.defineProperties - 'writable' property of 'descObj' is
inherited accessor property (8.10.5 step 6.a) inherited accessor property (8.10.5 step 6.a)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
var proto = {}; var proto = {};
@ -31,6 +29,5 @@ function testcase() {
obj.property = "isWritable"; obj.property = "isWritable";
return obj.hasOwnProperty("property") && obj.property === "isWritable"; assert(obj.hasOwnProperty("property"), 'obj.hasOwnProperty("property") !== true');
} assert.sameValue(obj.property, "isWritable", 'obj.property');
runTestCase(testcase);

View File

@ -7,11 +7,8 @@ description: >
Object.defineProperties - 'enumerable' property of 'descObj' is Object.defineProperties - 'enumerable' property of 'descObj' is
own accessor property that overrides an inherited accessor own accessor property that overrides an inherited accessor
property (8.10.5 step 3.a) property (8.10.5 step 3.a)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
var proto = {}; var proto = {};
var accessed = false; var accessed = false;
@ -39,6 +36,5 @@ function testcase() {
accessed = true; accessed = true;
} }
} }
return !accessed;
} assert.sameValue(accessed, false, 'accessed');
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.7-5-b-16
description: > description: >
Object.defineProperties - 'enumerable' property of 'descObj' is Object.defineProperties - 'enumerable' property of 'descObj' is
own accessor property without a get function (8.10.5 step 3.a) own accessor property without a get function (8.10.5 step 3.a)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
var accessed = false; var accessed = false;
var descObj = {}; var descObj = {};
@ -27,6 +24,5 @@ function testcase() {
accessed = true; accessed = true;
} }
} }
return !accessed;
} assert.sameValue(accessed, false, 'accessed');
runTestCase(testcase);

View File

@ -6,10 +6,8 @@ es5id: 15.2.3.7-5-b-166
description: > description: >
Object.defineProperties - value of 'writable' property of Object.defineProperties - value of 'writable' property of
'descObj' is true (8.10.5 step 6.b) 'descObj' is true (8.10.5 step 6.b)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
Object.defineProperties(obj, { Object.defineProperties(obj, {
@ -20,6 +18,4 @@ function testcase() {
obj.property = "isWritable"; obj.property = "isWritable";
return obj.property === "isWritable"; assert.sameValue(obj.property, "isWritable", 'obj.property');
}
runTestCase(testcase);

View File

@ -7,11 +7,8 @@ description: >
Object.defineProperties - 'enumerable' property of 'descObj' is Object.defineProperties - 'enumerable' property of 'descObj' is
own accessor property without a get function that overrides an own accessor property without a get function that overrides an
inherited accessor property (8.10.5 step 3.a) inherited accessor property (8.10.5 step 3.a)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
var proto = {}; var proto = {};
var accessed = false; var accessed = false;
@ -37,6 +34,5 @@ function testcase() {
accessed = true; accessed = true;
} }
} }
return !accessed;
} assert.sameValue(accessed, false, 'accessed');
runTestCase(testcase);

View File

@ -6,10 +6,8 @@ es5id: 15.2.3.7-5-b-172
description: > description: >
Object.defineProperties - value of 'writable' property of Object.defineProperties - value of 'writable' property of
'descObj' is positive number (8.10.5 step 6.b) 'descObj' is positive number (8.10.5 step 6.b)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
Object.defineProperties(obj, { Object.defineProperties(obj, {
@ -20,6 +18,4 @@ function testcase() {
obj.property = "isWritable"; obj.property = "isWritable";
return obj.property === "isWritable"; assert.sameValue(obj.property, "isWritable", 'obj.property');
}
runTestCase(testcase);

View File

@ -6,10 +6,8 @@ es5id: 15.2.3.7-5-b-173
description: > description: >
Object.defineProperties - value of 'writable' property of Object.defineProperties - value of 'writable' property of
'descObj' is negative number (8.10.5 step 6.b) 'descObj' is negative number (8.10.5 step 6.b)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
Object.defineProperties(obj, { Object.defineProperties(obj, {
@ -20,6 +18,4 @@ function testcase() {
obj.property = "isWritable"; obj.property = "isWritable";
return obj.property === "isWritable"; assert.sameValue(obj.property, "isWritable", 'obj.property');
}
runTestCase(testcase);

View File

@ -6,10 +6,8 @@ es5id: 15.2.3.7-5-b-175
description: > description: >
Object.defineProperties - value of 'writable' property of Object.defineProperties - value of 'writable' property of
'descObj' is non-empty string (8.10.5 step 6.b) 'descObj' is non-empty string (8.10.5 step 6.b)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
Object.defineProperties(obj, { Object.defineProperties(obj, {
@ -20,6 +18,4 @@ function testcase() {
obj.property = "isWritable"; obj.property = "isWritable";
return obj.property === "isWritable"; assert.sameValue(obj.property, "isWritable", 'obj.property');
}
runTestCase(testcase);

View File

@ -6,10 +6,8 @@ es5id: 15.2.3.7-5-b-176
description: > description: >
Object.defineProperties - value of 'writable' property of Object.defineProperties - value of 'writable' property of
'descObj' is Function object (8.10.5 step 6.b) 'descObj' is Function object (8.10.5 step 6.b)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
Object.defineProperties(obj, { Object.defineProperties(obj, {
@ -20,6 +18,4 @@ function testcase() {
obj.property = "isWritable"; obj.property = "isWritable";
return obj.property === "isWritable"; assert.sameValue(obj.property, "isWritable", 'obj.property');
}
runTestCase(testcase);

View File

@ -6,10 +6,8 @@ es5id: 15.2.3.7-5-b-177
description: > description: >
Object.defineProperties - value of 'writable' property of Object.defineProperties - value of 'writable' property of
'descObj' is Array object (8.10.5 step 6.b) 'descObj' is Array object (8.10.5 step 6.b)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
Object.defineProperties(obj, { Object.defineProperties(obj, {
@ -20,6 +18,4 @@ function testcase() {
obj.property = "isWritable"; obj.property = "isWritable";
return obj.property === "isWritable"; assert.sameValue(obj.property, "isWritable", 'obj.property');
}
runTestCase(testcase);

View File

@ -6,10 +6,8 @@ es5id: 15.2.3.7-5-b-178
description: > description: >
Object.defineProperties - value of 'writable' property of Object.defineProperties - value of 'writable' property of
'descObj' is String object (8.10.5 step 6.b) 'descObj' is String object (8.10.5 step 6.b)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
Object.defineProperties(obj, { Object.defineProperties(obj, {
@ -20,6 +18,4 @@ function testcase() {
obj.property = "isWritable"; obj.property = "isWritable";
return obj.property === "isWritable"; assert.sameValue(obj.property, "isWritable", 'obj.property');
}
runTestCase(testcase);

View File

@ -6,10 +6,8 @@ es5id: 15.2.3.7-5-b-179
description: > description: >
Object.defineProperties - value of 'writable' property of Object.defineProperties - value of 'writable' property of
'descObj' is Boolean object (8.10.5 step 6.b) 'descObj' is Boolean object (8.10.5 step 6.b)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
Object.defineProperties(obj, { Object.defineProperties(obj, {
@ -20,6 +18,4 @@ function testcase() {
obj.property = "isWritable"; obj.property = "isWritable";
return obj.property === "isWritable"; assert.sameValue(obj.property, "isWritable", 'obj.property');
}
runTestCase(testcase);

View File

@ -7,11 +7,8 @@ description: >
Object.defineProperties - 'enumerable' property of 'descObj' is Object.defineProperties - 'enumerable' property of 'descObj' is
inherited accessor property without a get function (8.10.5 step inherited accessor property without a get function (8.10.5 step
3.a) 3.a)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
var proto = {}; var proto = {};
var accessed = false; var accessed = false;
@ -32,6 +29,5 @@ function testcase() {
accessed = true; accessed = true;
} }
} }
return !accessed;
} assert.sameValue(accessed, false, 'accessed');
runTestCase(testcase);

View File

@ -6,10 +6,8 @@ es5id: 15.2.3.7-5-b-180
description: > description: >
Object.defineProperties - value of 'writable' property of Object.defineProperties - value of 'writable' property of
'descObj' is Number object (8.10.5 step 6.b) 'descObj' is Number object (8.10.5 step 6.b)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
Object.defineProperties(obj, { Object.defineProperties(obj, {
@ -20,6 +18,4 @@ function testcase() {
obj.property = "isWritable"; obj.property = "isWritable";
return obj.property === "isWritable"; assert.sameValue(obj.property, "isWritable", 'obj.property');
}
runTestCase(testcase);

View File

@ -6,10 +6,8 @@ es5id: 15.2.3.7-5-b-181
description: > description: >
Object.defineProperties - value of 'writable' property of Object.defineProperties - value of 'writable' property of
'descObj' is the Math object (8.10.5 step 6.b) 'descObj' is the Math object (8.10.5 step 6.b)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
Object.defineProperties(obj, { Object.defineProperties(obj, {
@ -20,6 +18,4 @@ function testcase() {
obj.property = "isWritable"; obj.property = "isWritable";
return obj.property === "isWritable"; assert.sameValue(obj.property, "isWritable", 'obj.property');
}
runTestCase(testcase);

View File

@ -6,10 +6,8 @@ es5id: 15.2.3.7-5-b-182
description: > description: >
Object.defineProperties - value of 'writable' property of Object.defineProperties - value of 'writable' property of
'descObj' is Date object (8.10.5 step 6.b) 'descObj' is Date object (8.10.5 step 6.b)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
Object.defineProperties(obj, { Object.defineProperties(obj, {
@ -20,6 +18,4 @@ function testcase() {
obj.property = "isWritable"; obj.property = "isWritable";
return obj.property === "isWritable"; assert.sameValue(obj.property, "isWritable", 'obj.property');
}
runTestCase(testcase);

View File

@ -6,10 +6,8 @@ es5id: 15.2.3.7-5-b-183
description: > description: >
Object.defineProperties - value of 'writable' property of Object.defineProperties - value of 'writable' property of
'descObj' is RegExp object (8.10.5 step 6.b) 'descObj' is RegExp object (8.10.5 step 6.b)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
Object.defineProperties(obj, { Object.defineProperties(obj, {
@ -20,6 +18,4 @@ function testcase() {
obj.property = "isWritable"; obj.property = "isWritable";
return obj.property === "isWritable"; assert.sameValue(obj.property, "isWritable", 'obj.property');
}
runTestCase(testcase);

View File

@ -6,10 +6,8 @@ es5id: 15.2.3.7-5-b-184
description: > description: >
Object.defineProperties - value of 'writable' property of Object.defineProperties - value of 'writable' property of
'descObj' is the JSON object (8.10.5 step 6.b) 'descObj' is the JSON object (8.10.5 step 6.b)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
Object.defineProperties(obj, { Object.defineProperties(obj, {
@ -20,6 +18,4 @@ function testcase() {
obj.property = "isWritable"; obj.property = "isWritable";
return obj.property === "isWritable"; assert.sameValue(obj.property, "isWritable", 'obj.property');
}
runTestCase(testcase);

View File

@ -6,10 +6,8 @@ es5id: 15.2.3.7-5-b-185
description: > description: >
Object.defineProperties - value of 'writable' property of Object.defineProperties - value of 'writable' property of
'descObj' is Error object (8.10.5 step 6.b) 'descObj' is Error object (8.10.5 step 6.b)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
Object.defineProperties(obj, { Object.defineProperties(obj, {
@ -20,6 +18,4 @@ function testcase() {
obj.property = "isWritable"; obj.property = "isWritable";
return obj.property === "isWritable"; assert.sameValue(obj.property, "isWritable", 'obj.property');
}
runTestCase(testcase);

View File

@ -6,10 +6,8 @@ es5id: 15.2.3.7-5-b-186
description: > description: >
Object.defineProperties - value of 'writable' property of Object.defineProperties - value of 'writable' property of
'descObj' is the Argument object (8.10.5 step 6.b) 'descObj' is the Argument object (8.10.5 step 6.b)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
var func = function (a, b, c) { var func = function (a, b, c) {
@ -24,6 +22,4 @@ function testcase() {
obj.property = "isWritable"; obj.property = "isWritable";
return obj.property === "isWritable"; assert.sameValue(obj.property, "isWritable", 'obj.property');
}
runTestCase(testcase);

View File

@ -6,12 +6,9 @@ es5id: 15.2.3.7-5-b-188
description: > description: >
Object.defineProperties - value of 'writable' property of Object.defineProperties - value of 'writable' property of
'descObj' is the global object (8.10.5 step 6.b) 'descObj' is the global object (8.10.5 step 6.b)
includes: includes: [fnGlobalObject.js]
- runTestCase.js
- fnGlobalObject.js
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
Object.defineProperties(obj, { Object.defineProperties(obj, {
@ -22,6 +19,4 @@ function testcase() {
obj.property = "isWritable"; obj.property = "isWritable";
return obj.property === "isWritable"; assert.sameValue(obj.property, "isWritable", 'obj.property');
}
runTestCase(testcase);

View File

@ -7,10 +7,8 @@ description: >
Object.defineProperties - value of 'writable' property of Object.defineProperties - value of 'writable' property of
'descObj' is a string (value is 'false') which is treated as true 'descObj' is a string (value is 'false') which is treated as true
value (8.10.5 step 6.b) value (8.10.5 step 6.b)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
Object.defineProperties(obj, { Object.defineProperties(obj, {
@ -21,6 +19,4 @@ function testcase() {
obj.property = "isWritable"; obj.property = "isWritable";
return obj.property === "isWritable"; assert.sameValue(obj.property, "isWritable", 'obj.property');
}
runTestCase(testcase);

View File

@ -7,11 +7,8 @@ description: >
Object.defineProperties - 'descObj' is a Function object which Object.defineProperties - 'descObj' is a Function object which
implements its own [[Get]] method to get 'enumerable' property implements its own [[Get]] method to get 'enumerable' property
(8.10.5 step 3.a) (8.10.5 step 3.a)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
var descObj = function () { }; var descObj = function () { };
var accessed = false; var accessed = false;
@ -26,6 +23,5 @@ function testcase() {
accessed = true; accessed = true;
} }
} }
return accessed;
} assert(accessed, 'accessed !== true');
runTestCase(testcase);

View File

@ -7,10 +7,8 @@ description: >
Object.defineProperties - value of 'writable' property of Object.defineProperties - value of 'writable' property of
'descObj' is new Boolean(false) which is treated as true value 'descObj' is new Boolean(false) which is treated as true value
(8.10.5 step 6.b) (8.10.5 step 6.b)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
Object.defineProperties(obj, { Object.defineProperties(obj, {
@ -21,6 +19,4 @@ function testcase() {
obj.property = "isWritable"; obj.property = "isWritable";
return obj.property === "isWritable"; assert.sameValue(obj.property, "isWritable", 'obj.property');
}
runTestCase(testcase);

View File

@ -6,10 +6,8 @@ es5id: 15.2.3.7-5-b-191
description: > description: >
Object.defineProperties - 'get' property of 'descObj' is present Object.defineProperties - 'get' property of 'descObj' is present
(8.10.5 step 7) (8.10.5 step 7)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var obj = {}; var obj = {};
var getter = function () { var getter = function () {
@ -22,6 +20,4 @@ function testcase() {
} }
}); });
return obj.property === "present"; assert.sameValue(obj.property, "present", 'obj.property');
}
runTestCase(testcase);

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