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
description: Object.defineProperties must exist as a function
includes: [runTestCase.js]
---*/
function testcase() {
var f = Object.defineProperties;
if (typeof(f) === "function") {
return true;
}
}
runTestCase(testcase);
assert.sameValue(typeof(f), "function", 'typeof(f)');

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

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