diff --git a/test/annexB/B.2.1.js b/test/annexB/B.2.1.js index 126f707e1b..2c0ee03262 100644 --- a/test/annexB/B.2.1.js +++ b/test/annexB/B.2.1.js @@ -7,18 +7,12 @@ description: > Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Global.escape) includes: - - runTestCase.js - fnGlobalObject.js + - propertyHelper.js ---*/ -function testcase() { - var global = fnGlobalObject(); - var desc = Object.getOwnPropertyDescriptor(global, "escape"); - if (desc.value === global.escape && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +var global = fnGlobalObject(); + +verifyWritable(global, "escape"); +verifyNotEnumerable(global, "escape"); +verifyConfigurable(global, "escape"); diff --git a/test/annexB/B.2.2.js b/test/annexB/B.2.2.js index 114a7afec7..2b37c3a21d 100644 --- a/test/annexB/B.2.2.js +++ b/test/annexB/B.2.2.js @@ -7,18 +7,12 @@ description: > Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Global.unescape) includes: - - runTestCase.js - fnGlobalObject.js + - propertyHelper.js ---*/ -function testcase() { - var global = fnGlobalObject(); - var desc = Object.getOwnPropertyDescriptor(global, "unescape"); - if (desc.value === global.unescape && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +var global = fnGlobalObject(); + +verifyWritable(global, "unescape"); +verifyNotEnumerable(global, "unescape"); +verifyConfigurable(global, "unescape"); diff --git a/test/annexB/B.2.3.js b/test/annexB/B.2.3.js index 0c12967380..4f7bb57dad 100644 --- a/test/annexB/B.2.3.js +++ b/test/annexB/B.2.3.js @@ -6,16 +6,9 @@ es5id: B.2.3 description: > Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (String.prototype.substr) -includes: [runTestCase.js] +includes: [propertyHelper.js] ---*/ -function testcase() { - var desc = Object.getOwnPropertyDescriptor(String.prototype, "substr"); - if (desc.value === String.prototype.substr && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +verifyWritable(String.prototype, "substr"); +verifyNotEnumerable(String.prototype, "substr"); +verifyConfigurable(String.prototype, "substr"); diff --git a/test/annexB/B.2.4.js b/test/annexB/B.2.4.js index 320105df98..27e1e0300d 100644 --- a/test/annexB/B.2.4.js +++ b/test/annexB/B.2.4.js @@ -6,16 +6,9 @@ es5id: B.2.4 description: > Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.getYear) -includes: [runTestCase.js] +includes: [propertyHelper.js] ---*/ -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getYear"); - if (desc.value === Date.prototype.getYear && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +verifyWritable(Date.prototype, "getYear"); +verifyNotEnumerable(Date.prototype, "getYear"); +verifyConfigurable(Date.prototype, "getYear"); diff --git a/test/annexB/B.2.5.js b/test/annexB/B.2.5.js index 91fd5b5196..32e65dc938 100644 --- a/test/annexB/B.2.5.js +++ b/test/annexB/B.2.5.js @@ -6,16 +6,9 @@ es5id: B.2.5 description: > Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.setYear) -includes: [runTestCase.js] +includes: [propertyHelper.js] ---*/ -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Date.prototype, "setYear"); - if (desc.value === Date.prototype.setYear && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +verifyWritable(Date.prototype, "setYear"); +verifyNotEnumerable(Date.prototype, "setYear"); +verifyConfigurable(Date.prototype, "setYear"); diff --git a/test/annexB/B.2.6.js b/test/annexB/B.2.6.js index 8ce49179ec..0a7236a93d 100644 --- a/test/annexB/B.2.6.js +++ b/test/annexB/B.2.6.js @@ -6,16 +6,10 @@ es5id: B.2.6 description: > Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.toGMTString) -includes: [runTestCase.js] +includes: [propertyHelper.js] + ---*/ -function testcase() { - var desc = Object.getOwnPropertyDescriptor(Date.prototype, "toGMTString"); - if (desc.value === Date.prototype.toGMTString && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +verifyWritable(Date.prototype, "toGMTString"); +verifyNotEnumerable(Date.prototype, "toGMTString"); +verifyConfigurable(Date.prototype, "toGMTString"); diff --git a/test/annexB/B.RegExp.prototype.compile.js b/test/annexB/B.RegExp.prototype.compile.js index 31aef97429..e5617fbcb9 100644 --- a/test/annexB/B.RegExp.prototype.compile.js +++ b/test/annexB/B.RegExp.prototype.compile.js @@ -6,16 +6,9 @@ es6id: B.2.5.1 description: > Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (RegExp.prototype.compile) -includes: [runTestCase.js] +includes: [propertyHelper.js] ---*/ -function testcase() { - var desc = Object.getOwnPropertyDescriptor(RegExp.prototype, "compile"); - if (desc.value === RegExp.prototype.compile && - desc.writable === true && - desc.enumerable === false && - desc.configurable === true) { - return true; - } - } -runTestCase(testcase); +verifyWritable(RegExp.prototype, "compile"); +verifyNotEnumerable(RegExp.prototype, "compile"); +verifyConfigurable(RegExp.prototype, "compile");