summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/built-ins/Object/getOwnPropertyNames/15.2.3.4-0-1.js8
-rw-r--r--test/built-ins/Object/getOwnPropertyNames/15.2.3.4-0-2.js8
-rw-r--r--test/built-ins/Object/getOwnPropertyNames/15.2.3.4-1-4.js5
-rw-r--r--test/built-ins/Object/getOwnPropertyNames/15.2.3.4-1-5.js5
-rw-r--r--test/built-ins/Object/getOwnPropertyNames/15.2.3.4-1.js5
-rw-r--r--test/built-ins/Object/getOwnPropertyNames/15.2.3.4-2-1.js7
-rw-r--r--test/built-ins/Object/getOwnPropertyNames/15.2.3.4-2-2.js6
-rw-r--r--test/built-ins/Object/getOwnPropertyNames/15.2.3.4-2-3.js7
-rw-r--r--test/built-ins/Object/getOwnPropertyNames/15.2.3.4-3-1.js7
-rw-r--r--test/built-ins/Object/getOwnPropertyNames/15.2.3.4-4-2.js9
-rw-r--r--test/built-ins/Object/getOwnPropertyNames/15.2.3.4-4-38.js7
-rw-r--r--test/built-ins/Object/getOwnPropertyNames/15.2.3.4-4-39.js6
-rw-r--r--test/built-ins/Object/getOwnPropertyNames/15.2.3.4-4-44.js10
-rw-r--r--test/built-ins/Object/getOwnPropertyNames/15.2.3.4-4-49.js9
-rw-r--r--test/built-ins/Object/getOwnPropertyNames/15.2.3.4-4-50.js6
-rw-r--r--test/built-ins/Object/getOwnPropertyNames/15.2.3.4-4-b-1.js13
-rw-r--r--test/built-ins/Object/getOwnPropertyNames/15.2.3.4-4-b-2.js9
-rw-r--r--test/built-ins/Object/getOwnPropertyNames/15.2.3.4-4-b-6.js7
-rw-r--r--test/built-ins/Object/keys/15.2.3.14-0-1.js9
-rw-r--r--test/built-ins/Object/keys/15.2.3.14-0-2.js8
-rw-r--r--test/built-ins/Object/keys/15.2.3.14-1-1.js5
-rw-r--r--test/built-ins/Object/keys/15.2.3.14-1-2.js5
-rw-r--r--test/built-ins/Object/keys/15.2.3.14-1-3.js5
-rw-r--r--test/built-ins/Object/keys/15.2.3.14-2-1.js9
-rw-r--r--test/built-ins/Object/keys/15.2.3.14-2-2.js9
-rw-r--r--test/built-ins/Object/keys/15.2.3.14-2-3.js9
-rw-r--r--test/built-ins/Object/keys/15.2.3.14-2-4.js9
-rw-r--r--test/built-ins/Object/keys/15.2.3.14-2-5.js9
-rw-r--r--test/built-ins/Object/keys/15.2.3.14-2-6.js9
-rw-r--r--test/built-ins/Object/keys/15.2.3.14-2-7.js6
-rw-r--r--test/built-ins/Object/keys/15.2.3.14-2-8.js8
-rw-r--r--test/built-ins/Object/keys/15.2.3.14-3-1.js13
-rw-r--r--test/built-ins/Object/keys/15.2.3.14-3-2.js11
-rw-r--r--test/built-ins/Object/keys/15.2.3.14-3-3.js13
-rw-r--r--test/built-ins/Object/keys/15.2.3.14-3-4.js9
-rw-r--r--test/built-ins/Object/keys/15.2.3.14-3-6.js6
-rw-r--r--test/built-ins/Object/keys/15.2.3.14-3-7.js6
-rw-r--r--test/built-ins/Object/keys/15.2.3.14-4-1.js7
-rw-r--r--test/built-ins/Object/keys/15.2.3.14-5-1.js7
-rw-r--r--test/built-ins/Object/keys/15.2.3.14-5-2.js7
-rw-r--r--test/built-ins/Object/keys/15.2.3.14-5-a-1.js7
-rw-r--r--test/built-ins/Object/keys/15.2.3.14-5-a-3.js8
-rw-r--r--test/built-ins/Object/keys/15.2.3.14-5-a-4.js8
43 files changed, 74 insertions, 262 deletions
diff --git a/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-0-1.js b/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-0-1.js
index a98ab3603..7552cebb1 100644
--- a/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-0-1.js
+++ b/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-0-1.js
@@ -4,12 +4,6 @@
/*---
es5id: 15.2.3.4-0-1
description: Object.getOwnPropertyNames must exist as a function
-includes: [runTestCase.js]
---*/
-function testcase() {
- if (typeof(Object.getOwnPropertyNames) === "function") {
- return true;
- }
- }
-runTestCase(testcase);
+assert.sameValue(typeof(Object.getOwnPropertyNames), "function", 'typeof(Object.getOwnPropertyNames)');
diff --git a/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-0-2.js b/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-0-2.js
index 961d407d0..eac9651e9 100644
--- a/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-0-2.js
+++ b/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-0-2.js
@@ -6,12 +6,6 @@ es5id: 15.2.3.4-0-2
description: >
Object.getOwnPropertyNames must exist as a function taking 1
parameter
-includes: [runTestCase.js]
---*/
-function testcase() {
- if (Object.getOwnPropertyNames.length === 1) {
- return true;
- }
- }
-runTestCase(testcase);
+assert.sameValue(Object.getOwnPropertyNames.length, 1, 'Object.getOwnPropertyNames.length');
diff --git a/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-1-4.js b/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-1-4.js
index 6c393045b..09ead9782 100644
--- a/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-1-4.js
+++ b/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-1-4.js
@@ -6,11 +6,6 @@ es5id: 15.2.3.4-1-4
description: >
Object.getOwnPropertyNames does not throw TypeError if 'O' is a
boolean
-includes: [runTestCase.js]
---*/
-function testcase() {
Object.getOwnPropertyNames(true);
- return true;
-}
-runTestCase(testcase);
diff --git a/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-1-5.js b/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-1-5.js
index bee9775eb..e2de141ea 100644
--- a/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-1-5.js
+++ b/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-1-5.js
@@ -6,11 +6,6 @@ es5id: 15.2.3.4-1-5
description: >
Object.getOwnPropertyNames does not throw TypeError if 'O' is a
string
-includes: [runTestCase.js]
---*/
-function testcase() {
Object.getOwnPropertyNames("abc");
- return true;
-}
-runTestCase(testcase);
diff --git a/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-1.js b/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-1.js
index 64704f071..b34eac414 100644
--- a/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-1.js
+++ b/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-1.js
@@ -6,11 +6,6 @@ es5id: 15.2.3.4-1
description: >
Object.getOwnPropertyNames does not throw TypeError if type of
first param is not Object
-includes: [runTestCase.js]
---*/
-function testcase() {
Object.getOwnPropertyNames(0);
- return true;
- }
-runTestCase(testcase);
diff --git a/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-2-1.js b/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-2-1.js
index b6efb982d..8d9c373e2 100644
--- a/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-2-1.js
+++ b/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-2-1.js
@@ -6,14 +6,9 @@ es5id: 15.2.3.4-2-1
description: >
Object.getOwnPropertyNames - returned array is an array according
to Array.isArray
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var obj = {};
var result = Object.getOwnPropertyNames(obj);
- return Array.isArray(result);
- }
-runTestCase(testcase);
+assert(Array.isArray(result), 'Array.isArray(result) !== true');
diff --git a/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-2-2.js b/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-2-2.js
index fa165c44e..12a1f7418 100644
--- a/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-2-2.js
+++ b/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-2-2.js
@@ -4,13 +4,9 @@
/*---
es5id: 15.2.3.4-2-2
description: Object.getOwnPropertyNames - returned array is an instance of Array
-includes: [runTestCase.js]
---*/
-function testcase() {
var obj = {};
var result = Object.getOwnPropertyNames(obj);
- return result instanceof Array;
- }
-runTestCase(testcase);
+assert(result instanceof Array, 'result instanceof Array !== true');
diff --git a/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-2-3.js b/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-2-3.js
index 34ad9c2b5..d34305209 100644
--- a/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-2-3.js
+++ b/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-2-3.js
@@ -6,14 +6,9 @@ es5id: 15.2.3.4-2-3
description: >
Object.getOwnPropertyNames - length of returned array is
initialized to 0
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var obj = {};
var result = Object.getOwnPropertyNames(obj);
- return result.length === 0;
- }
-runTestCase(testcase);
+assert.sameValue(result.length, 0, 'result.length');
diff --git a/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-3-1.js b/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-3-1.js
index 98b3e18c7..c4a893ccd 100644
--- a/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-3-1.js
+++ b/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-3-1.js
@@ -6,14 +6,11 @@ es5id: 15.2.3.4-3-1
description: >
Object.getOwnPropertyNames - elements of the returned array start
from index 0
-includes: [runTestCase.js]
---*/
-function testcase() {
var obj = { prop1: 1001 };
var arr = Object.getOwnPropertyNames(obj);
- return arr.hasOwnProperty(0) && arr[0] === "prop1";
- }
-runTestCase(testcase);
+assert(arr.hasOwnProperty(0), 'arr.hasOwnProperty(0) !== true');
+assert.sameValue(arr[0], "prop1", 'arr[0]');
diff --git a/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-4-2.js b/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-4-2.js
index 8b3c4b9c8..97b14fd89 100644
--- a/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-4-2.js
+++ b/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-4-2.js
@@ -4,15 +4,10 @@
/*---
es5id: 15.2.3.4-4-2
description: Object.getOwnPropertyNames returns array of property names (Object)
-includes:
- - runTestCase.js
- - arrayContains.js
+includes: [arrayContains.js]
---*/
-function testcase() {
var result = Object.getOwnPropertyNames(Object);
var expResult = ["getPrototypeOf", "getOwnPropertyDescriptor", "getOwnPropertyNames", "create", "defineProperty", "defineProperties", "seal", "freeze", "preventExtensions", "isSealed", "isFrozen", "isExtensible", "keys", "prototype", "length"];
- return arrayContains(result, expResult);
- }
-runTestCase(testcase);
+assert(arrayContains(result, expResult), 'arrayContains(result, expResult) !== true');
diff --git a/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-4-38.js b/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-4-38.js
index 6c748019a..525a25320 100644
--- a/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-4-38.js
+++ b/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-4-38.js
@@ -6,15 +6,10 @@ es5id: 15.2.3.4-4-38
description: >
Object.getOwnPropertyNames - own data properties are pushed into
the returned array
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var obj = { "a": "a" };
var result = Object.getOwnPropertyNames(obj);
- return result[0] === "a";
- }
-runTestCase(testcase);
+assert.sameValue(result[0], "a", 'result[0]');
diff --git a/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-4-39.js b/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-4-39.js
index 48896b87c..1992e3168 100644
--- a/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-4-39.js
+++ b/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-4-39.js
@@ -6,10 +6,8 @@ es5id: 15.2.3.4-4-39
description: >
Object.getOwnPropertyNames - own accessor properties are pushed
into the returned array
-includes: [runTestCase.js]
---*/
-function testcase() {
var obj = {};
Object.defineProperty(obj, "a", {
get: function () {
@@ -20,6 +18,4 @@ function testcase() {
var result = Object.getOwnPropertyNames(obj);
- return result[0] === "a";
- }
-runTestCase(testcase);
+assert.sameValue(result[0], "a", 'result[0]');
diff --git a/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-4-44.js b/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-4-44.js
index cd8091c27..c6f5c4432 100644
--- a/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-4-44.js
+++ b/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-4-44.js
@@ -6,19 +6,13 @@ es5id: 15.2.3.4-4-44
description: >
Object.getOwnPropertyNames - own index properties of String object
are pushed into the returned Array
-includes:
- - runTestCase.js
- - compareArray.js
+includes: [compareArray.js]
---*/
-function testcase() {
-
var str = new String("abc");
str[5] = "de";
var expected = ["0", "1", "2", "5", "length"];
var actual = Object.getOwnPropertyNames(str);
- return compareArray(actual, expected);
-}
-runTestCase(testcase);
+assert(compareArray(actual, expected), 'compareArray(actual, expected) !== true');
diff --git a/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-4-49.js b/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-4-49.js
index fce0039f6..442681b96 100644
--- a/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-4-49.js
+++ b/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-4-49.js
@@ -6,16 +6,11 @@ es5id: 15.2.3.4-4-49
description: >
Object.getOwnPropertyNames - own index properties of Array objcect
are pushed into the returned Array
-includes:
- - runTestCase.js
- - compareArray.js
+includes: [compareArray.js]
---*/
-function testcase() {
var arr = [0, 1, 2];
var expected = ["0", "1", "2", "length"];
var actual = Object.getOwnPropertyNames(arr);
- return compareArray(actual, expected);
-}
-runTestCase(testcase);
+assert(compareArray(actual, expected), 'compareArray(actual, expected) !== true');
diff --git a/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-4-50.js b/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-4-50.js
index 98470e3fd..d83127151 100644
--- a/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-4-50.js
+++ b/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-4-50.js
@@ -6,10 +6,8 @@ es5id: 15.2.3.4-4-50
description: >
Object.getOwnPropertyNames - non-enumerable own property of 'O' is
pushed into the returned Array
-includes: [runTestCase.js]
---*/
-function testcase() {
var obj = {};
Object.defineProperty(obj, "nonEnumerableProp", {
@@ -20,6 +18,4 @@ function testcase() {
var result = Object.getOwnPropertyNames(obj);
- return result[0] === "nonEnumerableProp";
- }
-runTestCase(testcase);
+assert.sameValue(result[0], "nonEnumerableProp", 'result[0]');
diff --git a/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-4-b-1.js b/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-4-b-1.js
index d9c6058db..988774204 100644
--- a/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-4-b-1.js
+++ b/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-4-b-1.js
@@ -6,19 +6,14 @@ es5id: 15.2.3.4-4-b-1
description: >
Object.getOwnPropertyNames - descriptor of resultant array is all
true
-includes: [runTestCase.js]
---*/
-function testcase() {
var obj = new Object();
obj.x = 1;
obj.y = 2;
var result = Object.getOwnPropertyNames(obj);
var desc = Object.getOwnPropertyDescriptor(result,"0");
- if (desc.enumerable === true &&
- desc.configurable === true &&
- desc.writable === true) {
- return true;
- }
- }
-runTestCase(testcase);
+
+assert.sameValue(desc.enumerable, true, 'desc.enumerable');
+assert.sameValue(desc.configurable, true, 'desc.configurable');
+assert.sameValue(desc.writable, true, 'desc.writable');
diff --git a/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-4-b-2.js b/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-4-b-2.js
index f1876bdbd..30a910696 100644
--- a/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-4-b-2.js
+++ b/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-4-b-2.js
@@ -6,12 +6,9 @@ es5id: 15.2.3.4-4-b-2
description: >
Object.getOwnPropertyNames - all own properties are pushed into
the returned array
-includes:
- - runTestCase.js
- - compareArray.js
+includes: [compareArray.js]
---*/
-function testcase() {
var obj = { "a": "a" };
Object.defineProperty(obj, "b", {
@@ -39,6 +36,4 @@ function testcase() {
var actual = Object.getOwnPropertyNames(obj);
var expected = ["a", "b", "c", "d"];
- return compareArray(actual, expected);
-}
-runTestCase(testcase);
+assert(compareArray(actual, expected), 'compareArray(actual, expected) !== true');
diff --git a/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-4-b-6.js b/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-4-b-6.js
index 8f9d784d3..c46672f7a 100644
--- a/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-4-b-6.js
+++ b/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-4-b-6.js
@@ -6,10 +6,8 @@ es5id: 15.2.3.4-4-b-6
description: >
Object.getOwnPropertyNames - elements of the returned array are
configurable
-includes: [runTestCase.js]
---*/
-function testcase() {
var obj = { "a": "a" };
var result = Object.getOwnPropertyNames(obj);
@@ -18,6 +16,5 @@ function testcase() {
delete result[0];
var afterDeleted = (result.hasOwnProperty("0"));
- return beforeDeleted && !afterDeleted;
- }
-runTestCase(testcase);
+assert(beforeDeleted, 'beforeDeleted !== true');
+assert.sameValue(afterDeleted, false, 'afterDeleted');
diff --git a/test/built-ins/Object/keys/15.2.3.14-0-1.js b/test/built-ins/Object/keys/15.2.3.14-0-1.js
index 442f82fa9..404294cfb 100644
--- a/test/built-ins/Object/keys/15.2.3.14-0-1.js
+++ b/test/built-ins/Object/keys/15.2.3.14-0-1.js
@@ -4,13 +4,8 @@
/*---
es5id: 15.2.3.14-0-1
description: Object.keys must exist as a function
-includes: [runTestCase.js]
---*/
-function testcase() {
var f = Object.keys;
- if (typeof(f) === "function") {
- return true;
- }
- }
-runTestCase(testcase);
+
+assert.sameValue(typeof(f), "function", 'typeof(f)');
diff --git a/test/built-ins/Object/keys/15.2.3.14-0-2.js b/test/built-ins/Object/keys/15.2.3.14-0-2.js
index bf222ea5d..9a2339e9a 100644
--- a/test/built-ins/Object/keys/15.2.3.14-0-2.js
+++ b/test/built-ins/Object/keys/15.2.3.14-0-2.js
@@ -4,12 +4,6 @@
/*---
es5id: 15.2.3.14-0-2
description: Object.keys must exist as a function taking 1 parameter
-includes: [runTestCase.js]
---*/
-function testcase() {
- if (Object.keys.length === 1) {
- return true;
- }
- }
-runTestCase(testcase);
+assert.sameValue(Object.keys.length, 1, 'Object.keys.length');
diff --git a/test/built-ins/Object/keys/15.2.3.14-1-1.js b/test/built-ins/Object/keys/15.2.3.14-1-1.js
index de940545f..b876f99e3 100644
--- a/test/built-ins/Object/keys/15.2.3.14-1-1.js
+++ b/test/built-ins/Object/keys/15.2.3.14-1-1.js
@@ -6,11 +6,6 @@ es5id: 15.2.3.14-1-1
description: >
Object.keys does not throw TypeError if type of first param is not
Object
-includes: [runTestCase.js]
---*/
-function testcase() {
Object.keys(0);
- return true;
-}
-runTestCase(testcase);
diff --git a/test/built-ins/Object/keys/15.2.3.14-1-2.js b/test/built-ins/Object/keys/15.2.3.14-1-2.js
index 837b856b6..e7ba5f33d 100644
--- a/test/built-ins/Object/keys/15.2.3.14-1-2.js
+++ b/test/built-ins/Object/keys/15.2.3.14-1-2.js
@@ -6,11 +6,6 @@ es5id: 15.2.3.14-1-2
description: >
Object.keys does not throw TypeError if type of first param is not
Object (boolean)
-includes: [runTestCase.js]
---*/
-function testcase() {
Object.keys(true);
- return true;
-}
-runTestCase(testcase);
diff --git a/test/built-ins/Object/keys/15.2.3.14-1-3.js b/test/built-ins/Object/keys/15.2.3.14-1-3.js
index 21914acc8..426324b88 100644
--- a/test/built-ins/Object/keys/15.2.3.14-1-3.js
+++ b/test/built-ins/Object/keys/15.2.3.14-1-3.js
@@ -6,11 +6,6 @@ es5id: 15.2.3.14-1-3
description: >
Object.keys does not throw TypeError if type of first param is not
Object (string)
-includes: [runTestCase.js]
---*/
-function testcase() {
Object.keys('abc');
- return true;
-}
-runTestCase(testcase);
diff --git a/test/built-ins/Object/keys/15.2.3.14-2-1.js b/test/built-ins/Object/keys/15.2.3.14-2-1.js
index 60c73f27b..5f2d8f7cb 100644
--- a/test/built-ins/Object/keys/15.2.3.14-2-1.js
+++ b/test/built-ins/Object/keys/15.2.3.14-2-1.js
@@ -4,15 +4,10 @@
/*---
es5id: 15.2.3.14-2-1
description: Object.keys returns the standard built-in Array
-includes: [runTestCase.js]
---*/
-function testcase() {
var o = { x: 1, y: 2};
var a = Object.keys(o);
- if (Array.isArray(a) === true) {
- return true;
- }
- }
-runTestCase(testcase);
+
+assert.sameValue(Array.isArray(a), true, 'Array.isArray(a)');
diff --git a/test/built-ins/Object/keys/15.2.3.14-2-2.js b/test/built-ins/Object/keys/15.2.3.14-2-2.js
index 55cbf4678..2ebe4b0d6 100644
--- a/test/built-ins/Object/keys/15.2.3.14-2-2.js
+++ b/test/built-ins/Object/keys/15.2.3.14-2-2.js
@@ -4,16 +4,11 @@
/*---
es5id: 15.2.3.14-2-2
description: Object.keys returns the standard built-in Array (check [[Class]]
-includes: [runTestCase.js]
---*/
-function testcase() {
var o = { x: 1, y: 2};
var a = Object.keys(o);
var s = Object.prototype.toString.call(a);
- if (s === '[object Array]') {
- return true;
- }
- }
-runTestCase(testcase);
+
+assert.sameValue(s, '[object Array]', 's');
diff --git a/test/built-ins/Object/keys/15.2.3.14-2-3.js b/test/built-ins/Object/keys/15.2.3.14-2-3.js
index d47c1aae3..0692d2ad9 100644
--- a/test/built-ins/Object/keys/15.2.3.14-2-3.js
+++ b/test/built-ins/Object/keys/15.2.3.14-2-3.js
@@ -4,10 +4,8 @@
/*---
es5id: 15.2.3.14-2-3
description: Object.keys returns the standard built-in Array (Array overridden)
-includes: [runTestCase.js]
---*/
-function testcase() {
function Array() { }
var o = { x: 1, y: 2};
@@ -15,8 +13,5 @@ function testcase() {
var a = Object.keys(o);
var s = Object.prototype.toString.call(a);
- if (s === '[object Array]') {
- return true;
- }
- }
-runTestCase(testcase);
+
+assert.sameValue(s, '[object Array]', 's');
diff --git a/test/built-ins/Object/keys/15.2.3.14-2-4.js b/test/built-ins/Object/keys/15.2.3.14-2-4.js
index 6d4e83a19..231c1e761 100644
--- a/test/built-ins/Object/keys/15.2.3.14-2-4.js
+++ b/test/built-ins/Object/keys/15.2.3.14-2-4.js
@@ -4,15 +4,10 @@
/*---
es5id: 15.2.3.14-2-4
description: Object.keys returns the standard built-in Array that is extensible
-includes: [runTestCase.js]
---*/
-function testcase() {
var o = { x: 1, y: 2};
var a = Object.keys(o);
- if (Object.isExtensible(a) === true) {
- return true;
- }
- }
-runTestCase(testcase);
+
+assert.sameValue(Object.isExtensible(a), true, 'Object.isExtensible(a)');
diff --git a/test/built-ins/Object/keys/15.2.3.14-2-5.js b/test/built-ins/Object/keys/15.2.3.14-2-5.js
index 3a6bf4669..53c37a839 100644
--- a/test/built-ins/Object/keys/15.2.3.14-2-5.js
+++ b/test/built-ins/Object/keys/15.2.3.14-2-5.js
@@ -4,15 +4,10 @@
/*---
es5id: 15.2.3.14-2-5
description: Object.keys returns the standard built-in Array that is not sealed
-includes: [runTestCase.js]
---*/
-function testcase() {
var o = { x: 1, y: 2};
var a = Object.keys(o);
- if (Object.isSealed(a) === false) {
- return true;
- }
- }
-runTestCase(testcase);
+
+assert.sameValue(Object.isSealed(a), false, 'Object.isSealed(a)');
diff --git a/test/built-ins/Object/keys/15.2.3.14-2-6.js b/test/built-ins/Object/keys/15.2.3.14-2-6.js
index 1241f06f6..9026527d6 100644
--- a/test/built-ins/Object/keys/15.2.3.14-2-6.js
+++ b/test/built-ins/Object/keys/15.2.3.14-2-6.js
@@ -4,15 +4,10 @@
/*---
es5id: 15.2.3.14-2-6
description: Object.keys returns the standard built-in Array that is not frozen
-includes: [runTestCase.js]
---*/
-function testcase() {
var o = { x: 1, y: 2};
var a = Object.keys(o);
- if (Object.isFrozen(a) === false) {
- return true;
- }
- }
-runTestCase(testcase);
+
+assert.sameValue(Object.isFrozen(a), false, 'Object.isFrozen(a)');
diff --git a/test/built-ins/Object/keys/15.2.3.14-2-7.js b/test/built-ins/Object/keys/15.2.3.14-2-7.js
index 34a1aa0be..81506d56d 100644
--- a/test/built-ins/Object/keys/15.2.3.14-2-7.js
+++ b/test/built-ins/Object/keys/15.2.3.14-2-7.js
@@ -6,10 +6,8 @@ es5id: 15.2.3.14-2-7
description: >
Object.keys - 'n' is 0 when 'O' doesn't contain own enumerable
data or accessor properties
-includes: [runTestCase.js]
---*/
-function testcase() {
var obj = {};
Object.defineProperty(obj, "prop1", {
@@ -28,6 +26,4 @@ function testcase() {
var arr = Object.keys(obj);
- return arr.length === 0;
- }
-runTestCase(testcase);
+assert.sameValue(arr.length, 0, 'arr.length');
diff --git a/test/built-ins/Object/keys/15.2.3.14-2-8.js b/test/built-ins/Object/keys/15.2.3.14-2-8.js
index 4ff485c5b..079e50eca 100644
--- a/test/built-ins/Object/keys/15.2.3.14-2-8.js
+++ b/test/built-ins/Object/keys/15.2.3.14-2-8.js
@@ -6,10 +6,8 @@ es5id: 15.2.3.14-2-8
description: >
Object.keys - 'n' is the correct value when enumerable properties
exist in 'O'
-includes: [runTestCase.js]
---*/
-function testcase() {
var obj = {
prop1: 1001,
prop2: function () {
@@ -33,6 +31,6 @@ function testcase() {
var arr = Object.keys(obj);
- return (arr.length === 2) && (arr[0] === "prop1") && (arr[1] === "prop2");
- }
-runTestCase(testcase);
+assert.sameValue(arr.length, 2, 'arr.length');
+assert.sameValue(arr[0], "prop1", 'arr[0]');
+assert.sameValue(arr[1], "prop2", 'arr[1]');
diff --git a/test/built-ins/Object/keys/15.2.3.14-3-1.js b/test/built-ins/Object/keys/15.2.3.14-3-1.js
index 98aa808a2..c54f50d55 100644
--- a/test/built-ins/Object/keys/15.2.3.14-3-1.js
+++ b/test/built-ins/Object/keys/15.2.3.14-3-1.js
@@ -6,17 +6,12 @@ es5id: 15.2.3.14-3-1
description: >
Object.keys returns the standard built-in Array containing own
enumerable properties
-includes: [runTestCase.js]
---*/
-function testcase() {
var o = { x: 1, y: 2};
var a = Object.keys(o);
- if (a.length === 2 &&
- a[0] === 'x' &&
- a[1] === 'y') {
- return true;
- }
- }
-runTestCase(testcase);
+
+assert.sameValue(a.length, 2, 'a.length');
+assert.sameValue(a[0], 'x', 'a[0]');
+assert.sameValue(a[1], 'y', 'a[1]');
diff --git a/test/built-ins/Object/keys/15.2.3.14-3-2.js b/test/built-ins/Object/keys/15.2.3.14-3-2.js
index b36fd0284..2f40b3bfa 100644
--- a/test/built-ins/Object/keys/15.2.3.14-3-2.js
+++ b/test/built-ins/Object/keys/15.2.3.14-3-2.js
@@ -6,17 +6,12 @@ es5id: 15.2.3.14-3-2
description: >
Object.keys returns the standard built-in Array containing own
enumerable properties (function)
-includes: [runTestCase.js]
---*/
-function testcase() {
function foo() {}
foo.x = 1;
var a = Object.keys(foo);
- if (a.length === 1 &&
- a[0] === 'x') {
- return true;
- }
- }
-runTestCase(testcase);
+
+assert.sameValue(a.length, 1, 'a.length');
+assert.sameValue(a[0], 'x', 'a[0]');
diff --git a/test/built-ins/Object/keys/15.2.3.14-3-3.js b/test/built-ins/Object/keys/15.2.3.14-3-3.js
index 337fbdbf5..9d6d1276b 100644
--- a/test/built-ins/Object/keys/15.2.3.14-3-3.js
+++ b/test/built-ins/Object/keys/15.2.3.14-3-3.js
@@ -6,16 +6,11 @@ es5id: 15.2.3.14-3-3
description: >
Object.keys returns the standard built-in Array containing own
enumerable properties (array)
-includes: [runTestCase.js]
---*/
-function testcase() {
var o = [1, 2];
var a = Object.keys(o);
- if (a.length === 2 &&
- a[0] === '0' &&
- a[1] === '1') {
- return true;
- }
- }
-runTestCase(testcase);
+
+assert.sameValue(a.length, 2, 'a.length');
+assert.sameValue(a[0], '0', 'a[0]');
+assert.sameValue(a[1], '1', 'a[1]');
diff --git a/test/built-ins/Object/keys/15.2.3.14-3-4.js b/test/built-ins/Object/keys/15.2.3.14-3-4.js
index 3d61bde05..2d11275d4 100644
--- a/test/built-ins/Object/keys/15.2.3.14-3-4.js
+++ b/test/built-ins/Object/keys/15.2.3.14-3-4.js
@@ -6,10 +6,8 @@ es5id: 15.2.3.14-3-4
description: >
Object.keys of an arguments object returns the indices of the
given arguments
-includes: [runTestCase.js]
---*/
-function testcase() {
function testArgs2(x, y, z) {
// Properties of the arguments object are enumerable.
var a = Object.keys(arguments);
@@ -28,6 +26,7 @@ function testcase() {
if (a.length === 4 && a[0] in arguments && a[1] in arguments && a[2] in arguments && a[3] in arguments)
return true;
}
- return testArgs2(1, 2) && testArgs3(1, 2, 3) && testArgs4(1, 2, 3, 4);
- }
-runTestCase(testcase);
+
+assert(testArgs2(1, 2), 'testArgs2(1, 2) !== true');
+assert(testArgs3(1, 2, 3), 'testArgs3(1, 2, 3) !== true');
+assert(testArgs4(1, 2, 3, 4), 'testArgs4(1, 2, 3, 4) !== true');
diff --git a/test/built-ins/Object/keys/15.2.3.14-3-6.js b/test/built-ins/Object/keys/15.2.3.14-3-6.js
index 34f2ecc51..582c493bb 100644
--- a/test/built-ins/Object/keys/15.2.3.14-3-6.js
+++ b/test/built-ins/Object/keys/15.2.3.14-3-6.js
@@ -6,14 +6,10 @@ es5id: 15.2.3.14-3-6
description: >
Object.keys - returns the standard built-in Array (instanceof
Array)
-includes: [runTestCase.js]
---*/
-function testcase() {
var obj = {};
var arr = Object.keys(obj);
- return arr instanceof Array;
- }
-runTestCase(testcase);
+assert(arr instanceof Array, 'arr instanceof Array !== true');
diff --git a/test/built-ins/Object/keys/15.2.3.14-3-7.js b/test/built-ins/Object/keys/15.2.3.14-3-7.js
index 7832bb2e2..cea8ccdca 100644
--- a/test/built-ins/Object/keys/15.2.3.14-3-7.js
+++ b/test/built-ins/Object/keys/15.2.3.14-3-7.js
@@ -6,10 +6,8 @@ es5id: 15.2.3.14-3-7
description: >
Object.keys - length of the returned array equals the number of
own enumerable properties of 'O'
-includes: [runTestCase.js]
---*/
-function testcase() {
var obj = { prop1: 1001, prop2: 1002 };
Object.defineProperty(obj, "prop3", {
@@ -28,6 +26,4 @@ function testcase() {
var arr = Object.keys(obj);
- return arr.length === 3;
- }
-runTestCase(testcase);
+assert.sameValue(arr.length, 3, 'arr.length');
diff --git a/test/built-ins/Object/keys/15.2.3.14-4-1.js b/test/built-ins/Object/keys/15.2.3.14-4-1.js
index 660fc94fc..57f7ab5a0 100644
--- a/test/built-ins/Object/keys/15.2.3.14-4-1.js
+++ b/test/built-ins/Object/keys/15.2.3.14-4-1.js
@@ -4,10 +4,8 @@
/*---
es5id: 15.2.3.14-4-1
description: Object.keys - elements of the returned array start from index 0
-includes: [runTestCase.js]
---*/
-function testcase() {
var obj = { prop1: 1001, prop2: 1002 };
Object.defineProperty(obj, "prop3", {
@@ -26,6 +24,5 @@ function testcase() {
var arr = Object.keys(obj);
- return arr.hasOwnProperty(0) && arr[0] === "prop1";
- }
-runTestCase(testcase);
+assert(arr.hasOwnProperty(0), 'arr.hasOwnProperty(0) !== true');
+assert.sameValue(arr[0], "prop1", 'arr[0]');
diff --git a/test/built-ins/Object/keys/15.2.3.14-5-1.js b/test/built-ins/Object/keys/15.2.3.14-5-1.js
index 262f20515..8f576efd9 100644
--- a/test/built-ins/Object/keys/15.2.3.14-5-1.js
+++ b/test/built-ins/Object/keys/15.2.3.14-5-1.js
@@ -6,10 +6,8 @@ es5id: 15.2.3.14-5-1
description: >
Object.keys - own enumerable data property of 'O' is defined in
returned array
-includes: [runTestCase.js]
---*/
-function testcase() {
var obj = { };
Object.defineProperty(obj, "prop", {
@@ -20,6 +18,5 @@ function testcase() {
var arr = Object.keys(obj);
- return arr.hasOwnProperty(0) && arr[0] === "prop";
- }
-runTestCase(testcase);
+assert(arr.hasOwnProperty(0), 'arr.hasOwnProperty(0) !== true');
+assert.sameValue(arr[0], "prop", 'arr[0]');
diff --git a/test/built-ins/Object/keys/15.2.3.14-5-2.js b/test/built-ins/Object/keys/15.2.3.14-5-2.js
index 2da5e1350..917ad1cf6 100644
--- a/test/built-ins/Object/keys/15.2.3.14-5-2.js
+++ b/test/built-ins/Object/keys/15.2.3.14-5-2.js
@@ -6,10 +6,8 @@ es5id: 15.2.3.14-5-2
description: >
Object.keys - own enumerable accessor property of 'O' is defined
in returned array
-includes: [runTestCase.js]
---*/
-function testcase() {
var obj = { };
Object.defineProperty(obj, "prop", {
@@ -22,6 +20,5 @@ function testcase() {
var arr = Object.keys(obj);
- return arr.hasOwnProperty(0) && arr[0] === "prop";
- }
-runTestCase(testcase);
+assert(arr.hasOwnProperty(0), 'arr.hasOwnProperty(0) !== true');
+assert.sameValue(arr[0], "prop", 'arr[0]');
diff --git a/test/built-ins/Object/keys/15.2.3.14-5-a-1.js b/test/built-ins/Object/keys/15.2.3.14-5-a-1.js
index 2b147cb73..15cabe73b 100644
--- a/test/built-ins/Object/keys/15.2.3.14-5-a-1.js
+++ b/test/built-ins/Object/keys/15.2.3.14-5-a-1.js
@@ -6,16 +6,13 @@ es5id: 15.2.3.14-5-a-1
description: >
Object.keys - 'value' attribute of element in returned array is
correct.
-includes: [runTestCase.js]
---*/
-function testcase() {
var obj = { prop1: 1 };
var array = Object.keys(obj);
var desc = Object.getOwnPropertyDescriptor(array, "0");
- return desc.hasOwnProperty("value") && desc.value === "prop1";
- }
-runTestCase(testcase);
+assert(desc.hasOwnProperty("value"), 'desc.hasOwnProperty("value") !== true');
+assert.sameValue(desc.value, "prop1", 'desc.value');
diff --git a/test/built-ins/Object/keys/15.2.3.14-5-a-3.js b/test/built-ins/Object/keys/15.2.3.14-5-a-3.js
index 20e215549..25c069329 100644
--- a/test/built-ins/Object/keys/15.2.3.14-5-a-3.js
+++ b/test/built-ins/Object/keys/15.2.3.14-5-a-3.js
@@ -6,10 +6,8 @@ es5id: 15.2.3.14-5-a-3
description: >
Object.keys - 'enumerable' attribute of element of returned array
is correct
-includes: [runTestCase.js]
---*/
-function testcase() {
var obj = { prop1: 100 };
var array = Object.keys(obj);
@@ -21,6 +19,6 @@ function testcase() {
}
}
- return result && desc.hasOwnProperty("enumerable") && desc.enumerable === true;
- }
-runTestCase(testcase);
+assert(result, 'result !== true');
+assert(desc.hasOwnProperty("enumerable"), 'desc.hasOwnProperty("enumerable") !== true');
+assert.sameValue(desc.enumerable, true, 'desc.enumerable');
diff --git a/test/built-ins/Object/keys/15.2.3.14-5-a-4.js b/test/built-ins/Object/keys/15.2.3.14-5-a-4.js
index f660e3f1b..78b67c338 100644
--- a/test/built-ins/Object/keys/15.2.3.14-5-a-4.js
+++ b/test/built-ins/Object/keys/15.2.3.14-5-a-4.js
@@ -6,10 +6,8 @@ es5id: 15.2.3.14-5-a-4
description: >
Object.keys - Verify that 'configurable' attribute of element of
returned array is correct
-includes: [runTestCase.js]
---*/
-function testcase() {
var obj = { prop1: 100 };
var array = Object.keys(obj);
@@ -17,6 +15,6 @@ function testcase() {
delete array[0];
- return typeof array[0] === "undefined" && desc.hasOwnProperty("configurable") && desc.configurable === true;
- }
-runTestCase(testcase);
+assert.sameValue(typeof array[0], "undefined", 'typeof array[0]');
+assert(desc.hasOwnProperty("configurable"), 'desc.hasOwnProperty("configurable") !== true');
+assert.sameValue(desc.configurable, true, 'desc.configurable');