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 a98ab3603b..7552cebb11 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 961d407d05..eac9651e99 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 6c393045bf..09ead97824 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 bee9775ebe..e2de141ea1 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 64704f0714..b34eac4146 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 b6efb982d1..8d9c373e2c 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 fa165c44e1..12a1f74181 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 34ad9c2b53..d34305209d 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 98b3e18c76..c4a893ccd6 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 8b3c4b9c85..97b14fd890 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 6c748019a9..525a253207 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 48896b87c5..1992e3168f 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 cd8091c27f..c6f5c4432e 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 fce0039f6e..442681b965 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 98470e3fdd..d831271516 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 d9c6058db7..9887742045 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 f1876bdbda..30a9106967 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 8f9d784d3d..c46672f7ad 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 442f82fa94..404294cfb7 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 bf222ea5db..9a2339e9a2 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 de940545f3..b876f99e3d 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 837b856b65..e7ba5f33d5 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 21914acc8b..426324b888 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 60c73f27b5..5f2d8f7cb5 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 55cbf46780..2ebe4b0d67 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 d47c1aae3b..0692d2ad9f 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 6d4e83a195..231c1e7616 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 3a6bf46697..53c37a8390 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 1241f06f68..9026527d68 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 34a1aa0be2..81506d56dd 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 4ff485c5b5..079e50ecaf 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 98aa808a2d..c54f50d55c 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 b36fd02845..2f40b3bfa8 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 337fbdbf51..9d6d1276be 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 3d61bde053..2d11275d4c 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 34f2ecc512..582c493bb0 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 7832bb2e2b..cea8ccdca6 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 660fc94fcd..57f7ab5a05 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 262f20515d..8f576efd9e 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 2da5e13509..917ad1cf6d 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 2b147cb733..15cabe73b1 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 20e2155492..25c069329f 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 f660e3f1b5..78b67c3380 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');