diff --git a/test/built-ins/RegExp/prototype/15.10.6.js b/test/built-ins/RegExp/prototype/15.10.6.js index 8fa049a919..a1d12241f2 100644 --- a/test/built-ins/RegExp/prototype/15.10.6.js +++ b/test/built-ins/RegExp/prototype/15.10.6.js @@ -4,11 +4,8 @@ /*--- es5id: 15.10.6 description: RegExp.prototype is itself a not RegExp -includes: [runTestCase.js] ---*/ -function testcase() { var s = Object.prototype.toString.call(RegExp.prototype); - return s === '[object Object]'; - } -runTestCase(testcase); + +assert.sameValue(s, '[object Object]', 's'); diff --git a/test/built-ins/RegExp/prototype/exec/15.10.6.2-9-e-1.js b/test/built-ins/RegExp/prototype/exec/15.10.6.2-9-e-1.js index 4d3e152317..ab93d95a8a 100644 --- a/test/built-ins/RegExp/prototype/exec/15.10.6.2-9-e-1.js +++ b/test/built-ins/RegExp/prototype/exec/15.10.6.2-9-e-1.js @@ -6,14 +6,11 @@ es5id: 15.10.6.2-9-e-1 description: > RegExp.prototype.exec - the removed step 9.e won't affected current algorithm -includes: [runTestCase.js] ---*/ -function testcase() { var str = "Hello World!"; var regObj = new RegExp("World"); var result = false; result = regObj.exec(str).toString() === "World"; - return result; - } -runTestCase(testcase); + +assert(result, 'result !== true'); diff --git a/test/built-ins/RegExp/prototype/global/15.10.7.2-2.js b/test/built-ins/RegExp/prototype/global/15.10.7.2-2.js index a30fa4da8e..bc00e211fd 100644 --- a/test/built-ins/RegExp/prototype/global/15.10.7.2-2.js +++ b/test/built-ins/RegExp/prototype/global/15.10.7.2-2.js @@ -6,17 +6,12 @@ es5id: 15.10.7.2-2 description: > RegExp.prototype.global is an accessor property whose set accessor function is undefined -includes: [runTestCase.js] ---*/ -function testcase() { var desc = Object.getOwnPropertyDescriptor(RegExp.prototype, 'global'); - if (typeof desc.get === 'function' && - desc.set === undefined && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); + +assert.sameValue(typeof desc.get, 'function', 'typeof desc.get'); +assert.sameValue(desc.set, undefined, 'desc.set'); +assert.sameValue(desc.enumerable, false, 'desc.enumerable'); +assert.sameValue(desc.configurable, true, 'desc.configurable'); diff --git a/test/built-ins/RegExp/prototype/ignoreCase/15.10.7.3-2.js b/test/built-ins/RegExp/prototype/ignoreCase/15.10.7.3-2.js index abf7079533..60fecfef54 100644 --- a/test/built-ins/RegExp/prototype/ignoreCase/15.10.7.3-2.js +++ b/test/built-ins/RegExp/prototype/ignoreCase/15.10.7.3-2.js @@ -6,17 +6,12 @@ es5id: 15.10.7.3-2 description: > RegExp.prototype.ignoreCase is an accessor property whose set accessor function is undefined -includes: [runTestCase.js] ---*/ -function testcase() { var d = Object.getOwnPropertyDescriptor(RegExp.prototype, 'ignoreCase'); - if (typeof d.get === 'function' && - d.set === undefined && - d.enumerable === false && - d.configurable === true) { - return true; - } - } -runTestCase(testcase); + +assert.sameValue(typeof d.get, 'function', 'typeof d.get'); +assert.sameValue(d.set, undefined, 'd.set'); +assert.sameValue(d.enumerable, false, 'd.enumerable'); +assert.sameValue(d.configurable, true, 'd.configurable'); diff --git a/test/built-ins/RegExp/prototype/lastIndex/15.10.7.5-2.js b/test/built-ins/RegExp/prototype/lastIndex/15.10.7.5-2.js index a96fc0ebff..a9a7e73c84 100644 --- a/test/built-ins/RegExp/prototype/lastIndex/15.10.7.5-2.js +++ b/test/built-ins/RegExp/prototype/lastIndex/15.10.7.5-2.js @@ -4,11 +4,8 @@ /*--- es5id: 15.10.7.5-2 description: RegExp.prototype.lastIndex is not present -includes: [runTestCase.js] ---*/ -function testcase() { var d = Object.getOwnPropertyDescriptor(RegExp.prototype, 'lastIndex'); - return d === undefined; - } -runTestCase(testcase); + +assert.sameValue(d, undefined, 'd'); diff --git a/test/built-ins/RegExp/prototype/multiline/15.10.7.4-2.js b/test/built-ins/RegExp/prototype/multiline/15.10.7.4-2.js index 69e6a65c0c..3b0ca4ddea 100644 --- a/test/built-ins/RegExp/prototype/multiline/15.10.7.4-2.js +++ b/test/built-ins/RegExp/prototype/multiline/15.10.7.4-2.js @@ -6,17 +6,12 @@ es5id: 15.10.7.4-2 description: > RegExp.prototype.multiline is an accessor property whose set accessor function is undefined -includes: [runTestCase.js] ---*/ -function testcase() { var d = Object.getOwnPropertyDescriptor(RegExp.prototype, 'multiline'); - if (typeof d.get === 'function' && - d.set === undefined && - d.enumerable === false && - d.configurable === true) { - return true; - } - } -runTestCase(testcase); + +assert.sameValue(typeof d.get, 'function', 'typeof d.get'); +assert.sameValue(d.set, undefined, 'd.set'); +assert.sameValue(d.enumerable, false, 'd.enumerable'); +assert.sameValue(d.configurable, true, 'd.configurable'); diff --git a/test/built-ins/RegExp/prototype/source/15.10.7.1-2.js b/test/built-ins/RegExp/prototype/source/15.10.7.1-2.js index eebeb495d4..2af0b47a2a 100644 --- a/test/built-ins/RegExp/prototype/source/15.10.7.1-2.js +++ b/test/built-ins/RegExp/prototype/source/15.10.7.1-2.js @@ -6,17 +6,12 @@ es5id: 15.10.7.1-2 description: > RegExp.prototype.source is an accessor property whose set accessor function is undefined -includes: [runTestCase.js] ---*/ -function testcase() { var d = Object.getOwnPropertyDescriptor(RegExp.prototype, 'source'); - if (typeof d.get === 'function' && - d.set === undefined && - d.enumerable === false && - d.configurable === true) { - return true; - } - } -runTestCase(testcase); + +assert.sameValue(typeof d.get, 'function', 'typeof d.get'); +assert.sameValue(d.set, undefined, 'd.set'); +assert.sameValue(d.enumerable, false, 'd.enumerable'); +assert.sameValue(d.configurable, true, 'd.configurable');