mirror of https://github.com/tc39/test262.git
Replace runTestCase with assert helpers [test/built-ins/Object/defineProperty]
This commit is contained in:
parent
c2a61d1735
commit
0a37298b46
|
@ -4,13 +4,8 @@
|
|||
/*---
|
||||
es5id: 15.2.3.6-0-1
|
||||
description: Object.defineProperty must exist as a function
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var f = Object.defineProperty;
|
||||
if (typeof(f) === "function") {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
||||
assert.sameValue(typeof(f), "function", 'typeof(f)');
|
||||
|
|
|
@ -4,12 +4,6 @@
|
|||
/*---
|
||||
es5id: 15.2.3.6-0-2
|
||||
description: Object.defineProperty must exist as a function taking 3 parameters
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
if (Object.defineProperty.length === 3) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert.sameValue(Object.defineProperty.length, 3, 'Object.defineProperty.length');
|
||||
|
|
|
@ -6,14 +6,9 @@ es5id: 15.2.3.6-2-1
|
|||
description: >
|
||||
Object.defineProperty - argument 'P' is undefined that converts to
|
||||
string 'undefined'
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = {};
|
||||
Object.defineProperty(obj, undefined, {});
|
||||
|
||||
return obj.hasOwnProperty("undefined");
|
||||
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert(obj.hasOwnProperty("undefined"), 'obj.hasOwnProperty("undefined") !== true');
|
||||
|
|
|
@ -6,14 +6,9 @@ es5id: 15.2.3.6-2-10
|
|||
description: >
|
||||
Object.defineProperty - argument 'P' is a number that converts to
|
||||
a string (value is a negative number)
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = {};
|
||||
Object.defineProperty(obj, -20, {});
|
||||
|
||||
return obj.hasOwnProperty("-20");
|
||||
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert(obj.hasOwnProperty("-20"), 'obj.hasOwnProperty("-20") !== true');
|
||||
|
|
|
@ -6,14 +6,9 @@ es5id: 15.2.3.6-2-11
|
|||
description: >
|
||||
Object.defineProperty - argument 'P' is a number that converts to
|
||||
a string (value is Infinity)
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = {};
|
||||
Object.defineProperty(obj, Infinity, {});
|
||||
|
||||
return obj.hasOwnProperty("Infinity");
|
||||
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert(obj.hasOwnProperty("Infinity"), 'obj.hasOwnProperty("Infinity") !== true');
|
||||
|
|
|
@ -6,14 +6,9 @@ es5id: 15.2.3.6-2-12
|
|||
description: >
|
||||
Object.defineProperty - argument 'P' is a number that converts to
|
||||
a string (value is +Infinity)
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = {};
|
||||
Object.defineProperty(obj, +Infinity, {});
|
||||
|
||||
return obj.hasOwnProperty("Infinity");
|
||||
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert(obj.hasOwnProperty("Infinity"), 'obj.hasOwnProperty("Infinity") !== true');
|
||||
|
|
|
@ -6,14 +6,9 @@ es5id: 15.2.3.6-2-13
|
|||
description: >
|
||||
Object.defineProperty - argument 'P' is a number that converts to
|
||||
a string (value is -Infinity)
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = {};
|
||||
Object.defineProperty(obj, -Infinity, {});
|
||||
|
||||
return obj.hasOwnProperty("-Infinity");
|
||||
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert(obj.hasOwnProperty("-Infinity"), 'obj.hasOwnProperty("-Infinity") !== true');
|
||||
|
|
|
@ -6,14 +6,9 @@ es5id: 15.2.3.6-2-14
|
|||
description: >
|
||||
Object.defineProperty - argument 'P' is a number that converts to
|
||||
a string (value is 1(following 20 zeros))
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = {};
|
||||
Object.defineProperty(obj, 100000000000000000000, {});
|
||||
|
||||
return obj.hasOwnProperty("100000000000000000000");
|
||||
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert(obj.hasOwnProperty("100000000000000000000"), 'obj.hasOwnProperty("100000000000000000000") !== true');
|
||||
|
|
|
@ -6,14 +6,9 @@ es5id: 15.2.3.6-2-15
|
|||
description: >
|
||||
Object.defineProperty - argument 'P' is a number that converts to
|
||||
a string (value is 1(following 21 zeros))
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = {};
|
||||
Object.defineProperty(obj, 1000000000000000000000, {});
|
||||
|
||||
return obj.hasOwnProperty("1e+21");
|
||||
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert(obj.hasOwnProperty("1e+21"), 'obj.hasOwnProperty("1e+21") !== true');
|
||||
|
|
|
@ -6,14 +6,9 @@ es5id: 15.2.3.6-2-16
|
|||
description: >
|
||||
Object.defineProperty - argument 'P' is a number that converts to
|
||||
a string (value is 1(following 22 zeros))
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = {};
|
||||
Object.defineProperty(obj, 10000000000000000000000, {});
|
||||
|
||||
return obj.hasOwnProperty("1e+22");
|
||||
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert(obj.hasOwnProperty("1e+22"), 'obj.hasOwnProperty("1e+22") !== true');
|
||||
|
|
|
@ -6,14 +6,9 @@ es5id: 15.2.3.6-2-17-1
|
|||
description: >
|
||||
Object.defineProperty - argument 'P' is a number that converts to
|
||||
a string (value is 1)
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = {};
|
||||
Object.defineProperty(obj, 1, {});
|
||||
|
||||
return obj.hasOwnProperty("1");
|
||||
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert(obj.hasOwnProperty("1"), 'obj.hasOwnProperty("1") !== true');
|
||||
|
|
|
@ -6,14 +6,9 @@ es5id: 15.2.3.6-2-17
|
|||
description: >
|
||||
Object.defineProperty - argument 'P' is a number that converts to
|
||||
a string (value is 1e+20)
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = {};
|
||||
Object.defineProperty(obj, 1e+20, {});
|
||||
|
||||
return obj.hasOwnProperty("100000000000000000000");
|
||||
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert(obj.hasOwnProperty("100000000000000000000"), 'obj.hasOwnProperty("100000000000000000000") !== true');
|
||||
|
|
|
@ -6,14 +6,9 @@ es5id: 15.2.3.6-2-18
|
|||
description: >
|
||||
Object.defineProperty - argument 'P' is a number that converts to
|
||||
string (value is 1e+21)
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = {};
|
||||
Object.defineProperty(obj, 1e+21, {});
|
||||
|
||||
return obj.hasOwnProperty("1e+21");
|
||||
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert(obj.hasOwnProperty("1e+21"), 'obj.hasOwnProperty("1e+21") !== true');
|
||||
|
|
|
@ -6,14 +6,9 @@ es5id: 15.2.3.6-2-19
|
|||
description: >
|
||||
Object.defineProperty - argument 'P' is a number that converts to
|
||||
string (value is 1e+22)
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = {};
|
||||
Object.defineProperty(obj, 1e+22, {});
|
||||
|
||||
return obj.hasOwnProperty("1e+22");
|
||||
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert(obj.hasOwnProperty("1e+22"), 'obj.hasOwnProperty("1e+22") !== true');
|
||||
|
|
|
@ -6,14 +6,9 @@ es5id: 15.2.3.6-2-2
|
|||
description: >
|
||||
Object.defineProperty - argument 'P' is null that converts to
|
||||
string 'null'
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = {};
|
||||
Object.defineProperty(obj, null, {});
|
||||
|
||||
return obj.hasOwnProperty("null");
|
||||
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert(obj.hasOwnProperty("null"), 'obj.hasOwnProperty("null") !== true');
|
||||
|
|
|
@ -6,14 +6,9 @@ es5id: 15.2.3.6-2-20
|
|||
description: >
|
||||
Object.defineProperty - argument 'P' is a number that converts to
|
||||
a string (value is 0.000001)
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = {};
|
||||
Object.defineProperty(obj, 0.000001, {});
|
||||
|
||||
return obj.hasOwnProperty("0.000001");
|
||||
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert(obj.hasOwnProperty("0.000001"), 'obj.hasOwnProperty("0.000001") !== true');
|
||||
|
|
|
@ -6,14 +6,9 @@ es5id: 15.2.3.6-2-21
|
|||
description: >
|
||||
Object.defineProperty - argument 'P' is a number that converts to
|
||||
a string (value is 0.0000001)
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = {};
|
||||
Object.defineProperty(obj, 0.0000001, {});
|
||||
|
||||
return obj.hasOwnProperty("1e-7");
|
||||
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert(obj.hasOwnProperty("1e-7"), 'obj.hasOwnProperty("1e-7") !== true');
|
||||
|
|
|
@ -6,14 +6,9 @@ es5id: 15.2.3.6-2-22
|
|||
description: >
|
||||
Object.defineProperty - argument 'P' is a number that converts to
|
||||
a string (value is 0.00000001)
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = {};
|
||||
Object.defineProperty(obj, 0.00000001, {});
|
||||
|
||||
return obj.hasOwnProperty("1e-8");
|
||||
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert(obj.hasOwnProperty("1e-8"), 'obj.hasOwnProperty("1e-8") !== true');
|
||||
|
|
|
@ -6,14 +6,9 @@ es5id: 15.2.3.6-2-23
|
|||
description: >
|
||||
Object.defineProperty - argument 'P' is a number that converts to
|
||||
a string (value is 1e-7)
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = {};
|
||||
Object.defineProperty(obj, 1e-7, {});
|
||||
|
||||
return obj.hasOwnProperty("1e-7");
|
||||
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert(obj.hasOwnProperty("1e-7"), 'obj.hasOwnProperty("1e-7") !== true');
|
||||
|
|
|
@ -6,14 +6,9 @@ es5id: 15.2.3.6-2-24
|
|||
description: >
|
||||
Object.defineProperty - argument 'P' is a number that converts to
|
||||
a string (value is 1e-6)
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = {};
|
||||
Object.defineProperty(obj, 1e-6, {});
|
||||
|
||||
return obj.hasOwnProperty("0.000001");
|
||||
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert(obj.hasOwnProperty("0.000001"), 'obj.hasOwnProperty("0.000001") !== true');
|
||||
|
|
|
@ -6,14 +6,9 @@ es5id: 15.2.3.6-2-25
|
|||
description: >
|
||||
Object.defineProperty - argument 'P' is a number that converts to
|
||||
a string (value is 1e-5)
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = {};
|
||||
Object.defineProperty(obj, 1e-5, {});
|
||||
|
||||
return obj.hasOwnProperty("0.00001");
|
||||
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert(obj.hasOwnProperty("0.00001"), 'obj.hasOwnProperty("0.00001") !== true');
|
||||
|
|
|
@ -6,14 +6,9 @@ es5id: 15.2.3.6-2-26
|
|||
description: >
|
||||
Object.defineProperty - argument 'P' is an integer that converts
|
||||
to a string (value is 123)
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = {};
|
||||
Object.defineProperty(obj, 123, {});
|
||||
|
||||
return obj.hasOwnProperty("123");
|
||||
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert(obj.hasOwnProperty("123"), 'obj.hasOwnProperty("123") !== true');
|
||||
|
|
|
@ -6,14 +6,9 @@ es5id: 15.2.3.6-2-27
|
|||
description: >
|
||||
Object.defineProperty - argument 'P' is a decimal that converts to
|
||||
a string (value is 123.456)
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = {};
|
||||
Object.defineProperty(obj, 123.456, {});
|
||||
|
||||
return obj.hasOwnProperty("123.456");
|
||||
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert(obj.hasOwnProperty("123.456"), 'obj.hasOwnProperty("123.456") !== true');
|
||||
|
|
|
@ -6,14 +6,9 @@ es5id: 15.2.3.6-2-28
|
|||
description: >
|
||||
Object.defineProperty - argument 'P' is a number that converts to
|
||||
a string (value is 1(following 19 zeros).1)
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = {};
|
||||
Object.defineProperty(obj, 10000000000000000000.1, {});
|
||||
|
||||
return obj.hasOwnProperty("10000000000000000000");
|
||||
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert(obj.hasOwnProperty("10000000000000000000"), 'obj.hasOwnProperty("10000000000000000000") !== true');
|
||||
|
|
|
@ -6,14 +6,9 @@ es5id: 15.2.3.6-2-29
|
|||
description: >
|
||||
Object.defineProperty - argument 'P' is a number that converts to
|
||||
a string (value is 1(following 20 zeros).1)
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = {};
|
||||
Object.defineProperty(obj, 100000000000000000000.1, {});
|
||||
|
||||
return obj.hasOwnProperty("100000000000000000000");
|
||||
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert(obj.hasOwnProperty("100000000000000000000"), 'obj.hasOwnProperty("100000000000000000000") !== true');
|
||||
|
|
|
@ -6,14 +6,9 @@ es5id: 15.2.3.6-2-3
|
|||
description: >
|
||||
Object.defineProperty - argument 'P' is a boolean whose value is
|
||||
false
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = {};
|
||||
Object.defineProperty(obj, false, {});
|
||||
|
||||
return obj.hasOwnProperty("false");
|
||||
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert(obj.hasOwnProperty("false"), 'obj.hasOwnProperty("false") !== true');
|
||||
|
|
|
@ -6,14 +6,9 @@ es5id: 15.2.3.6-2-30
|
|||
description: >
|
||||
Object.defineProperty - argument 'P' is a number that converts to
|
||||
a string (value is 1(following 21 zeros).1)
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = {};
|
||||
Object.defineProperty(obj, 1000000000000000000000.1, {});
|
||||
|
||||
return obj.hasOwnProperty("1e+21");
|
||||
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert(obj.hasOwnProperty("1e+21"), 'obj.hasOwnProperty("1e+21") !== true');
|
||||
|
|
|
@ -6,14 +6,9 @@ es5id: 15.2.3.6-2-31
|
|||
description: >
|
||||
Object.defineProperty - argument 'P' is a number that converts to
|
||||
a string (value is 1(following 22 zeros).1)
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = {};
|
||||
Object.defineProperty(obj, 10000000000000000000000.1, {});
|
||||
|
||||
return obj.hasOwnProperty("1e+22");
|
||||
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert(obj.hasOwnProperty("1e+22"), 'obj.hasOwnProperty("1e+22") !== true');
|
||||
|
|
|
@ -6,14 +6,9 @@ es5id: 15.2.3.6-2-32
|
|||
description: >
|
||||
Object.defineProperty - argument 'P' is a number that converts to
|
||||
a string (value is 123.1234567)
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = {};
|
||||
Object.defineProperty(obj, 123.1234567, {});
|
||||
|
||||
return obj.hasOwnProperty("123.1234567");
|
||||
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert(obj.hasOwnProperty("123.1234567"), 'obj.hasOwnProperty("123.1234567") !== true');
|
||||
|
|
|
@ -4,14 +4,9 @@
|
|||
/*---
|
||||
es5id: 15.2.3.6-2-33
|
||||
description: Object.defineProperty - argument 'P' is applied to an empty string
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = {};
|
||||
Object.defineProperty(obj, "", {});
|
||||
|
||||
return obj.hasOwnProperty("");
|
||||
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert(obj.hasOwnProperty(""), 'obj.hasOwnProperty("") !== true');
|
||||
|
|
|
@ -4,14 +4,9 @@
|
|||
/*---
|
||||
es5id: 15.2.3.6-2-34
|
||||
description: Object.defineProperty - argument 'P' is applied to string 'AB \cd'
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = {};
|
||||
Object.defineProperty(obj, "AB\n\\cd", {});
|
||||
|
||||
return obj.hasOwnProperty("AB\n\\cd");
|
||||
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert(obj.hasOwnProperty("AB\n\\cd"), 'obj.hasOwnProperty("AB\n\\cd") !== true');
|
||||
|
|
|
@ -6,14 +6,9 @@ es5id: 15.2.3.6-2-35
|
|||
description: >
|
||||
Object.defineProperty - argument 'P' is applied to string
|
||||
'undefined'
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = {};
|
||||
Object.defineProperty(obj, "undefined", {});
|
||||
|
||||
return obj.hasOwnProperty("undefined");
|
||||
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert(obj.hasOwnProperty("undefined"), 'obj.hasOwnProperty("undefined") !== true');
|
||||
|
|
|
@ -4,14 +4,9 @@
|
|||
/*---
|
||||
es5id: 15.2.3.6-2-36
|
||||
description: Object.defineProperty - argument 'P' is applied to string 'null'
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = {};
|
||||
Object.defineProperty(obj, "null", {});
|
||||
|
||||
return obj.hasOwnProperty("null");
|
||||
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert(obj.hasOwnProperty("null"), 'obj.hasOwnProperty("null") !== true');
|
||||
|
|
|
@ -6,14 +6,9 @@ es5id: 15.2.3.6-2-37
|
|||
description: >
|
||||
Object.defineProperty - argument 'P' is applied to string
|
||||
'123αβπcd'
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = {};
|
||||
Object.defineProperty(obj, "123αβπcd", {});
|
||||
|
||||
return obj.hasOwnProperty("123αβπcd");
|
||||
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert(obj.hasOwnProperty("123αβπcd"), 'obj.hasOwnProperty("123αβπcd") !== true');
|
||||
|
|
|
@ -4,14 +4,9 @@
|
|||
/*---
|
||||
es5id: 15.2.3.6-2-38
|
||||
description: Object.defineProperty - argument 'P' is applied to string '1'
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = {};
|
||||
Object.defineProperty(obj, "1", {});
|
||||
|
||||
return obj.hasOwnProperty("1");
|
||||
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert(obj.hasOwnProperty("1"), 'obj.hasOwnProperty("1") !== true');
|
||||
|
|
|
@ -6,14 +6,9 @@ es5id: 15.2.3.6-2-39
|
|||
description: >
|
||||
Object.defineProperty - argument 'P' is an array that converts to
|
||||
a string
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = {};
|
||||
Object.defineProperty(obj, [1, 2], {});
|
||||
|
||||
return obj.hasOwnProperty("1,2");
|
||||
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert(obj.hasOwnProperty("1,2"), 'obj.hasOwnProperty("1,2") !== true');
|
||||
|
|
|
@ -6,14 +6,9 @@ es5id: 15.2.3.6-2-4
|
|||
description: >
|
||||
Object.defineProperty - argument 'P' is a boolean whose value is
|
||||
true
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = {};
|
||||
Object.defineProperty(obj, true, {});
|
||||
|
||||
return obj.hasOwnProperty("true");
|
||||
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert(obj.hasOwnProperty("true"), 'obj.hasOwnProperty("true") !== true');
|
||||
|
|
|
@ -6,14 +6,9 @@ es5id: 15.2.3.6-2-40
|
|||
description: >
|
||||
Object.defineProperty - argument 'P' is a String Object that
|
||||
converts to a string
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = {};
|
||||
Object.defineProperty(obj, new String("Hello"), {});
|
||||
|
||||
return obj.hasOwnProperty("Hello");
|
||||
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert(obj.hasOwnProperty("Hello"), 'obj.hasOwnProperty("Hello") !== true');
|
||||
|
|
|
@ -6,14 +6,9 @@ es5id: 15.2.3.6-2-41
|
|||
description: >
|
||||
Object.defineProperty - argument 'P' is a Boolean Object that
|
||||
converts to a string
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = {};
|
||||
Object.defineProperty(obj, new Boolean(false), {});
|
||||
|
||||
return obj.hasOwnProperty("false");
|
||||
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert(obj.hasOwnProperty("false"), 'obj.hasOwnProperty("false") !== true');
|
||||
|
|
|
@ -6,14 +6,9 @@ es5id: 15.2.3.6-2-42
|
|||
description: >
|
||||
Object.defineProperty - argument 'P' is a Number Object that
|
||||
converts to a string
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = {};
|
||||
Object.defineProperty(obj, new Number(123), {});
|
||||
|
||||
return obj.hasOwnProperty("123");
|
||||
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert(obj.hasOwnProperty("123"), 'obj.hasOwnProperty("123") !== true');
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 15.2.3.6-2-43
|
|||
description: >
|
||||
Object.defineProperty - argument 'P' is an object that has an own
|
||||
toString method
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = {};
|
||||
|
||||
var ownProp = {
|
||||
|
@ -20,7 +18,4 @@ function testcase() {
|
|||
|
||||
Object.defineProperty(obj, ownProp, {});
|
||||
|
||||
return obj.hasOwnProperty("abc");
|
||||
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert(obj.hasOwnProperty("abc"), 'obj.hasOwnProperty("abc") !== true');
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 15.2.3.6-2-44
|
|||
description: >
|
||||
Object.defineProperty - argument 'P' is an object that has an own
|
||||
valueOf method
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = {};
|
||||
|
||||
var ownProp = {
|
||||
|
@ -21,7 +19,4 @@ function testcase() {
|
|||
|
||||
Object.defineProperty(obj, ownProp, {});
|
||||
|
||||
return obj.hasOwnProperty("abc");
|
||||
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert(obj.hasOwnProperty("abc"), 'obj.hasOwnProperty("abc") !== true');
|
||||
|
|
|
@ -7,10 +7,8 @@ description: >
|
|||
Object.defineProperty - argument 'P' is an object whose toString
|
||||
method returns an object and whose valueOf method returns a
|
||||
primitive value
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = {};
|
||||
var toStringAccessed = false;
|
||||
var valueOfAccessed = false;
|
||||
|
@ -28,6 +26,6 @@ function testcase() {
|
|||
|
||||
Object.defineProperty(obj, ownProp, {});
|
||||
|
||||
return obj.hasOwnProperty("abc") && valueOfAccessed && toStringAccessed;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert(obj.hasOwnProperty("abc"), 'obj.hasOwnProperty("abc") !== true');
|
||||
assert(valueOfAccessed, 'valueOfAccessed !== true');
|
||||
assert(toStringAccessed, 'toStringAccessed !== true');
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 15.2.3.6-2-46
|
|||
description: >
|
||||
Object.defineProperty - argument 'P' is an object that has an own
|
||||
toString and valueOf method
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = {};
|
||||
var toStringAccessed = false;
|
||||
var valueOfAccessed = false;
|
||||
|
@ -26,7 +24,6 @@ function testcase() {
|
|||
};
|
||||
Object.defineProperty(obj, ownProp, {});
|
||||
|
||||
return obj.hasOwnProperty("abc") && !valueOfAccessed && toStringAccessed;
|
||||
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert(obj.hasOwnProperty("abc"), 'obj.hasOwnProperty("abc") !== true');
|
||||
assert.sameValue(valueOfAccessed, false, 'valueOfAccessed');
|
||||
assert(toStringAccessed, 'toStringAccessed !== true');
|
||||
|
|
|
@ -7,10 +7,8 @@ description: >
|
|||
Object.defineProperty - an inherited toString method is invoked
|
||||
when 'P' is an object with an own valueOf and an inherited
|
||||
toString methods
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = {};
|
||||
var toStringAccessed = false;
|
||||
var valueOfAccessed = false;
|
||||
|
@ -33,6 +31,6 @@ function testcase() {
|
|||
|
||||
Object.defineProperty(obj, child, {});
|
||||
|
||||
return obj.hasOwnProperty("test") && !valueOfAccessed && toStringAccessed;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert(obj.hasOwnProperty("test"), 'obj.hasOwnProperty("test") !== true');
|
||||
assert.sameValue(valueOfAccessed, false, 'valueOfAccessed');
|
||||
assert(toStringAccessed, 'toStringAccessed !== true');
|
||||
|
|
|
@ -6,14 +6,9 @@ es5id: 15.2.3.6-2-5
|
|||
description: >
|
||||
Object.defineProperty - argument 'P' is a number that converts to
|
||||
a string (value is NaN)
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = {};
|
||||
Object.defineProperty(obj, NaN, {});
|
||||
|
||||
return obj.hasOwnProperty("NaN");
|
||||
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert(obj.hasOwnProperty("NaN"), 'obj.hasOwnProperty("NaN") !== true');
|
||||
|
|
|
@ -6,14 +6,9 @@ es5id: 15.2.3.6-2-6
|
|||
description: >
|
||||
Object.defineProperty - argument 'P' is a number that converts to
|
||||
a string (value is 0)
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = {};
|
||||
Object.defineProperty(obj, 0, {});
|
||||
|
||||
return obj.hasOwnProperty("0");
|
||||
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert(obj.hasOwnProperty("0"), 'obj.hasOwnProperty("0") !== true');
|
||||
|
|
|
@ -6,14 +6,9 @@ es5id: 15.2.3.6-2-7
|
|||
description: >
|
||||
Object.defineProperty - argument 'P' is a number that converts to
|
||||
a string (value is +0)
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = {};
|
||||
Object.defineProperty(obj, +0, {});
|
||||
|
||||
return obj.hasOwnProperty("0");
|
||||
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert(obj.hasOwnProperty("0"), 'obj.hasOwnProperty("0") !== true');
|
||||
|
|
|
@ -6,14 +6,9 @@ es5id: 15.2.3.6-2-8
|
|||
description: >
|
||||
Object.defineProperty - argument 'P' is a number that converts to
|
||||
a string (value is -0)
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = {};
|
||||
Object.defineProperty(obj, -0, {});
|
||||
|
||||
return obj.hasOwnProperty("0");
|
||||
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert(obj.hasOwnProperty("0"), 'obj.hasOwnProperty("0") !== true');
|
||||
|
|
|
@ -6,14 +6,9 @@ es5id: 15.2.3.6-2-9
|
|||
description: >
|
||||
Object.defineProperty - argument 'P' is a number that converts to
|
||||
a string (value is a positive number)
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = {};
|
||||
Object.defineProperty(obj, 30, {});
|
||||
|
||||
return obj.hasOwnProperty("30");
|
||||
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert(obj.hasOwnProperty("30"), 'obj.hasOwnProperty("30") !== true');
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 15.2.3.6-3-101
|
|||
description: >
|
||||
Object.defineProperty - 'configurable' property in 'Attributes' is
|
||||
true (8.10.5 step 4.b)
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = {};
|
||||
|
||||
Object.defineProperty(obj, "property", { configurable: true });
|
||||
|
@ -20,6 +18,5 @@ function testcase() {
|
|||
|
||||
var afterDeleted = obj.hasOwnProperty("property");
|
||||
|
||||
return beforeDeleted === true && afterDeleted === false;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert.sameValue(beforeDeleted, true, 'beforeDeleted');
|
||||
assert.sameValue(afterDeleted, false, 'afterDeleted');
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 15.2.3.6-3-107
|
|||
description: >
|
||||
Object.defineProperty - 'configurable' property in 'Attributes' is
|
||||
a positive number (8.10.5 step 4.b)
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = {};
|
||||
|
||||
Object.defineProperty(obj, "property", { configurable: 12345 });
|
||||
|
@ -20,6 +18,5 @@ function testcase() {
|
|||
|
||||
var afterDeleted = obj.hasOwnProperty("property");
|
||||
|
||||
return beforeDeleted === true && afterDeleted === false;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert.sameValue(beforeDeleted, true, 'beforeDeleted');
|
||||
assert.sameValue(afterDeleted, false, 'afterDeleted');
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 15.2.3.6-3-108
|
|||
description: >
|
||||
Object.defineProperty - 'configurable' property in 'Attributes' is
|
||||
a negative number (8.10.5 step 4.b)
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = {};
|
||||
|
||||
Object.defineProperty(obj, "property", { configurable: -12345 });
|
||||
|
@ -20,6 +18,5 @@ function testcase() {
|
|||
|
||||
var afterDeleted = obj.hasOwnProperty("property");
|
||||
|
||||
return beforeDeleted === true && afterDeleted === false;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert.sameValue(beforeDeleted, true, 'beforeDeleted');
|
||||
assert.sameValue(afterDeleted, false, 'afterDeleted');
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 15.2.3.6-3-110
|
|||
description: >
|
||||
Object.defineProperty - 'configurable' property in 'Attributes' is
|
||||
a non-empty string (8.10.5 step 4.b)
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = {};
|
||||
|
||||
Object.defineProperty(obj, "property", { configurable: " " });
|
||||
|
@ -20,6 +18,5 @@ function testcase() {
|
|||
|
||||
var afterDeleted = obj.hasOwnProperty("property");
|
||||
|
||||
return beforeDeleted === true && afterDeleted === false;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert.sameValue(beforeDeleted, true, 'beforeDeleted');
|
||||
assert.sameValue(afterDeleted, false, 'afterDeleted');
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 15.2.3.6-3-111
|
|||
description: >
|
||||
Object.defineProperty - 'configurable' property in 'Attributes' is
|
||||
a Function object (8.10.5 step 4.b)
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = {};
|
||||
|
||||
Object.defineProperty(obj, "property", {
|
||||
|
@ -22,6 +20,5 @@ function testcase() {
|
|||
|
||||
var afterDeleted = obj.hasOwnProperty("property");
|
||||
|
||||
return beforeDeleted === true && afterDeleted === false;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert.sameValue(beforeDeleted, true, 'beforeDeleted');
|
||||
assert.sameValue(afterDeleted, false, 'afterDeleted');
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 15.2.3.6-3-112
|
|||
description: >
|
||||
Object.defineProperty - 'configurable' property in 'Attributes' is
|
||||
an Array object (8.10.5 step 4.b)
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = {};
|
||||
|
||||
Object.defineProperty(obj, "property", { configurable: [1, 2, 3] });
|
||||
|
@ -20,6 +18,5 @@ function testcase() {
|
|||
|
||||
var afterDeleted = obj.hasOwnProperty("property");
|
||||
|
||||
return beforeDeleted === true && afterDeleted === false;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert.sameValue(beforeDeleted, true, 'beforeDeleted');
|
||||
assert.sameValue(afterDeleted, false, 'afterDeleted');
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 15.2.3.6-3-113
|
|||
description: >
|
||||
Object.defineProperty - 'configurable' property in 'Attributes' is
|
||||
a String object (8.10.5 step 4.b)
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = {};
|
||||
|
||||
Object.defineProperty(obj, "property", { configurable: new String("bbq") });
|
||||
|
@ -20,6 +18,5 @@ function testcase() {
|
|||
|
||||
var afterDeleted = obj.hasOwnProperty("property");
|
||||
|
||||
return beforeDeleted === true && afterDeleted === false;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert.sameValue(beforeDeleted, true, 'beforeDeleted');
|
||||
assert.sameValue(afterDeleted, false, 'afterDeleted');
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 15.2.3.6-3-114
|
|||
description: >
|
||||
Object.defineProperty - 'configurable' property in 'Attributes' is
|
||||
a Boolean object (8.10.5 step 4.b)
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = {};
|
||||
|
||||
Object.defineProperty(obj, "property", { configurable: new Boolean(true) });
|
||||
|
@ -20,6 +18,5 @@ function testcase() {
|
|||
|
||||
var afterDeleted = obj.hasOwnProperty("property");
|
||||
|
||||
return beforeDeleted === true && afterDeleted === false;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert.sameValue(beforeDeleted, true, 'beforeDeleted');
|
||||
assert.sameValue(afterDeleted, false, 'afterDeleted');
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 15.2.3.6-3-115
|
|||
description: >
|
||||
Object.defineProperty - 'configurable' property in 'Attributes' is
|
||||
a Number object (8.10.5 step 4.b)
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = {};
|
||||
|
||||
Object.defineProperty(obj, "property", { configurable: new Number(0) });
|
||||
|
@ -20,6 +18,5 @@ function testcase() {
|
|||
|
||||
var afterDeleted = obj.hasOwnProperty("property");
|
||||
|
||||
return beforeDeleted === true && afterDeleted === false;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert.sameValue(beforeDeleted, true, 'beforeDeleted');
|
||||
assert.sameValue(afterDeleted, false, 'afterDeleted');
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 15.2.3.6-3-116
|
|||
description: >
|
||||
Object.defineProperty - 'configurable' property in 'Attributes' is
|
||||
the Math object (8.10.5 step 4.b)
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = {};
|
||||
|
||||
Object.defineProperty(obj, "property", { configurable: Math });
|
||||
|
@ -20,6 +18,5 @@ function testcase() {
|
|||
|
||||
var afterDeleted = obj.hasOwnProperty("property");
|
||||
|
||||
return beforeDeleted === true && afterDeleted === false;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert.sameValue(beforeDeleted, true, 'beforeDeleted');
|
||||
assert.sameValue(afterDeleted, false, 'afterDeleted');
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 15.2.3.6-3-117
|
|||
description: >
|
||||
Object.defineProperty - 'configurable' property in 'Attributes' is
|
||||
a Date object (8.10.5 step 4.b)
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = {};
|
||||
|
||||
Object.defineProperty(obj, "property", { configurable: new Date() });
|
||||
|
@ -20,6 +18,5 @@ function testcase() {
|
|||
|
||||
var afterDeleted = obj.hasOwnProperty("property");
|
||||
|
||||
return beforeDeleted === true && afterDeleted === false;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert.sameValue(beforeDeleted, true, 'beforeDeleted');
|
||||
assert.sameValue(afterDeleted, false, 'afterDeleted');
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 15.2.3.6-3-118
|
|||
description: >
|
||||
Object.defineProperty - 'configurable' property in 'Attributes' is
|
||||
a RegExp object (8.10.5 step 4.b)
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = {};
|
||||
|
||||
var attr = {
|
||||
|
@ -24,6 +22,5 @@ function testcase() {
|
|||
|
||||
var afterDeleted = obj.hasOwnProperty("property");
|
||||
|
||||
return beforeDeleted === true && afterDeleted === false;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert.sameValue(beforeDeleted, true, 'beforeDeleted');
|
||||
assert.sameValue(afterDeleted, false, 'afterDeleted');
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 15.2.3.6-3-119
|
|||
description: >
|
||||
Object.defineProperty - 'configurable' property in 'Attributes' is
|
||||
the JSON object (8.10.5 step 4.b)
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = {};
|
||||
|
||||
var attr = {
|
||||
|
@ -24,6 +22,5 @@ function testcase() {
|
|||
|
||||
var afterDeleted = obj.hasOwnProperty("property");
|
||||
|
||||
return beforeDeleted === true && afterDeleted === false;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert.sameValue(beforeDeleted, true, 'beforeDeleted');
|
||||
assert.sameValue(afterDeleted, false, 'afterDeleted');
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 15.2.3.6-3-120
|
|||
description: >
|
||||
Object.defineProperty - 'configurable' property in 'Attributes' is
|
||||
a Error object (8.10.5 step 4.b)
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = {};
|
||||
|
||||
var attr = {
|
||||
|
@ -24,6 +22,5 @@ function testcase() {
|
|||
|
||||
var afterDeleted = obj.hasOwnProperty("property");
|
||||
|
||||
return beforeDeleted === true && afterDeleted === false;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert.sameValue(beforeDeleted, true, 'beforeDeleted');
|
||||
assert.sameValue(afterDeleted, false, 'afterDeleted');
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 15.2.3.6-3-121
|
|||
description: >
|
||||
Object.defineProperty - 'configurable' property in 'Attributes' is
|
||||
the Argument object (8.10.5 step 4.b)
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = {};
|
||||
|
||||
var argObj = (function () { return arguments; })(1, true, "a");
|
||||
|
@ -26,6 +24,5 @@ function testcase() {
|
|||
|
||||
var afterDeleted = obj.hasOwnProperty("property");
|
||||
|
||||
return beforeDeleted === true && afterDeleted === false;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert.sameValue(beforeDeleted, true, 'beforeDeleted');
|
||||
assert.sameValue(afterDeleted, false, 'afterDeleted');
|
||||
|
|
|
@ -6,12 +6,9 @@ es5id: 15.2.3.6-3-123
|
|||
description: >
|
||||
Object.defineProperty - 'configurable' property in 'Attributes' is
|
||||
the global object (8.10.5 step 4.b)
|
||||
includes:
|
||||
- runTestCase.js
|
||||
- fnGlobalObject.js
|
||||
includes: [fnGlobalObject.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = {};
|
||||
|
||||
var attr = {
|
||||
|
@ -26,6 +23,5 @@ function testcase() {
|
|||
|
||||
var afterDeleted = obj.hasOwnProperty("property");
|
||||
|
||||
return beforeDeleted === true && afterDeleted === false;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert.sameValue(beforeDeleted, true, 'beforeDeleted');
|
||||
assert.sameValue(afterDeleted, false, 'afterDeleted');
|
||||
|
|
|
@ -7,10 +7,8 @@ description: >
|
|||
Object.defineProperty - 'configurable' property in 'Attributes' is
|
||||
treated as true when it is a string (value is 'false') (8.10.5
|
||||
step 4.b)
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = {};
|
||||
|
||||
var attr = {
|
||||
|
@ -25,6 +23,5 @@ function testcase() {
|
|||
|
||||
var afterDeleted = obj.hasOwnProperty("property");
|
||||
|
||||
return beforeDeleted === true && afterDeleted === false;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert.sameValue(beforeDeleted, true, 'beforeDeleted');
|
||||
assert.sameValue(afterDeleted, false, 'afterDeleted');
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 15.2.3.6-3-125
|
|||
description: >
|
||||
Object.defineProperty - 'configurable' property in 'Attributes' is
|
||||
treated as true when it is new Boolean(false) (8.10.5 step 4.b)
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = {};
|
||||
|
||||
var attr = {
|
||||
|
@ -24,6 +22,5 @@ function testcase() {
|
|||
|
||||
var afterDeleted = obj.hasOwnProperty("property");
|
||||
|
||||
return beforeDeleted === true && afterDeleted === false;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert.sameValue(beforeDeleted, true, 'beforeDeleted');
|
||||
assert.sameValue(afterDeleted, false, 'afterDeleted');
|
||||
|
|
|
@ -6,16 +6,12 @@ es5id: 15.2.3.6-3-126
|
|||
description: >
|
||||
Object.defineProperty - 'value' property in 'Attributes' is
|
||||
present (8.10.5 step 5)
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = {};
|
||||
|
||||
var attr = { value: 100 };
|
||||
|
||||
Object.defineProperty(obj, "property", attr);
|
||||
|
||||
return obj.property === 100;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert.sameValue(obj.property, 100, 'obj.property');
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 15.2.3.6-3-127
|
|||
description: >
|
||||
Object.defineProperty - 'value' property in 'Attributes' is not
|
||||
present (8.10.5 step 5)
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = { };
|
||||
|
||||
var attr = {
|
||||
|
@ -18,6 +16,5 @@ function testcase() {
|
|||
|
||||
Object.defineProperty(obj, "property", attr);
|
||||
|
||||
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)');
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 15.2.3.6-3-129
|
|||
description: >
|
||||
Object.defineProperty - 'value' property in 'Attributes' is an
|
||||
inherited data property (8.10.5 step 5.a)
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = { };
|
||||
|
||||
var proto = {
|
||||
|
@ -23,6 +21,4 @@ function testcase() {
|
|||
|
||||
Object.defineProperty(obj, "property", child);
|
||||
|
||||
return obj.property === "inheritedDataProperty";
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert.sameValue(obj.property, "inheritedDataProperty", 'obj.property');
|
||||
|
|
|
@ -7,10 +7,8 @@ description: >
|
|||
Object.defineProperty - 'value' property in 'Attributes' 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 = { value: "inheritedDataProperty" };
|
||||
|
@ -24,6 +22,4 @@ function testcase() {
|
|||
|
||||
Object.defineProperty(obj, "property", child);
|
||||
|
||||
return obj.property === "ownDataProperty";
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert.sameValue(obj.property, "ownDataProperty", 'obj.property');
|
||||
|
|
|
@ -7,10 +7,8 @@ description: >
|
|||
Object.defineProperty - 'value' property in 'Attributes' 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 = {};
|
||||
|
@ -31,6 +29,4 @@ function testcase() {
|
|||
|
||||
Object.defineProperty(obj, "property", child);
|
||||
|
||||
return obj.property === "ownDataProperty";
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert.sameValue(obj.property, "ownDataProperty", 'obj.property');
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 15.2.3.6-3-132
|
|||
description: >
|
||||
Object.defineProperty - 'value' property in 'Attributes' is own
|
||||
accessor property (8.10.5 step 5.a)
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = { };
|
||||
|
||||
var attr = {};
|
||||
|
@ -21,6 +19,4 @@ function testcase() {
|
|||
|
||||
Object.defineProperty(obj, "property", attr);
|
||||
|
||||
return obj.property === "ownAccessorProperty";
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert.sameValue(obj.property, "ownAccessorProperty", 'obj.property');
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 15.2.3.6-3-133
|
|||
description: >
|
||||
Object.defineProperty - 'value' property in 'Attributes' is an
|
||||
inherited accessor property (8.10.5 step 5.a)
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = { };
|
||||
|
||||
var proto = {};
|
||||
|
@ -26,6 +24,4 @@ function testcase() {
|
|||
|
||||
Object.defineProperty(obj, "property", child);
|
||||
|
||||
return obj.property === "inheritedAccessorProperty";
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert.sameValue(obj.property, "inheritedAccessorProperty", 'obj.property');
|
||||
|
|
|
@ -7,10 +7,8 @@ description: >
|
|||
Object.defineProperty - 'value' property in 'Attributes' 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 = {
|
||||
|
@ -29,6 +27,4 @@ function testcase() {
|
|||
|
||||
Object.defineProperty(obj, "property", child);
|
||||
|
||||
return obj.property === "ownAccessorProperty";
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert.sameValue(obj.property, "ownAccessorProperty", 'obj.property');
|
||||
|
|
|
@ -7,10 +7,8 @@ description: >
|
|||
Object.defineProperty - 'value' property in 'Attributes' 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 = {};
|
||||
|
@ -32,6 +30,4 @@ function testcase() {
|
|||
|
||||
Object.defineProperty(obj, "property", child);
|
||||
|
||||
return obj.property === "ownAccessorProperty";
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert.sameValue(obj.property, "ownAccessorProperty", 'obj.property');
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 15.2.3.6-3-136
|
|||
description: >
|
||||
Object.defineProperty - 'value' property in 'Attributes' is own
|
||||
accessor property without a get function (8.10.5 step 5.a)
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = {};
|
||||
|
||||
var attr = {};
|
||||
|
@ -19,6 +17,5 @@ function testcase() {
|
|||
|
||||
Object.defineProperty(obj, "property", attr);
|
||||
|
||||
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)');
|
||||
|
|
|
@ -7,10 +7,8 @@ description: >
|
|||
Object.defineProperty - 'value' property in 'Attributes' 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 = {};
|
||||
|
@ -30,6 +28,5 @@ function testcase() {
|
|||
|
||||
Object.defineProperty(obj, "property", child);
|
||||
|
||||
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)');
|
||||
|
|
|
@ -7,10 +7,8 @@ description: >
|
|||
Object.defineProperty - 'value' property in 'Attributes' is an
|
||||
inherited accessor property without a get function (8.10.5 step
|
||||
5.a)
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = { property : 120 };
|
||||
|
||||
var proto = {};
|
||||
|
@ -25,6 +23,5 @@ function testcase() {
|
|||
|
||||
Object.defineProperty(obj, "property", child);
|
||||
|
||||
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)');
|
||||
|
|
|
@ -7,10 +7,8 @@ description: >
|
|||
Object.defineProperty - 'Attributes' is a Function object which
|
||||
implements its own [[Get]] method to access the 'value' property
|
||||
(8.10.5 step 5.a)
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = { };
|
||||
|
||||
var funObj = function (a, b) {
|
||||
|
@ -21,6 +19,4 @@ function testcase() {
|
|||
|
||||
Object.defineProperty(obj, "property", funObj);
|
||||
|
||||
return obj.property === "Function";
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert.sameValue(obj.property, "Function", 'obj.property');
|
||||
|
|
|
@ -7,10 +7,8 @@ description: >
|
|||
Object.defineProperty - 'Attributes' is an Array object that uses
|
||||
Object's [[Get]] method to access the 'value' property (8.10.5
|
||||
step 5.a)
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = { };
|
||||
|
||||
var arrObj = [1, 2, 3];
|
||||
|
@ -19,6 +17,4 @@ function testcase() {
|
|||
|
||||
Object.defineProperty(obj, "property", arrObj);
|
||||
|
||||
return obj.property === "Array";
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert.sameValue(obj.property, "Array", 'obj.property');
|
||||
|
|
|
@ -7,10 +7,8 @@ description: >
|
|||
Object.defineProperty - 'Attributes' is a String object that uses
|
||||
Object's [[Get]] method to access the 'value' property (8.10.5
|
||||
step 5.a)
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = { };
|
||||
|
||||
var strObj = new String("abc");
|
||||
|
@ -19,6 +17,4 @@ function testcase() {
|
|||
|
||||
Object.defineProperty(obj, "property", strObj);
|
||||
|
||||
return obj.property === "String";
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert.sameValue(obj.property, "String", 'obj.property');
|
||||
|
|
|
@ -7,10 +7,8 @@ description: >
|
|||
Object.defineProperty - 'Attributes' is a Boolean object that uses
|
||||
Object's [[Get]] method to access the 'value' property (8.10.5
|
||||
step 5.a)
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = { };
|
||||
|
||||
var boolObj = new Boolean(true);
|
||||
|
@ -19,6 +17,4 @@ function testcase() {
|
|||
|
||||
Object.defineProperty(obj, "property", boolObj);
|
||||
|
||||
return obj.property === "Boolean";
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert.sameValue(obj.property, "Boolean", 'obj.property');
|
||||
|
|
|
@ -7,10 +7,8 @@ description: >
|
|||
Object.defineProperty - 'Attributes' is a Number object that uses
|
||||
Object's [[Get]] method to access the 'value' property (8.10.5
|
||||
step 5.a)
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = { };
|
||||
|
||||
var numObj = new Number(-2);
|
||||
|
@ -19,6 +17,4 @@ function testcase() {
|
|||
|
||||
Object.defineProperty(obj, "property", numObj);
|
||||
|
||||
return obj.property === "Number";
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert.sameValue(obj.property, "Number", 'obj.property');
|
||||
|
|
|
@ -7,10 +7,8 @@ description: >
|
|||
Object.defineProperty - 'Attributes' is a Date object that uses
|
||||
Object's [[Get]] method to access the 'value' property (8.10.5
|
||||
step 5.a)
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = { };
|
||||
|
||||
var dateObj = new Date();
|
||||
|
@ -19,6 +17,4 @@ function testcase() {
|
|||
|
||||
Object.defineProperty(obj, "property", dateObj);
|
||||
|
||||
return obj.property === "Date";
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert.sameValue(obj.property, "Date", 'obj.property');
|
||||
|
|
|
@ -7,10 +7,8 @@ description: >
|
|||
Object.defineProperty - 'Attributes' is a RegExp object that uses
|
||||
Object's [[Get]] method to access the 'value' property (8.10.5
|
||||
step 5.a)
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = { };
|
||||
|
||||
var regObj = new RegExp();
|
||||
|
@ -19,6 +17,4 @@ function testcase() {
|
|||
|
||||
Object.defineProperty(obj, "property", regObj);
|
||||
|
||||
return obj.property === "RegExp";
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert.sameValue(obj.property, "RegExp", 'obj.property');
|
||||
|
|
|
@ -7,10 +7,8 @@ description: >
|
|||
Object.defineProperty - 'Attributes' is an Error object that uses
|
||||
Object's [[Get]] method to access the 'value' property (8.10.5
|
||||
step 5.a)
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = {};
|
||||
|
||||
var errObj = new Error();
|
||||
|
@ -19,6 +17,4 @@ function testcase() {
|
|||
|
||||
Object.defineProperty(obj, "property", errObj);
|
||||
|
||||
return obj.property === "Error";
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert.sameValue(obj.property, "Error", 'obj.property');
|
||||
|
|
|
@ -7,10 +7,8 @@ description: >
|
|||
Object.defineProperty - 'Attributes' is an Arguments object which
|
||||
implements its own [[Get]] method to access the 'value' property
|
||||
(8.10.5 step 5.a)
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = {};
|
||||
|
||||
var argObj = (function () { return arguments; })();
|
||||
|
@ -19,6 +17,4 @@ function testcase() {
|
|||
|
||||
Object.defineProperty(obj, "property", argObj);
|
||||
|
||||
return obj.property === "arguments";
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert.sameValue(obj.property, "arguments", 'obj.property');
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 15.2.3.6-3-154
|
|||
description: >
|
||||
Object.defineProperty - 'writable' property in 'Attributes' is own
|
||||
data property (8.10.5 step 6.a)
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = { };
|
||||
|
||||
var attr = {
|
||||
|
@ -24,6 +22,5 @@ function testcase() {
|
|||
|
||||
var afterWrite = (obj.property === "isWritable");
|
||||
|
||||
return beforeWrite === true && afterWrite === true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert.sameValue(beforeWrite, true, 'beforeWrite');
|
||||
assert.sameValue(afterWrite, true, 'afterWrite');
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 15.2.3.6-3-155
|
|||
description: >
|
||||
Object.defineProperty - 'writable' property in 'Attributes' is an
|
||||
inherited data property (8.10.5 step 6.a)
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = { };
|
||||
|
||||
var proto = {
|
||||
|
@ -29,6 +27,5 @@ function testcase() {
|
|||
|
||||
var afterWrite = (obj.property === "isWritable");
|
||||
|
||||
return beforeWrite === true && afterWrite === true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert.sameValue(beforeWrite, true, 'beforeWrite');
|
||||
assert.sameValue(afterWrite, true, 'afterWrite');
|
||||
|
|
|
@ -7,10 +7,8 @@ description: >
|
|||
Object.defineProperty - 'writable' property in 'Attributes' is own
|
||||
data property that overrides an inherited data property (8.10.5
|
||||
step 6.a)
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = { };
|
||||
|
||||
var proto = {
|
||||
|
@ -31,6 +29,5 @@ function testcase() {
|
|||
|
||||
var afterWrite = (obj.property === "isWritable");
|
||||
|
||||
return beforeWrite === true && afterWrite === true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert.sameValue(beforeWrite, true, 'beforeWrite');
|
||||
assert.sameValue(afterWrite, true, 'afterWrite');
|
||||
|
|
|
@ -7,10 +7,8 @@ description: >
|
|||
Object.defineProperty - 'writable' property in 'Attributes' is own
|
||||
data property that overrides an inherited accessor property
|
||||
(8.10.5 step 6.a)
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = { };
|
||||
|
||||
var proto = { };
|
||||
|
@ -36,6 +34,5 @@ function testcase() {
|
|||
|
||||
var afterWrite = (obj.property === "isWritable");
|
||||
|
||||
return beforeWrite === true && afterWrite === true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert.sameValue(beforeWrite, true, 'beforeWrite');
|
||||
assert.sameValue(afterWrite, true, 'afterWrite');
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 15.2.3.6-3-158
|
|||
description: >
|
||||
Object.defineProperty - 'writable' property in 'Attributes' is own
|
||||
accessor property (8.10.5 step 6.a)
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = { };
|
||||
|
||||
var attr = { };
|
||||
|
@ -27,6 +25,5 @@ function testcase() {
|
|||
|
||||
var afterWrite = (obj.property === "isWritable");
|
||||
|
||||
return beforeWrite === true && afterWrite === true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert.sameValue(beforeWrite, true, 'beforeWrite');
|
||||
assert.sameValue(afterWrite, true, 'afterWrite');
|
||||
|
|
|
@ -6,10 +6,8 @@ es5id: 15.2.3.6-3-159
|
|||
description: >
|
||||
Object.defineProperty - 'writable' property in 'Attributes' is an
|
||||
inherited accessor property (8.10.5 step 6.a)
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = {};
|
||||
|
||||
var proto = {};
|
||||
|
@ -32,6 +30,5 @@ function testcase() {
|
|||
|
||||
var afterWrite = (obj.property === "isWritable");
|
||||
|
||||
return beforeWrite === true && afterWrite === true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert.sameValue(beforeWrite, true, 'beforeWrite');
|
||||
assert.sameValue(afterWrite, true, 'afterWrite');
|
||||
|
|
|
@ -7,10 +7,8 @@ description: >
|
|||
Object.defineProperty - 'writable' property in 'Attributes' is own
|
||||
accessor property that overrides an inherited data property
|
||||
(8.10.5 step 6.a)
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = {};
|
||||
|
||||
var proto = {
|
||||
|
@ -35,6 +33,5 @@ function testcase() {
|
|||
|
||||
var afterWrite = (obj.property === "isWritable");
|
||||
|
||||
return beforeWrite === true && afterWrite === true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert.sameValue(beforeWrite, true, 'beforeWrite');
|
||||
assert.sameValue(afterWrite, true, 'afterWrite');
|
||||
|
|
|
@ -7,10 +7,8 @@ description: >
|
|||
Object.defineProperty - 'writable' property in 'Attributes' is own
|
||||
accessor property that overrides an inherited accessor property
|
||||
(8.10.5 step 6.a)
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = {};
|
||||
|
||||
var proto = {};
|
||||
|
@ -38,6 +36,5 @@ function testcase() {
|
|||
|
||||
var afterWrite = (obj.property === "isWritable");
|
||||
|
||||
return beforeWrite === true && afterWrite === true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert.sameValue(beforeWrite, true, 'beforeWrite');
|
||||
assert.sameValue(afterWrite, true, 'afterWrite');
|
||||
|
|
|
@ -7,10 +7,8 @@ description: >
|
|||
Object.defineProperty - 'Attributes' is a Function object which
|
||||
implements its own [[Get]] method to access the 'writable'
|
||||
property (8.10.5 step 6.a)
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = {};
|
||||
|
||||
var funObj = function (a, b) {
|
||||
|
@ -27,6 +25,5 @@ function testcase() {
|
|||
|
||||
var afterWrite = (obj.property === "isWritable");
|
||||
|
||||
return beforeWrite === true && afterWrite === true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert.sameValue(beforeWrite, true, 'beforeWrite');
|
||||
assert.sameValue(afterWrite, true, 'afterWrite');
|
||||
|
|
|
@ -7,10 +7,8 @@ description: >
|
|||
Object.defineProperty - 'Attributes' is an Array object that uses
|
||||
Object's [[Get]] method to access the 'writable' property (8.10.5
|
||||
step 6.a)
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = { };
|
||||
|
||||
var arrObj = [1, 2, 3];
|
||||
|
@ -25,6 +23,5 @@ function testcase() {
|
|||
|
||||
var afterWrite = (obj.property === "isWritable");
|
||||
|
||||
return beforeWrite === true && afterWrite === true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert.sameValue(beforeWrite, true, 'beforeWrite');
|
||||
assert.sameValue(afterWrite, true, 'afterWrite');
|
||||
|
|
|
@ -7,10 +7,8 @@ description: >
|
|||
Object.defineProperty - 'Attributes' is a String object that uses
|
||||
Object's [[Get]] method to access the 'writable' property (8.10.5
|
||||
step 6.a)
|
||||
includes: [runTestCase.js]
|
||||
---*/
|
||||
|
||||
function testcase() {
|
||||
var obj = {};
|
||||
|
||||
var strObj = new String("abc");
|
||||
|
@ -25,6 +23,5 @@ function testcase() {
|
|||
|
||||
var afterWrite = (obj.property === "isWritable");
|
||||
|
||||
return beforeWrite === true && afterWrite === true;
|
||||
}
|
||||
runTestCase(testcase);
|
||||
assert.sameValue(beforeWrite, true, 'beforeWrite');
|
||||
assert.sameValue(afterWrite, true, 'afterWrite');
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue