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

This commit is contained in:
André Bargull 2015-08-11 17:52:09 +02:00
parent 8d358cbd07
commit ed0a2bad55
291 changed files with 1143 additions and 2587 deletions

View File

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

View File

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

View File

@ -6,11 +6,6 @@ es5id: 15.2.3.3-1-3
description: >
Object.getOwnPropertyDescriptor - TypeError is not thrown when
first param is a boolean
includes: [runTestCase.js]
---*/
function testcase() {
Object.getOwnPropertyDescriptor(true, "foo");
return true;
}
runTestCase(testcase);

View File

@ -6,11 +6,6 @@ es5id: 15.2.3.3-1-4
description: >
Object.getOwnPropertyDescriptor - TypeError is not thrown when
first param is a number
includes: [runTestCase.js]
---*/
function testcase() {
Object.getOwnPropertyDescriptor(-2, "foo");
return true;
}
runTestCase(testcase);

View File

@ -6,11 +6,6 @@ es5id: 15.2.3.3-1
description: >
Object.getOwnPropertyDescriptor does not throw TypeError if type
of first param is not Object
includes: [runTestCase.js]
---*/
function testcase() {
Object.getOwnPropertyDescriptor(0, "foo");
return true;
}
runTestCase(testcase);

View File

@ -6,14 +6,9 @@ es5id: 15.2.3.3-2-1
description: >
Object.getOwnPropertyDescriptor returns undefined for undefined
property name
includes: [runTestCase.js]
---*/
function testcase() {
var o = {};
var desc = Object.getOwnPropertyDescriptor(o, undefined);
if (desc === undefined) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(desc, undefined, 'desc');

View File

@ -6,14 +6,10 @@ es5id: 15.2.3.3-2-10
description: >
Object.getOwnPropertyDescriptor - argument 'P' is a number that
converts to a string (value is -0)
includes: [runTestCase.js]
---*/
function testcase() {
var obj = { "0": 1 };
var desc = Object.getOwnPropertyDescriptor(obj, -0);
return desc.value === 1;
}
runTestCase(testcase);
assert.sameValue(desc.value, 1, 'desc.value');

View File

@ -6,14 +6,10 @@ es5id: 15.2.3.3-2-11
description: >
Object.getOwnPropertyDescriptor - argument 'P' is a number that
converts to a string (value is positive number)
includes: [runTestCase.js]
---*/
function testcase() {
var obj = { "30": 1 };
var desc = Object.getOwnPropertyDescriptor(obj, 30);
return desc.value === 1;
}
runTestCase(testcase);
assert.sameValue(desc.value, 1, 'desc.value');

View File

@ -6,14 +6,10 @@ es5id: 15.2.3.3-2-12
description: >
Object.getOwnPropertyDescriptor - argument 'P' is a number that
converts to a string (value is negative number)
includes: [runTestCase.js]
---*/
function testcase() {
var obj = { "-20": 1 };
var desc = Object.getOwnPropertyDescriptor(obj, -20);
return desc.value === 1;
}
runTestCase(testcase);
assert.sameValue(desc.value, 1, 'desc.value');

View File

@ -6,14 +6,10 @@ es5id: 15.2.3.3-2-13
description: >
Object.getOwnPropertyDescriptor - argument 'P' is a number that
converts to a string (value is Infinity)
includes: [runTestCase.js]
---*/
function testcase() {
var obj = { "Infinity": 1 };
var desc = Object.getOwnPropertyDescriptor(obj, Infinity);
return desc.value === 1;
}
runTestCase(testcase);
assert.sameValue(desc.value, 1, 'desc.value');

View File

@ -6,14 +6,10 @@ es5id: 15.2.3.3-2-14
description: >
Object.getOwnPropertyDescriptor - argument 'P' is a number that
converts to a string (value is +Infinity)
includes: [runTestCase.js]
---*/
function testcase() {
var obj = { "Infinity": 1 };
var desc = Object.getOwnPropertyDescriptor(obj, +Infinity);
return desc.value === 1;
}
runTestCase(testcase);
assert.sameValue(desc.value, 1, 'desc.value');

View File

@ -6,14 +6,10 @@ es5id: 15.2.3.3-2-15
description: >
Object.getOwnPropertyDescriptor - argument 'P' is a number that
converts to a string (value is -Infinity)
includes: [runTestCase.js]
---*/
function testcase() {
var obj = { "-Infinity": 1 };
var desc = Object.getOwnPropertyDescriptor(obj, -Infinity);
return desc.value === 1;
}
runTestCase(testcase);
assert.sameValue(desc.value, 1, 'desc.value');

View File

@ -6,14 +6,10 @@ es5id: 15.2.3.3-2-16
description: >
Object.getOwnPropertyDescriptor - argument 'P' is a number that
converts to a string (value is 1(following 20 zeros))
includes: [runTestCase.js]
---*/
function testcase() {
var obj = { "100000000000000000000": 1 };
var desc = Object.getOwnPropertyDescriptor(obj, 100000000000000000000);
return desc.value === 1;
}
runTestCase(testcase);
assert.sameValue(desc.value, 1, 'desc.value');

View File

@ -6,14 +6,10 @@ es5id: 15.2.3.3-2-17
description: >
Object.getOwnPropertyDescriptor - argument 'P' is a number that
converts to a string (value is 1(following 21 zeros))
includes: [runTestCase.js]
---*/
function testcase() {
var obj = { "1e+21": 1 };
var desc = Object.getOwnPropertyDescriptor(obj, 1000000000000000000000);
return desc.value === 1;
}
runTestCase(testcase);
assert.sameValue(desc.value, 1, 'desc.value');

View File

@ -6,14 +6,10 @@ es5id: 15.2.3.3-2-18
description: >
Object.getOwnPropertyDescriptor - argument 'P' is a number that
converts to a string (value is 1(following 22 zeros))
includes: [runTestCase.js]
---*/
function testcase() {
var obj = { "1e+22": 1 };
var desc = Object.getOwnPropertyDescriptor(obj, 10000000000000000000000);
return desc.value === 1;
}
runTestCase(testcase);
assert.sameValue(desc.value, 1, 'desc.value');

View File

@ -6,14 +6,10 @@ es5id: 15.2.3.3-2-19
description: >
Object.getOwnPropertyDescriptor - argument 'P' is a number that
converts to a string (value is 1e+20)
includes: [runTestCase.js]
---*/
function testcase() {
var obj = { "100000000000000000000": 1 };
var desc = Object.getOwnPropertyDescriptor(obj, 1e+20);
return desc.value === 1;
}
runTestCase(testcase);
assert.sameValue(desc.value, 1, 'desc.value');

View File

@ -6,14 +6,9 @@ es5id: 15.2.3.3-2-2
description: >
Object.getOwnPropertyDescriptor returns undefined for null
property name
includes: [runTestCase.js]
---*/
function testcase() {
var o = {};
var desc = Object.getOwnPropertyDescriptor(o, null);
if (desc === undefined) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(desc, undefined, 'desc');

View File

@ -6,14 +6,10 @@ es5id: 15.2.3.3-2-20
description: >
Object.getOwnPropertyDescriptor - argument 'P' is a number that
converts to string (value is 1e+21)
includes: [runTestCase.js]
---*/
function testcase() {
var obj = { "1e+21": 1 };
var desc = Object.getOwnPropertyDescriptor(obj, 1e+21);
return desc.value === 1;
}
runTestCase(testcase);
assert.sameValue(desc.value, 1, 'desc.value');

View File

@ -6,14 +6,10 @@ es5id: 15.2.3.3-2-21
description: >
Object.getOwnPropertyDescriptor - argument 'P' is a number that
converts to a string (value is 1e+22)
includes: [runTestCase.js]
---*/
function testcase() {
var obj = { "1e+22": 1 };
var desc = Object.getOwnPropertyDescriptor(obj, 1e+22);
return desc.value === 1;
}
runTestCase(testcase);
assert.sameValue(desc.value, 1, 'desc.value');

View File

@ -6,14 +6,10 @@ es5id: 15.2.3.3-2-22
description: >
Object.getOwnPropertyDescriptor - argument 'P' is a number that
converts to a string (value is 0.000001)
includes: [runTestCase.js]
---*/
function testcase() {
var obj = { "0.000001": 1 };
var desc = Object.getOwnPropertyDescriptor(obj, 0.000001);
return desc.value === 1;
}
runTestCase(testcase);
assert.sameValue(desc.value, 1, 'desc.value');

View File

@ -6,14 +6,10 @@ es5id: 15.2.3.3-2-23
description: >
Object.getOwnPropertyDescriptor - argument 'P' is a number that
converts to a string (value is 0.0000001)
includes: [runTestCase.js]
---*/
function testcase() {
var obj = { "1e-7": 1 };
var desc = Object.getOwnPropertyDescriptor(obj, 0.0000001);
return desc.value === 1;
}
runTestCase(testcase);
assert.sameValue(desc.value, 1, 'desc.value');

View File

@ -6,14 +6,10 @@ es5id: 15.2.3.3-2-24
description: >
Object.getOwnPropertyDescriptor - argument 'P' is a number that
converts to a string (value is 0.00000001)
includes: [runTestCase.js]
---*/
function testcase() {
var obj = { "1e-8": 1 };
var desc = Object.getOwnPropertyDescriptor(obj, 0.00000001);
return desc.value === 1;
}
runTestCase(testcase);
assert.sameValue(desc.value, 1, 'desc.value');

View File

@ -6,14 +6,10 @@ es5id: 15.2.3.3-2-25
description: >
Object.getOwnPropertyDescriptor - argument 'P' is a number that
converts to a string (value is 1e-7)
includes: [runTestCase.js]
---*/
function testcase() {
var obj = { "1e-7": 1 };
var desc = Object.getOwnPropertyDescriptor(obj, 1e-7);
return desc.value === 1;
}
runTestCase(testcase);
assert.sameValue(desc.value, 1, 'desc.value');

View File

@ -6,14 +6,10 @@ es5id: 15.2.3.3-2-26
description: >
Object.getOwnPropertyDescriptor - argument 'P' is a number that
converts to a string (value is 1e-6)
includes: [runTestCase.js]
---*/
function testcase() {
var obj = { "0.000001": 1 };
var desc = Object.getOwnPropertyDescriptor(obj, 1e-6);
return desc.value === 1;
}
runTestCase(testcase);
assert.sameValue(desc.value, 1, 'desc.value');

View File

@ -6,14 +6,10 @@ es5id: 15.2.3.3-2-27
description: >
Object.getOwnPropertyDescriptor - argument 'P' is a number that
converts to a string (value is 1e-5)
includes: [runTestCase.js]
---*/
function testcase() {
var obj = { "0.00001": 1 };
var desc = Object.getOwnPropertyDescriptor(obj, 1e-5);
return desc.value === 1;
}
runTestCase(testcase);
assert.sameValue(desc.value, 1, 'desc.value');

View File

@ -6,14 +6,10 @@ es5id: 15.2.3.3-2-28
description: >
Object.getOwnPropertyDescriptor - argument 'P' is an integer that
converts to a string (value is 123)
includes: [runTestCase.js]
---*/
function testcase() {
var obj = { "123": 1 };
var desc = Object.getOwnPropertyDescriptor(obj, 123);
return desc.value === 1;
}
runTestCase(testcase);
assert.sameValue(desc.value, 1, 'desc.value');

View File

@ -6,14 +6,10 @@ es5id: 15.2.3.3-2-29
description: >
Object.getOwnPropertyDescriptor - argument 'P' is a decimal that
converts to a string (value is 123.456)
includes: [runTestCase.js]
---*/
function testcase() {
var obj = { "123.456": 1 };
var desc = Object.getOwnPropertyDescriptor(obj, 123.456);
return desc.value === 1;
}
runTestCase(testcase);
assert.sameValue(desc.value, 1, 'desc.value');

View File

@ -4,15 +4,12 @@
/*---
es5id: 15.2.3.3-2-3
description: Object.getOwnPropertyDescriptor - argument 'P' is undefined
includes: [runTestCase.js]
---*/
function testcase() {
var obj = { "undefined": 1 };
var desc1 = Object.getOwnPropertyDescriptor(obj, undefined);
var desc2 = Object.getOwnPropertyDescriptor(obj, "undefined");
return desc1.value === 1 && desc2.value === 1;
}
runTestCase(testcase);
assert.sameValue(desc1.value, 1, 'desc1.value');
assert.sameValue(desc2.value, 1, 'desc2.value');

View File

@ -6,14 +6,11 @@ es5id: 15.2.3.3-2-30
description: >
Object.getOwnPropertyDescriptor - argument 'P' is a number that
converts to a string (value is 100000000000000000000.123)
includes: [runTestCase.js]
---*/
function testcase() {
var obj = { "100000000000000000000": 1 };
var desc = Object.getOwnPropertyDescriptor(obj, 100000000000000000000.123);
return typeof desc !== "undefined" && desc.value === 1;
}
runTestCase(testcase);
assert(typeof desc !== "undefined", 'typeof desc !== "undefined" !== true');
assert.sameValue(desc.value, 1, 'desc.value');

View File

@ -6,14 +6,10 @@ es5id: 15.2.3.3-2-31
description: >
Object.getOwnPropertyDescriptor - argument 'P' is a number that
converts to a string (value is 123.1234567)
includes: [runTestCase.js]
---*/
function testcase() {
var obj = { "123.1234567": 1 };
var desc = Object.getOwnPropertyDescriptor(obj, 123.1234567);
return desc.value === 1;
}
runTestCase(testcase);
assert.sameValue(desc.value, 1, 'desc.value');

View File

@ -6,14 +6,10 @@ es5id: 15.2.3.3-2-32
description: >
Object.getOwnPropertyDescriptor - argument 'P' is applied to an
empty string
includes: [runTestCase.js]
---*/
function testcase() {
var obj = { "": 1 };
var desc = Object.getOwnPropertyDescriptor(obj, "");
return desc.value === 1;
}
runTestCase(testcase);
assert.sameValue(desc.value, 1, 'desc.value');

View File

@ -6,14 +6,10 @@ es5id: 15.2.3.3-2-33
description: >
Object.getOwnPropertyDescriptor - argument 'P' is applied to
string 'AB \cd'
includes: [runTestCase.js]
---*/
function testcase() {
var obj = { "AB\n\\cd": 1 };
var desc = Object.getOwnPropertyDescriptor(obj, "AB\n\\cd");
return desc.value === 1;
}
runTestCase(testcase);
assert.sameValue(desc.value, 1, 'desc.value');

View File

@ -6,14 +6,10 @@ es5id: 15.2.3.3-2-34
description: >
Object.getOwnPropertyDescriptor - argument 'P' is applied to
string 'undefined'
includes: [runTestCase.js]
---*/
function testcase() {
var obj = { "undefined": 1 };
var desc = Object.getOwnPropertyDescriptor(obj, "undefined");
return desc.value === 1;
}
runTestCase(testcase);
assert.sameValue(desc.value, 1, 'desc.value');

View File

@ -6,14 +6,10 @@ es5id: 15.2.3.3-2-35
description: >
Object.getOwnPropertyDescriptor - argument 'P' is applied to
string 'null'
includes: [runTestCase.js]
---*/
function testcase() {
var obj = { "null": 1 };
var desc = Object.getOwnPropertyDescriptor(obj, "null");
return desc.value === 1;
}
runTestCase(testcase);
assert.sameValue(desc.value, 1, 'desc.value');

View File

@ -6,14 +6,10 @@ es5id: 15.2.3.3-2-36
description: >
Object.getOwnPropertyDescriptor - argument 'P' is applied to
string '123<32><33><EFBFBD>¦<EFBFBD>cd'
includes: [runTestCase.js]
---*/
function testcase() {
var obj = { "123<32><33><EFBFBD>¦<EFBFBD>cd": 1 };
var desc = Object.getOwnPropertyDescriptor(obj, "123<32><33><EFBFBD>¦<EFBFBD>cd");
return desc.value === 1;
}
runTestCase(testcase);
assert.sameValue(desc.value, 1, 'desc.value');

View File

@ -6,14 +6,10 @@ es5id: 15.2.3.3-2-37
description: >
Object.getOwnPropertyDescriptor - argument 'P' is applied to
string '1'
includes: [runTestCase.js]
---*/
function testcase() {
var obj = { "1": 1 };
var desc = Object.getOwnPropertyDescriptor(obj, 1);
return desc.value === 1;
}
runTestCase(testcase);
assert.sameValue(desc.value, 1, 'desc.value');

View File

@ -6,14 +6,10 @@ es5id: 15.2.3.3-2-38
description: >
Object.getOwnPropertyDescriptor - argument 'P' is an array that
converts to a string
includes: [runTestCase.js]
---*/
function testcase() {
var obj = { "1": 1 };
var desc = Object.getOwnPropertyDescriptor(obj, [1]);
return desc.value === 1;
}
runTestCase(testcase);
assert.sameValue(desc.value, 1, 'desc.value');

View File

@ -6,14 +6,10 @@ es5id: 15.2.3.3-2-39
description: >
Object.getOwnPropertyDescriptor - argument 'P' is a String Object
that converts to a string
includes: [runTestCase.js]
---*/
function testcase() {
var obj = { "Hello": 1 };
var desc = Object.getOwnPropertyDescriptor(obj, new String("Hello"));
return desc.value === 1;
}
runTestCase(testcase);
assert.sameValue(desc.value, 1, 'desc.value');

View File

@ -6,14 +6,10 @@ es5id: 15.2.3.3-2-4
description: >
Object.getOwnPropertyDescriptor - argument 'P' is null that
converts to string 'null'
includes: [runTestCase.js]
---*/
function testcase() {
var obj = { "null": 1 };
var desc = Object.getOwnPropertyDescriptor(obj, null);
return desc.value === 1;
}
runTestCase(testcase);
assert.sameValue(desc.value, 1, 'desc.value');

View File

@ -6,14 +6,10 @@ es5id: 15.2.3.3-2-40
description: >
Object.getOwnPropertyDescriptor - argument 'P' is a Boolean Object
that converts to a string
includes: [runTestCase.js]
---*/
function testcase() {
var obj = { "true": 1 };
var desc = Object.getOwnPropertyDescriptor(obj, new Boolean(true));
return desc.value === 1;
}
runTestCase(testcase);
assert.sameValue(desc.value, 1, 'desc.value');

View File

@ -6,14 +6,10 @@ es5id: 15.2.3.3-2-41
description: >
Object.getOwnPropertyDescriptor - argument 'P' is a Number Object
that converts to a string
includes: [runTestCase.js]
---*/
function testcase() {
var obj = { "123": 1 };
var desc = Object.getOwnPropertyDescriptor(obj, new Number(123));
return desc.value === 1;
}
runTestCase(testcase);
assert.sameValue(desc.value, 1, 'desc.value');

View File

@ -6,10 +6,8 @@ es5id: 15.2.3.3-2-42
description: >
Object.getOwnPropertyDescriptor - argument 'P' is an object which
has an own toString method
includes: [runTestCase.js]
---*/
function testcase() {
var obj = { "abc": 1 };
var ownProp = {
@ -20,6 +18,4 @@ function testcase() {
var desc = Object.getOwnPropertyDescriptor(obj, ownProp);
return desc.value === 1;
}
runTestCase(testcase);
assert.sameValue(desc.value, 1, 'desc.value');

View File

@ -6,10 +6,8 @@ es5id: 15.2.3.3-2-43
description: >
Object.getOwnPropertyDescriptor - argument 'P' is an object which
has an own valueOf method
includes: [runTestCase.js]
---*/
function testcase() {
var obj = { "[object Object]": 1, "abc" : 2 };
var ownProp = {
@ -20,6 +18,4 @@ function testcase() {
var desc = Object.getOwnPropertyDescriptor(obj, ownProp);
return desc.value === 1;
}
runTestCase(testcase);
assert.sameValue(desc.value, 1, 'desc.value');

View File

@ -7,10 +7,8 @@ description: >
Object.getOwnPropertyDescriptor - argument 'P' is an object that
has an own toString method that returns an object and toValue
method that returns a primitive value
includes: [runTestCase.js]
---*/
function testcase() {
var obj = { "abc": 1 };
var valueOfAccessed = false;
var toStringAccessed = false;
@ -28,6 +26,6 @@ function testcase() {
var desc = Object.getOwnPropertyDescriptor(obj, ownProp);
return desc.value === 1 && valueOfAccessed && toStringAccessed;
}
runTestCase(testcase);
assert.sameValue(desc.value, 1, 'desc.value');
assert(valueOfAccessed, 'valueOfAccessed !== true');
assert(toStringAccessed, 'toStringAccessed !== true');

View File

@ -6,10 +6,8 @@ es5id: 15.2.3.3-2-45
description: >
Object.getOwnPropertyDescriptor - argument 'P' is an object which
has an own toString and valueOf method
includes: [runTestCase.js]
---*/
function testcase() {
var obj = { "bbq": 1, "abc": 2 };
var valueOfAccessed = false;
@ -25,6 +23,5 @@ function testcase() {
var desc = Object.getOwnPropertyDescriptor(obj, ownProp);
return desc.value === 1 && !valueOfAccessed;
}
runTestCase(testcase);
assert.sameValue(desc.value, 1, 'desc.value');
assert.sameValue(valueOfAccessed, false, 'valueOfAccessed');

View File

@ -7,10 +7,8 @@ description: >
Object.getOwnPropertyDescriptor - uses inherited toString method
when 'P' is an object with an own valueOf and inherited toString
methods
includes: [runTestCase.js]
---*/
function testcase() {
var proto = {};
var valueOfAccessed = false;
var toStringAccessed = false;
@ -31,6 +29,6 @@ function testcase() {
var obj = { "10": "length1", "test": "length2" };
var desc = Object.getOwnPropertyDescriptor(obj, child);
return desc.value === "length2" && toStringAccessed && !valueOfAccessed;
}
runTestCase(testcase);
assert.sameValue(desc.value, "length2", 'desc.value');
assert(toStringAccessed, 'toStringAccessed !== true');
assert.sameValue(valueOfAccessed, false, 'valueOfAccessed');

View File

@ -6,14 +6,10 @@ es5id: 15.2.3.3-2-5
description: >
Object.getOwnPropertyDescriptor - argument 'P' is a boolean whose
value is false
includes: [runTestCase.js]
---*/
function testcase() {
var obj = { "false": 1 };
var desc = Object.getOwnPropertyDescriptor(obj, false);
return desc.value === 1;
}
runTestCase(testcase);
assert.sameValue(desc.value, 1, 'desc.value');

View File

@ -6,14 +6,10 @@ es5id: 15.2.3.3-2-6
description: >
Object.getOwnPropertyDescriptor - argument 'P' is a boolean whose
value is true
includes: [runTestCase.js]
---*/
function testcase() {
var obj = { "true": 1 };
var desc = Object.getOwnPropertyDescriptor(obj, true);
return desc.value === 1;
}
runTestCase(testcase);
assert.sameValue(desc.value, 1, 'desc.value');

View File

@ -6,14 +6,10 @@ es5id: 15.2.3.3-2-7
description: >
Object.getOwnPropertyDescriptor - argument 'P' is a number that
converts to a string (value is NaN)
includes: [runTestCase.js]
---*/
function testcase() {
var obj = { "NaN": 1 };
var desc = Object.getOwnPropertyDescriptor(obj, NaN);
return desc.value === 1;
}
runTestCase(testcase);
assert.sameValue(desc.value, 1, 'desc.value');

View File

@ -6,14 +6,10 @@ es5id: 15.2.3.3-2-8
description: >
Object.getOwnPropertyDescriptor - argument 'P' is a number that
converts to a string (value is 0)
includes: [runTestCase.js]
---*/
function testcase() {
var obj = { "0": 1 };
var desc = Object.getOwnPropertyDescriptor(obj, 0);
return desc.value === 1;
}
runTestCase(testcase);
assert.sameValue(desc.value, 1, 'desc.value');

View File

@ -6,14 +6,10 @@ es5id: 15.2.3.3-2-9
description: >
Object.getOwnPropertyDescriptor - argument 'P' is a number that
converts to a string (value is +0)
includes: [runTestCase.js]
---*/
function testcase() {
var obj = { "0": 1 };
var desc = Object.getOwnPropertyDescriptor(obj, +0);
return desc.value === 1;
}
runTestCase(testcase);
assert.sameValue(desc.value, 1, 'desc.value');

View File

@ -4,17 +4,12 @@
/*---
es5id: 15.2.3.3-3-1
description: Object.getOwnPropertyDescriptor - 'P' is own data property
includes: [runTestCase.js]
---*/
function testcase() {
var obj = {
property: "ownDataProperty"
};
var desc = Object.getOwnPropertyDescriptor(obj, "property");
return desc.value === "ownDataProperty";
}
runTestCase(testcase);
assert.sameValue(desc.value, "ownDataProperty", 'desc.value');

View File

@ -4,17 +4,12 @@
/*---
es5id: 15.2.3.3-3-10
description: Object.getOwnPropertyDescriptor - 'P' is not an existing property
includes: [runTestCase.js]
---*/
function testcase() {
var obj = {
property: "ownDataProperty"
};
var desc = Object.getOwnPropertyDescriptor(obj, "propertyNonExist");
return typeof desc === "undefined";
}
runTestCase(testcase);
assert.sameValue(typeof desc, "undefined", 'typeof desc');

View File

@ -6,17 +6,15 @@ es5id: 15.2.3.3-3-13
description: >
Object.getOwnPropertyDescriptor applied to the Arguments object
which implements its own property get method
includes: [runTestCase.js]
---*/
function testcase() {
var arg = (function () {
return arguments;
}("ownProperty", true));
var desc = Object.getOwnPropertyDescriptor(arg, "0");
return desc.value === "ownProperty" && desc.writable === true && desc.enumerable === true && desc.configurable === true;
}
runTestCase(testcase);
assert.sameValue(desc.value, "ownProperty", 'desc.value');
assert.sameValue(desc.writable, true, 'desc.writable');
assert.sameValue(desc.enumerable, true, 'desc.enumerable');
assert.sameValue(desc.configurable, true, 'desc.configurable');

View File

@ -6,15 +6,10 @@ es5id: 15.2.3.3-3-14
description: >
Object.getOwnPropertyDescriptor applied to a String object which
implements its own property get method
includes: [runTestCase.js]
---*/
function testcase() {
var str = new String("123");
var desc = Object.getOwnPropertyDescriptor(str, "2");
return desc.value === "3";
}
runTestCase(testcase);
assert.sameValue(desc.value, "3", 'desc.value');

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.3-3-15
description: >
Object.getOwnPropertyDescriptor applied to a Function object which
implements its own property get method
includes: [runTestCase.js]
---*/
function testcase() {
var obj = function (a, b) {
return a + b;
};
@ -18,6 +15,4 @@ function testcase() {
var desc = Object.getOwnPropertyDescriptor(obj, "1");
return desc.value === "ownProperty";
}
runTestCase(testcase);
assert.sameValue(desc.value, "ownProperty", 'desc.value');

View File

@ -4,11 +4,8 @@
/*---
es5id: 15.2.3.3-3-2
description: Object.getOwnPropertyDescriptor - 'P' is inherited data property
includes: [runTestCase.js]
---*/
function testcase() {
var proto = {
property: "inheritedDataProperty"
};
@ -20,6 +17,4 @@ function testcase() {
var desc = Object.getOwnPropertyDescriptor(child, "property");
return typeof desc === "undefined";
}
runTestCase(testcase);
assert.sameValue(typeof desc, "undefined", 'typeof desc');

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.3-3-3
description: >
Object.getOwnPropertyDescriptor - 'P' is own data property that
overrides an inherited data property
includes: [runTestCase.js]
---*/
function testcase() {
var proto = {
property: "inheritedDataProperty"
};
@ -23,6 +20,4 @@ function testcase() {
var desc = Object.getOwnPropertyDescriptor(child, "property");
return desc.value === "ownDataProperty";
}
runTestCase(testcase);
assert.sameValue(desc.value, "ownDataProperty", 'desc.value');

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.3-3-4
description: >
Object.getOwnPropertyDescriptor - 'P' is own data property that
overrides an inherited accessor property
includes: [runTestCase.js]
---*/
function testcase() {
var proto = {};
Object.defineProperty(proto, "property", {
get: function () {
@ -30,6 +27,4 @@ function testcase() {
var desc = Object.getOwnPropertyDescriptor(child, "property");
return desc.value === "ownDataProperty";
}
runTestCase(testcase);
assert.sameValue(desc.value, "ownDataProperty", 'desc.value');

View File

@ -4,11 +4,8 @@
/*---
es5id: 15.2.3.3-3-5
description: Object.getOwnPropertyDescriptor - 'P' is own accessor property
includes: [runTestCase.js]
---*/
function testcase() {
var obj = {};
var fun = function () {
return "ownAccessorProperty";
@ -20,6 +17,4 @@ function testcase() {
var desc = Object.getOwnPropertyDescriptor(obj, "property");
return desc.get === fun;
}
runTestCase(testcase);
assert.sameValue(desc.get, fun, 'desc.get');

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.3-3-6
description: >
Object.getOwnPropertyDescriptor - 'P' is inherited accessor
property
includes: [runTestCase.js]
---*/
function testcase() {
var proto = {};
var fun = function () {
return "ownAccessorProperty";
@ -27,6 +24,4 @@ function testcase() {
var desc = Object.getOwnPropertyDescriptor(child, "property");
return typeof desc === "undefined";
}
runTestCase(testcase);
assert.sameValue(typeof desc, "undefined", 'typeof desc');

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.3-3-7
description: >
Object.getOwnPropertyDescriptor - 'P' is own accessor property
that overrides an inherited data property
includes: [runTestCase.js]
---*/
function testcase() {
var proto = {
property: "inheritedDataProperty"
};
@ -29,6 +26,4 @@ function testcase() {
var desc = Object.getOwnPropertyDescriptor(child, "property");
return desc.get === fun;
}
runTestCase(testcase);
assert.sameValue(desc.get, fun, 'desc.get');

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.3-3-8
description: >
Object.getOwnPropertyDescriptor - 'P' is own accessor property
that overrides an inherited accessor property
includes: [runTestCase.js]
---*/
function testcase() {
var proto = {};
Object.defineProperty(proto, "property", {
get: function () {
@ -33,6 +30,4 @@ function testcase() {
var desc = Object.getOwnPropertyDescriptor(child, "property");
return desc.get === fun;
}
runTestCase(testcase);
assert.sameValue(desc.get, fun, 'desc.get');

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.3-3-9
description: >
Object.getOwnPropertyDescriptor - 'P' is own accessor property
without a get function
includes: [runTestCase.js]
---*/
function testcase() {
var obj = {};
var fun = function () { };
Object.defineProperty(obj, "property", {
@ -20,6 +17,4 @@ function testcase() {
var desc = Object.getOwnPropertyDescriptor(obj, "property");
return desc.set === fun;
}
runTestCase(testcase);
assert.sameValue(desc.set, fun, 'desc.set');

View File

@ -6,21 +6,16 @@ es5id: 15.2.3.3-4-1
description: >
Object.getOwnPropertyDescriptor returns an object representing a
data desc for valid data valued properties
includes: [runTestCase.js]
---*/
function testcase() {
var o = {};
o["foo"] = 101;
var desc = Object.getOwnPropertyDescriptor(o, "foo");
if (desc.value === 101 &&
desc.enumerable === true &&
desc.writable === true &&
desc.configurable === true &&
!desc.hasOwnProperty("get") &&
!desc.hasOwnProperty("set")) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(desc.value, 101, 'desc.value');
assert.sameValue(desc.enumerable, true, 'desc.enumerable');
assert.sameValue(desc.writable, true, 'desc.writable');
assert.sameValue(desc.configurable, true, 'desc.configurable');
assert.sameValue(desc.hasOwnProperty("get"), false, 'desc.hasOwnProperty("get")');
assert.sameValue(desc.hasOwnProperty("set"), false, 'desc.hasOwnProperty("set")');

View File

@ -6,19 +6,13 @@ es5id: 15.2.3.3-4-10
description: >
Object.getOwnPropertyDescriptor returns data desc for functions on
built-ins (Global.decodeURIComponent)
includes:
- runTestCase.js
- fnGlobalObject.js
includes: [fnGlobalObject.js]
---*/
function testcase() {
var global = fnGlobalObject();
var desc = Object.getOwnPropertyDescriptor(global, "decodeURIComponent");
if (desc.value === global.decodeURIComponent &&
desc.writable === true &&
desc.enumerable === false &&
desc.configurable === true) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(desc.value, global.decodeURIComponent, 'desc.value');
assert.sameValue(desc.writable, true, 'desc.writable');
assert.sameValue(desc.enumerable, false, 'desc.enumerable');
assert.sameValue(desc.configurable, true, 'desc.configurable');

View File

@ -6,16 +6,11 @@ es5id: 15.2.3.3-4-100
description: >
Object.getOwnPropertyDescriptor returns data desc for functions on
built-ins (Math.atan2)
includes: [runTestCase.js]
---*/
function testcase() {
var desc = Object.getOwnPropertyDescriptor(Math, "atan2");
if (desc.value === Math.atan2 &&
desc.writable === true &&
desc.enumerable === false &&
desc.configurable === true) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(desc.value, Math.atan2, 'desc.value');
assert.sameValue(desc.writable, true, 'desc.writable');
assert.sameValue(desc.enumerable, false, 'desc.enumerable');
assert.sameValue(desc.configurable, true, 'desc.configurable');

View File

@ -6,16 +6,11 @@ es5id: 15.2.3.3-4-101
description: >
Object.getOwnPropertyDescriptor returns data desc for functions on
built-ins (Math.ceil)
includes: [runTestCase.js]
---*/
function testcase() {
var desc = Object.getOwnPropertyDescriptor(Math, "ceil");
if (desc.value === Math.ceil &&
desc.writable === true &&
desc.enumerable === false &&
desc.configurable === true) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(desc.value, Math.ceil, 'desc.value');
assert.sameValue(desc.writable, true, 'desc.writable');
assert.sameValue(desc.enumerable, false, 'desc.enumerable');
assert.sameValue(desc.configurable, true, 'desc.configurable');

View File

@ -6,16 +6,11 @@ es5id: 15.2.3.3-4-102
description: >
Object.getOwnPropertyDescriptor returns data desc for functions on
built-ins (Math.cos)
includes: [runTestCase.js]
---*/
function testcase() {
var desc = Object.getOwnPropertyDescriptor(Math, "cos");
if (desc.value === Math.cos &&
desc.writable === true &&
desc.enumerable === false &&
desc.configurable === true) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(desc.value, Math.cos, 'desc.value');
assert.sameValue(desc.writable, true, 'desc.writable');
assert.sameValue(desc.enumerable, false, 'desc.enumerable');
assert.sameValue(desc.configurable, true, 'desc.configurable');

View File

@ -6,16 +6,11 @@ es5id: 15.2.3.3-4-103
description: >
Object.getOwnPropertyDescriptor returns data desc for functions on
built-ins (Math.exp)
includes: [runTestCase.js]
---*/
function testcase() {
var desc = Object.getOwnPropertyDescriptor(Math, "exp");
if (desc.value === Math.exp &&
desc.writable === true &&
desc.enumerable === false &&
desc.configurable === true) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(desc.value, Math.exp, 'desc.value');
assert.sameValue(desc.writable, true, 'desc.writable');
assert.sameValue(desc.enumerable, false, 'desc.enumerable');
assert.sameValue(desc.configurable, true, 'desc.configurable');

View File

@ -6,16 +6,11 @@ es5id: 15.2.3.3-4-104
description: >
Object.getOwnPropertyDescriptor returns data desc for functions on
built-ins (Math.floor)
includes: [runTestCase.js]
---*/
function testcase() {
var desc = Object.getOwnPropertyDescriptor(Math, "floor");
if (desc.value === Math.floor &&
desc.writable === true &&
desc.enumerable === false &&
desc.configurable === true) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(desc.value, Math.floor, 'desc.value');
assert.sameValue(desc.writable, true, 'desc.writable');
assert.sameValue(desc.enumerable, false, 'desc.enumerable');
assert.sameValue(desc.configurable, true, 'desc.configurable');

View File

@ -6,16 +6,11 @@ es5id: 15.2.3.3-4-105
description: >
Object.getOwnPropertyDescriptor returns data desc for functions on
built-ins (Math.log)
includes: [runTestCase.js]
---*/
function testcase() {
var desc = Object.getOwnPropertyDescriptor(Math, "log");
if (desc.value === Math.log &&
desc.writable === true &&
desc.enumerable === false &&
desc.configurable === true) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(desc.value, Math.log, 'desc.value');
assert.sameValue(desc.writable, true, 'desc.writable');
assert.sameValue(desc.enumerable, false, 'desc.enumerable');
assert.sameValue(desc.configurable, true, 'desc.configurable');

View File

@ -6,16 +6,11 @@ es5id: 15.2.3.3-4-106
description: >
Object.getOwnPropertyDescriptor returns data desc for functions on
built-ins (Math.max)
includes: [runTestCase.js]
---*/
function testcase() {
var desc = Object.getOwnPropertyDescriptor(Math, "max");
if (desc.value === Math.max &&
desc.writable === true &&
desc.enumerable === false &&
desc.configurable === true) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(desc.value, Math.max, 'desc.value');
assert.sameValue(desc.writable, true, 'desc.writable');
assert.sameValue(desc.enumerable, false, 'desc.enumerable');
assert.sameValue(desc.configurable, true, 'desc.configurable');

View File

@ -6,16 +6,11 @@ es5id: 15.2.3.3-4-107
description: >
Object.getOwnPropertyDescriptor returns data desc for functions on
built-ins (Math.min)
includes: [runTestCase.js]
---*/
function testcase() {
var desc = Object.getOwnPropertyDescriptor(Math, "min");
if (desc.value === Math.min &&
desc.writable === true &&
desc.enumerable === false &&
desc.configurable === true) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(desc.value, Math.min, 'desc.value');
assert.sameValue(desc.writable, true, 'desc.writable');
assert.sameValue(desc.enumerable, false, 'desc.enumerable');
assert.sameValue(desc.configurable, true, 'desc.configurable');

View File

@ -6,16 +6,11 @@ es5id: 15.2.3.3-4-108
description: >
Object.getOwnPropertyDescriptor returns data desc for functions on
built-ins (Math.pow)
includes: [runTestCase.js]
---*/
function testcase() {
var desc = Object.getOwnPropertyDescriptor(Math, "pow");
if (desc.value === Math.pow &&
desc.writable === true &&
desc.enumerable === false &&
desc.configurable === true) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(desc.value, Math.pow, 'desc.value');
assert.sameValue(desc.writable, true, 'desc.writable');
assert.sameValue(desc.enumerable, false, 'desc.enumerable');
assert.sameValue(desc.configurable, true, 'desc.configurable');

View File

@ -6,16 +6,11 @@ es5id: 15.2.3.3-4-109
description: >
Object.getOwnPropertyDescriptor returns data desc for functions on
built-ins (Math.random)
includes: [runTestCase.js]
---*/
function testcase() {
var desc = Object.getOwnPropertyDescriptor(Math, "random");
if (desc.value === Math.random &&
desc.writable === true &&
desc.enumerable === false &&
desc.configurable === true) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(desc.value, Math.random, 'desc.value');
assert.sameValue(desc.writable, true, 'desc.writable');
assert.sameValue(desc.enumerable, false, 'desc.enumerable');
assert.sameValue(desc.configurable, true, 'desc.configurable');

View File

@ -6,19 +6,13 @@ es5id: 15.2.3.3-4-11
description: >
Object.getOwnPropertyDescriptor returns data desc for functions on
built-ins (Global.encodeURIComponent)
includes:
- runTestCase.js
- fnGlobalObject.js
includes: [fnGlobalObject.js]
---*/
function testcase() {
var global = fnGlobalObject();
var desc = Object.getOwnPropertyDescriptor(global, "encodeURIComponent");
if (desc.value === global.encodeURIComponent &&
desc.writable === true &&
desc.enumerable === false &&
desc.configurable === true) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(desc.value, global.encodeURIComponent, 'desc.value');
assert.sameValue(desc.writable, true, 'desc.writable');
assert.sameValue(desc.enumerable, false, 'desc.enumerable');
assert.sameValue(desc.configurable, true, 'desc.configurable');

View File

@ -6,16 +6,11 @@ es5id: 15.2.3.3-4-110
description: >
Object.getOwnPropertyDescriptor returns data desc for functions on
built-ins (Math.round)
includes: [runTestCase.js]
---*/
function testcase() {
var desc = Object.getOwnPropertyDescriptor(Math, "round");
if (desc.value === Math.round &&
desc.writable === true &&
desc.enumerable === false &&
desc.configurable === true) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(desc.value, Math.round, 'desc.value');
assert.sameValue(desc.writable, true, 'desc.writable');
assert.sameValue(desc.enumerable, false, 'desc.enumerable');
assert.sameValue(desc.configurable, true, 'desc.configurable');

View File

@ -6,16 +6,11 @@ es5id: 15.2.3.3-4-111
description: >
Object.getOwnPropertyDescriptor returns data desc for functions on
built-ins (Math.sin)
includes: [runTestCase.js]
---*/
function testcase() {
var desc = Object.getOwnPropertyDescriptor(Math, "sin");
if (desc.value === Math.sin &&
desc.writable === true &&
desc.enumerable === false &&
desc.configurable === true) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(desc.value, Math.sin, 'desc.value');
assert.sameValue(desc.writable, true, 'desc.writable');
assert.sameValue(desc.enumerable, false, 'desc.enumerable');
assert.sameValue(desc.configurable, true, 'desc.configurable');

View File

@ -6,16 +6,11 @@ es5id: 15.2.3.3-4-112
description: >
Object.getOwnPropertyDescriptor returns data desc for functions on
built-ins (Math.sqrt)
includes: [runTestCase.js]
---*/
function testcase() {
var desc = Object.getOwnPropertyDescriptor(Math, "sqrt");
if (desc.value === Math.sqrt &&
desc.writable === true &&
desc.enumerable === false &&
desc.configurable === true) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(desc.value, Math.sqrt, 'desc.value');
assert.sameValue(desc.writable, true, 'desc.writable');
assert.sameValue(desc.enumerable, false, 'desc.enumerable');
assert.sameValue(desc.configurable, true, 'desc.configurable');

View File

@ -6,16 +6,11 @@ es5id: 15.2.3.3-4-113
description: >
Object.getOwnPropertyDescriptor returns data desc for functions on
built-ins (Math.tan)
includes: [runTestCase.js]
---*/
function testcase() {
var desc = Object.getOwnPropertyDescriptor(Math, "tan");
if (desc.value === Math.tan &&
desc.writable === true &&
desc.enumerable === false &&
desc.configurable === true) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(desc.value, Math.tan, 'desc.value');
assert.sameValue(desc.writable, true, 'desc.writable');
assert.sameValue(desc.enumerable, false, 'desc.enumerable');
assert.sameValue(desc.configurable, true, 'desc.configurable');

View File

@ -6,16 +6,11 @@ es5id: 15.2.3.3-4-114
description: >
Object.getOwnPropertyDescriptor returns data desc for functions on
built-ins (Date.parse)
includes: [runTestCase.js]
---*/
function testcase() {
var desc = Object.getOwnPropertyDescriptor(Date, "parse");
if (desc.value === Date.parse &&
desc.writable === true &&
desc.enumerable === false &&
desc.configurable === true) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(desc.value, Date.parse, 'desc.value');
assert.sameValue(desc.writable, true, 'desc.writable');
assert.sameValue(desc.enumerable, false, 'desc.enumerable');
assert.sameValue(desc.configurable, true, 'desc.configurable');

View File

@ -6,16 +6,11 @@ es5id: 15.2.3.3-4-115
description: >
Object.getOwnPropertyDescriptor returns data desc for functions on
built-ins (Date.UTC)
includes: [runTestCase.js]
---*/
function testcase() {
var desc = Object.getOwnPropertyDescriptor(Date, "UTC");
if (desc.value === Date.UTC &&
desc.writable === true &&
desc.enumerable === false &&
desc.configurable === true) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(desc.value, Date.UTC, 'desc.value');
assert.sameValue(desc.writable, true, 'desc.writable');
assert.sameValue(desc.enumerable, false, 'desc.enumerable');
assert.sameValue(desc.configurable, true, 'desc.configurable');

View File

@ -6,16 +6,11 @@ es5id: 15.2.3.3-4-116
description: >
Object.getOwnPropertyDescriptor returns data desc for functions on
built-ins (Date.prototype.constructor)
includes: [runTestCase.js]
---*/
function testcase() {
var desc = Object.getOwnPropertyDescriptor(Date.prototype, "constructor");
if (desc.value === Date.prototype.constructor &&
desc.writable === true &&
desc.enumerable === false &&
desc.configurable === true) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(desc.value, Date.prototype.constructor, 'desc.value');
assert.sameValue(desc.writable, true, 'desc.writable');
assert.sameValue(desc.enumerable, false, 'desc.enumerable');
assert.sameValue(desc.configurable, true, 'desc.configurable');

View File

@ -6,16 +6,11 @@ es5id: 15.2.3.3-4-117
description: >
Object.getOwnPropertyDescriptor returns data desc for functions on
built-ins (Date.prototype.getTime)
includes: [runTestCase.js]
---*/
function testcase() {
var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getTime");
if (desc.value === Date.prototype.getTime &&
desc.writable === true &&
desc.enumerable === false &&
desc.configurable === true) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(desc.value, Date.prototype.getTime, 'desc.value');
assert.sameValue(desc.writable, true, 'desc.writable');
assert.sameValue(desc.enumerable, false, 'desc.enumerable');
assert.sameValue(desc.configurable, true, 'desc.configurable');

View File

@ -6,16 +6,11 @@ es5id: 15.2.3.3-4-118
description: >
Object.getOwnPropertyDescriptor returns data desc for functions on
built-ins (Date.prototype.getTimezoneOffset)
includes: [runTestCase.js]
---*/
function testcase() {
var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getTimezoneOffset");
if (desc.value === Date.prototype.getTimezoneOffset &&
desc.writable === true &&
desc.enumerable === false &&
desc.configurable === true) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(desc.value, Date.prototype.getTimezoneOffset, 'desc.value');
assert.sameValue(desc.writable, true, 'desc.writable');
assert.sameValue(desc.enumerable, false, 'desc.enumerable');
assert.sameValue(desc.configurable, true, 'desc.configurable');

View File

@ -6,16 +6,11 @@ es5id: 15.2.3.3-4-120
description: >
Object.getOwnPropertyDescriptor returns data desc for functions on
built-ins (Date.prototype.getFullYear)
includes: [runTestCase.js]
---*/
function testcase() {
var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getFullYear");
if (desc.value === Date.prototype.getFullYear &&
desc.writable === true &&
desc.enumerable === false &&
desc.configurable === true) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(desc.value, Date.prototype.getFullYear, 'desc.value');
assert.sameValue(desc.writable, true, 'desc.writable');
assert.sameValue(desc.enumerable, false, 'desc.enumerable');
assert.sameValue(desc.configurable, true, 'desc.configurable');

View File

@ -6,16 +6,11 @@ es5id: 15.2.3.3-4-121
description: >
Object.getOwnPropertyDescriptor returns data desc for functions on
built-ins (Date.prototype.getMonth)
includes: [runTestCase.js]
---*/
function testcase() {
var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getMonth");
if (desc.value === Date.prototype.getMonth &&
desc.writable === true &&
desc.enumerable === false &&
desc.configurable === true) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(desc.value, Date.prototype.getMonth, 'desc.value');
assert.sameValue(desc.writable, true, 'desc.writable');
assert.sameValue(desc.enumerable, false, 'desc.enumerable');
assert.sameValue(desc.configurable, true, 'desc.configurable');

View File

@ -6,16 +6,11 @@ es5id: 15.2.3.3-4-122
description: >
Object.getOwnPropertyDescriptor returns data desc for functions on
built-ins (Date.prototype.getDate)
includes: [runTestCase.js]
---*/
function testcase() {
var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getDate");
if (desc.value === Date.prototype.getDate &&
desc.writable === true &&
desc.enumerable === false &&
desc.configurable === true) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(desc.value, Date.prototype.getDate, 'desc.value');
assert.sameValue(desc.writable, true, 'desc.writable');
assert.sameValue(desc.enumerable, false, 'desc.enumerable');
assert.sameValue(desc.configurable, true, 'desc.configurable');

View File

@ -6,16 +6,11 @@ es5id: 15.2.3.3-4-123
description: >
Object.getOwnPropertyDescriptor returns data desc for functions on
built-ins (Date.prototype.getDay)
includes: [runTestCase.js]
---*/
function testcase() {
var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getDay");
if (desc.value === Date.prototype.getDay &&
desc.writable === true &&
desc.enumerable === false &&
desc.configurable === true) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(desc.value, Date.prototype.getDay, 'desc.value');
assert.sameValue(desc.writable, true, 'desc.writable');
assert.sameValue(desc.enumerable, false, 'desc.enumerable');
assert.sameValue(desc.configurable, true, 'desc.configurable');

View File

@ -6,16 +6,11 @@ es5id: 15.2.3.3-4-124
description: >
Object.getOwnPropertyDescriptor returns data desc for functions on
built-ins (Date.prototype.getHours)
includes: [runTestCase.js]
---*/
function testcase() {
var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getHours");
if (desc.value === Date.prototype.getHours &&
desc.writable === true &&
desc.enumerable === false &&
desc.configurable === true) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(desc.value, Date.prototype.getHours, 'desc.value');
assert.sameValue(desc.writable, true, 'desc.writable');
assert.sameValue(desc.enumerable, false, 'desc.enumerable');
assert.sameValue(desc.configurable, true, 'desc.configurable');

View File

@ -6,16 +6,11 @@ es5id: 15.2.3.3-4-125
description: >
Object.getOwnPropertyDescriptor returns data desc for functions on
built-ins (Date.prototype.getMinutes)
includes: [runTestCase.js]
---*/
function testcase() {
var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getMinutes");
if (desc.value === Date.prototype.getMinutes &&
desc.writable === true &&
desc.enumerable === false &&
desc.configurable === true) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(desc.value, Date.prototype.getMinutes, 'desc.value');
assert.sameValue(desc.writable, true, 'desc.writable');
assert.sameValue(desc.enumerable, false, 'desc.enumerable');
assert.sameValue(desc.configurable, true, 'desc.configurable');

View File

@ -6,16 +6,11 @@ es5id: 15.2.3.3-4-126
description: >
Object.getOwnPropertyDescriptor returns data desc for functions on
built-ins (Date.prototype.getSeconds)
includes: [runTestCase.js]
---*/
function testcase() {
var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getSeconds");
if (desc.value === Date.prototype.getSeconds &&
desc.writable === true &&
desc.enumerable === false &&
desc.configurable === true) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(desc.value, Date.prototype.getSeconds, 'desc.value');
assert.sameValue(desc.writable, true, 'desc.writable');
assert.sameValue(desc.enumerable, false, 'desc.enumerable');
assert.sameValue(desc.configurable, true, 'desc.configurable');

View File

@ -6,16 +6,11 @@ es5id: 15.2.3.3-4-127
description: >
Object.getOwnPropertyDescriptor returns data desc for functions on
built-ins (Date.prototype.getMilliseconds)
includes: [runTestCase.js]
---*/
function testcase() {
var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getMilliseconds");
if (desc.value === Date.prototype.getMilliseconds &&
desc.writable === true &&
desc.enumerable === false &&
desc.configurable === true) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(desc.value, Date.prototype.getMilliseconds, 'desc.value');
assert.sameValue(desc.writable, true, 'desc.writable');
assert.sameValue(desc.enumerable, false, 'desc.enumerable');
assert.sameValue(desc.configurable, true, 'desc.configurable');

View File

@ -6,16 +6,11 @@ es5id: 15.2.3.3-4-128
description: >
Object.getOwnPropertyDescriptor returns data desc for functions on
built-ins (Date.prototype.getUTCFullYear)
includes: [runTestCase.js]
---*/
function testcase() {
var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getUTCFullYear");
if (desc.value === Date.prototype.getUTCFullYear &&
desc.writable === true &&
desc.enumerable === false &&
desc.configurable === true) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(desc.value, Date.prototype.getUTCFullYear, 'desc.value');
assert.sameValue(desc.writable, true, 'desc.writable');
assert.sameValue(desc.enumerable, false, 'desc.enumerable');
assert.sameValue(desc.configurable, true, 'desc.configurable');

View File

@ -6,16 +6,11 @@ es5id: 15.2.3.3-4-129
description: >
Object.getOwnPropertyDescriptor returns data desc for functions on
built-ins (Date.prototype.getUTCMonth)
includes: [runTestCase.js]
---*/
function testcase() {
var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getUTCMonth");
if (desc.value === Date.prototype.getUTCMonth &&
desc.writable === true &&
desc.enumerable === false &&
desc.configurable === true) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(desc.value, Date.prototype.getUTCMonth, 'desc.value');
assert.sameValue(desc.writable, true, 'desc.writable');
assert.sameValue(desc.enumerable, false, 'desc.enumerable');
assert.sameValue(desc.configurable, true, 'desc.configurable');

View File

@ -6,16 +6,11 @@ es5id: 15.2.3.3-4-130
description: >
Object.getOwnPropertyDescriptor returns data desc for functions on
built-ins (Date.prototype.getUTCDate)
includes: [runTestCase.js]
---*/
function testcase() {
var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getUTCDate");
if (desc.value === Date.prototype.getUTCDate &&
desc.writable === true &&
desc.enumerable === false &&
desc.configurable === true) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(desc.value, Date.prototype.getUTCDate, 'desc.value');
assert.sameValue(desc.writable, true, 'desc.writable');
assert.sameValue(desc.enumerable, false, 'desc.enumerable');
assert.sameValue(desc.configurable, true, 'desc.configurable');

View File

@ -6,16 +6,11 @@ es5id: 15.2.3.3-4-131
description: >
Object.getOwnPropertyDescriptor returns data desc for functions on
built-ins (Date.prototype.getUTCDay)
includes: [runTestCase.js]
---*/
function testcase() {
var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getUTCDay");
if (desc.value === Date.prototype.getUTCDay &&
desc.writable === true &&
desc.enumerable === false &&
desc.configurable === true) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(desc.value, Date.prototype.getUTCDay, 'desc.value');
assert.sameValue(desc.writable, true, 'desc.writable');
assert.sameValue(desc.enumerable, false, 'desc.enumerable');
assert.sameValue(desc.configurable, true, 'desc.configurable');

View File

@ -6,16 +6,11 @@ es5id: 15.2.3.3-4-132
description: >
Object.getOwnPropertyDescriptor returns data desc for functions on
built-ins (Date.prototype.getUTCHours)
includes: [runTestCase.js]
---*/
function testcase() {
var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getUTCHours");
if (desc.value === Date.prototype.getUTCHours &&
desc.writable === true &&
desc.enumerable === false &&
desc.configurable === true) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(desc.value, Date.prototype.getUTCHours, 'desc.value');
assert.sameValue(desc.writable, true, 'desc.writable');
assert.sameValue(desc.enumerable, false, 'desc.enumerable');
assert.sameValue(desc.configurable, true, 'desc.configurable');

View File

@ -6,16 +6,11 @@ es5id: 15.2.3.3-4-133
description: >
Object.getOwnPropertyDescriptor returns data desc for functions on
built-ins (Date.prototype.getUTCMinutes)
includes: [runTestCase.js]
---*/
function testcase() {
var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getUTCMinutes");
if (desc.value === Date.prototype.getUTCMinutes &&
desc.writable === true &&
desc.enumerable === false &&
desc.configurable === true) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(desc.value, Date.prototype.getUTCMinutes, 'desc.value');
assert.sameValue(desc.writable, true, 'desc.writable');
assert.sameValue(desc.enumerable, false, 'desc.enumerable');
assert.sameValue(desc.configurable, true, 'desc.configurable');

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