From 2905e6a293af41eddfeb9d91f219d6d19e04e7e6 Mon Sep 17 00:00:00 2001 From: Valerie R Young Date: Fri, 29 Sep 2017 13:43:51 -0400 Subject: [PATCH] fixup: Add initial tests for trim(Start/End/Left/Right) --- .../built-ins/String/prototype/trimLeft/length.js | 14 ++++++++------ .../built-ins/String/prototype/trimLeft/name.js | 14 ++++++++------ .../String/prototype/trimLeft/prop-desc.js | 11 +++++++---- .../built-ins/String/prototype/trimRight/length.js | 14 ++++++++------ .../built-ins/String/prototype/trimRight/name.js | 14 ++++++++------ .../String/prototype/trimRight/prop-desc.js | 11 +++++++---- test/built-ins/String/prototype/trimEnd/length.js | 14 ++++++++------ test/built-ins/String/prototype/trimEnd/name.js | 14 ++++++++------ .../String/prototype/trimEnd/prop-desc.js | 11 +++++++---- .../built-ins/String/prototype/trimStart/length.js | 14 ++++++++------ test/built-ins/String/prototype/trimStart/name.js | 14 ++++++++------ .../String/prototype/trimStart/prop-desc.js | 11 +++++++---- 12 files changed, 92 insertions(+), 64 deletions(-) diff --git a/test/annexB/built-ins/String/prototype/trimLeft/length.js b/test/annexB/built-ins/String/prototype/trimLeft/length.js index 133c5ec034..7cf7285b70 100644 --- a/test/annexB/built-ins/String/prototype/trimLeft/length.js +++ b/test/annexB/built-ins/String/prototype/trimLeft/length.js @@ -2,7 +2,7 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -esid: pending +esid: sec-string.prototype.trimLeft description: > String.prototype.trimLeft.length is 0. info: > @@ -20,10 +20,12 @@ info: > object has the attributes { [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: true }. includes: [propertyHelper.js] +features: [string-trimming] ---*/ -assert.sameValue(String.prototype.trimLeft.length, 0); - -verifyNotEnumerable(String.prototype.trimLeft, "length"); -verifyNotWritable(String.prototype.trimLeft, "length"); -verifyConfigurable(String.prototype.trimLeft, "length"); +verifyProperty(String.prototype.trimLeft, "length", { + value: 0, + enumerable: false, + writable: false, + configurable: true, +}); diff --git a/test/annexB/built-ins/String/prototype/trimLeft/name.js b/test/annexB/built-ins/String/prototype/trimLeft/name.js index 75e33ad6af..d9509c3086 100644 --- a/test/annexB/built-ins/String/prototype/trimLeft/name.js +++ b/test/annexB/built-ins/String/prototype/trimLeft/name.js @@ -2,7 +2,7 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -esid: pending +esid: sec-string.prototype.trimLeft description: > String.prototype.trimLeft.name is "trimLeft". info: > @@ -17,10 +17,12 @@ info: > object, if it exists, has the attributes { [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: true }. includes: [propertyHelper.js] +features: [string-trimming] ---*/ -assert.sameValue(String.prototype.trimLeft.name, "valueOf"); - -verifyNotEnumerable(String.prototype.trimLeft, "name"); -verifyNotWritable(String.prototype.trimLeft, "name"); -verifyConfigurable(String.prototype.trimLeft, "name"); +verifyProperty(String.prototype.trimLeft, "name", { + value: "trimLeft", + enumerable: false, + writable: false, + configurable: true, +}); diff --git a/test/annexB/built-ins/String/prototype/trimLeft/prop-desc.js b/test/annexB/built-ins/String/prototype/trimLeft/prop-desc.js index 1155025873..90f5f355f7 100644 --- a/test/annexB/built-ins/String/prototype/trimLeft/prop-desc.js +++ b/test/annexB/built-ins/String/prototype/trimLeft/prop-desc.js @@ -2,7 +2,7 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -esid: pending +esid: sec-string.prototype.trimLeft description: > "trimLeft" property of String.prototype info: > @@ -12,8 +12,11 @@ info: > has the attributes { [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true } unless otherwise specified. includes: [propertyHelper.js] +features: [string-trimming] ---*/ -verifyNotEnumerable(String.prototype, "trimLeft"); -verifyWritable(String.prototype, "trimLeft"); -verifyConfigurable(String.prototype, "trimLeft); +verifyProperty(String.prototype, "trimLeft", { + enumerable: false, + writable: true, + configurable: true, +}); diff --git a/test/annexB/built-ins/String/prototype/trimRight/length.js b/test/annexB/built-ins/String/prototype/trimRight/length.js index 8392634261..0108341d7b 100644 --- a/test/annexB/built-ins/String/prototype/trimRight/length.js +++ b/test/annexB/built-ins/String/prototype/trimRight/length.js @@ -2,7 +2,7 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -esid: pending +esid: sec-string.prototype.trimRight description: > String.prototype.trimRight.length is 0. info: > @@ -20,10 +20,12 @@ info: > object has the attributes { [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: true }. includes: [propertyHelper.js] +features: [string-trimming] ---*/ -assert.sameValue(String.prototype.trimRight.length, 0); - -verifyNotEnumerable(String.prototype.trimRight, "length"); -verifyNotWritable(String.prototype.trimRight, "length"); -verifyConfigurable(String.prototype.trimRight, "length"); +verifyProperty(String.prototype.trimRight, "length", { + value: 0, + enumerable: false, + writable: false, + configurable: true, +}); diff --git a/test/annexB/built-ins/String/prototype/trimRight/name.js b/test/annexB/built-ins/String/prototype/trimRight/name.js index e5cea32442..14f6b494fc 100644 --- a/test/annexB/built-ins/String/prototype/trimRight/name.js +++ b/test/annexB/built-ins/String/prototype/trimRight/name.js @@ -2,7 +2,7 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -esid: pending +esid: sec-string.prototype.trimRight description: > String.prototype.trimRight.name is "trimRight". info: > @@ -17,10 +17,12 @@ info: > object, if it exists, has the attributes { [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: true }. includes: [propertyHelper.js] +features: [string-trimming] ---*/ -assert.sameValue(String.prototype.trimRight.name, "valueOf"); - -verifyNotEnumerable(String.prototype.trimRight, "name"); -verifyNotWritable(String.prototype.trimRight, "name"); -verifyConfigurable(String.prototype.trimRight, "name"); +verifyProperty(String.prototype.trimRight, "name", { + value: "trimRight", + enumerable: false, + writable: false, + configurable: true, +}); diff --git a/test/annexB/built-ins/String/prototype/trimRight/prop-desc.js b/test/annexB/built-ins/String/prototype/trimRight/prop-desc.js index fb3f81e0b0..9aad54d47d 100644 --- a/test/annexB/built-ins/String/prototype/trimRight/prop-desc.js +++ b/test/annexB/built-ins/String/prototype/trimRight/prop-desc.js @@ -2,7 +2,7 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -esid: pending +esid: sec-string.prototype.trimRight description: > "trimRight" property of String.prototype info: > @@ -12,8 +12,11 @@ info: > has the attributes { [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true } unless otherwise specified. includes: [propertyHelper.js] +features: [string-trimming] ---*/ -verifyNotEnumerable(String.prototype, "trimRight"); -verifyWritable(String.prototype, "trimRight"); -verifyConfigurable(String.prototype, "trimRight); +verifyProperty(String.prototype, "trimRight", { + enumerable: false, + writable: true, + configurable: true, +}); diff --git a/test/built-ins/String/prototype/trimEnd/length.js b/test/built-ins/String/prototype/trimEnd/length.js index a035d378b3..37c9fd8b82 100644 --- a/test/built-ins/String/prototype/trimEnd/length.js +++ b/test/built-ins/String/prototype/trimEnd/length.js @@ -2,7 +2,7 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -esid: pending +esid: sec-string.prototype.trimEnd description: > String.prototype.trimEnd.length is 0. info: > @@ -20,10 +20,12 @@ info: > object has the attributes { [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: true }. includes: [propertyHelper.js] +features: [string-trimming] ---*/ -assert.sameValue(String.prototype.trimEnd.length, 0); - -verifyNotEnumerable(String.prototype.trimEnd, "length"); -verifyNotWritable(String.prototype.trimEnd, "length"); -verifyConfigurable(String.prototype.trimEnd, "length"); +verifyProperty(String.prototype.trimEnd, "length", { + value: 0, + enumerable: false, + writable: false, + configurable: true, +}); diff --git a/test/built-ins/String/prototype/trimEnd/name.js b/test/built-ins/String/prototype/trimEnd/name.js index d76b00fcd0..6a0dc7aecc 100644 --- a/test/built-ins/String/prototype/trimEnd/name.js +++ b/test/built-ins/String/prototype/trimEnd/name.js @@ -2,7 +2,7 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -esid: pending +esid: sec-string.prototype.trimEnd description: > String.prototype.trimEnd.name is "trimEnd". info: > @@ -17,10 +17,12 @@ info: > object, if it exists, has the attributes { [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: true }. includes: [propertyHelper.js] +features: [string-trimming] ---*/ -assert.sameValue(String.prototype.trimEnd.name, "valueOf"); - -verifyNotEnumerable(String.prototype.trimEnd, "name"); -verifyNotWritable(String.prototype.trimEnd, "name"); -verifyConfigurable(String.prototype.trimEnd, "name"); +verifyProperty(String.prototype.trimEnd, "name", { + value: "trimEnd", + enumerable: false, + writable: false, + configurable: true, +}); diff --git a/test/built-ins/String/prototype/trimEnd/prop-desc.js b/test/built-ins/String/prototype/trimEnd/prop-desc.js index fad9eac35c..990e201b48 100644 --- a/test/built-ins/String/prototype/trimEnd/prop-desc.js +++ b/test/built-ins/String/prototype/trimEnd/prop-desc.js @@ -2,7 +2,7 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -esid: pending +esid: sec-string.prototype.trimEnd description: > "trimEnd" property of String.prototype info: > @@ -12,8 +12,11 @@ info: > has the attributes { [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true } unless otherwise specified. includes: [propertyHelper.js] +features: [string-trimming] ---*/ -verifyNotEnumerable(String.prototype, "trimEnd"); -verifyWritable(String.prototype, "trimEnd"); -verifyConfigurable(String.prototype, "trimEnd"); +verifyProperty(String.prototype, "trimEnd", { + enumerable: false, + writable: true, + configurable: true, +}); diff --git a/test/built-ins/String/prototype/trimStart/length.js b/test/built-ins/String/prototype/trimStart/length.js index 0887a52c5b..43373b2cdc 100644 --- a/test/built-ins/String/prototype/trimStart/length.js +++ b/test/built-ins/String/prototype/trimStart/length.js @@ -2,7 +2,7 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -esid: pending +esid: sec-string.prototype.trimStart description: > String.prototype.trimStart.length is 0. info: > @@ -20,10 +20,12 @@ info: > object has the attributes { [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: true }. includes: [propertyHelper.js] +features: [string-trimming] ---*/ -assert.sameValue(String.prototype.trimStart.length, 0); - -verifyNotEnumerable(String.prototype.trimStart, "length"); -verifyNotWritable(String.prototype.trimStart, "length"); -verifyConfigurable(String.prototype.trimStart, "length"); +verifyProperty(String.prototype.trimStart, "length", { + value: 0, + enumerable: false, + writable: false, + configurable: true, +}); diff --git a/test/built-ins/String/prototype/trimStart/name.js b/test/built-ins/String/prototype/trimStart/name.js index 68e14ded40..60a3442af8 100644 --- a/test/built-ins/String/prototype/trimStart/name.js +++ b/test/built-ins/String/prototype/trimStart/name.js @@ -2,7 +2,7 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -esid: pending +esid: sec-string.prototype.trimStart description: > String.prototype.trimStart.name is "trimStart". info: > @@ -17,10 +17,12 @@ info: > object, if it exists, has the attributes { [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: true }. includes: [propertyHelper.js] +features: [string-trimming] ---*/ -assert.sameValue(String.prototype.trimStart.name, "valueOf"); - -verifyNotEnumerable(String.prototype.trimStart, "name"); -verifyNotWritable(String.prototype.trimStart, "name"); -verifyConfigurable(String.prototype.trimStart, "name"); +verifyProperty(String.prototype.trimStart, "name", { + value: "trimStart", + enumerable: false, + writable: false, + configurable: true, +}); diff --git a/test/built-ins/String/prototype/trimStart/prop-desc.js b/test/built-ins/String/prototype/trimStart/prop-desc.js index d2403dc15b..a7f55ab691 100644 --- a/test/built-ins/String/prototype/trimStart/prop-desc.js +++ b/test/built-ins/String/prototype/trimStart/prop-desc.js @@ -2,7 +2,7 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -esid: pending +esid: sec-string.prototype.trimStart description: > "trimStart" property of String.prototype info: > @@ -12,8 +12,11 @@ info: > has the attributes { [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true } unless otherwise specified. includes: [propertyHelper.js] +features: [string-trimming] ---*/ -verifyNotEnumerable(String.prototype, "trimStart"); -verifyWritable(String.prototype, "trimStart"); -verifyConfigurable(String.prototype, "trimStart"); +verifyProperty(String.prototype, "trimStart", { + enumerable: false, + writable: true, + configurable: true, +});