fixup: Add initial tests for trim(Start/End/Left/Right)

This commit is contained in:
Valerie R Young 2017-09-29 13:43:51 -04:00 committed by Rick Waldron
parent 0c796ea88b
commit 2905e6a293
12 changed files with 92 additions and 64 deletions

View File

@ -2,7 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file. // This code is governed by the BSD license found in the LICENSE file.
/*--- /*---
esid: pending esid: sec-string.prototype.trimLeft
description: > description: >
String.prototype.trimLeft.length is 0. String.prototype.trimLeft.length is 0.
info: > info: >
@ -20,10 +20,12 @@ info: >
object has the attributes { [[Writable]]: false, [[Enumerable]]: false, object has the attributes { [[Writable]]: false, [[Enumerable]]: false,
[[Configurable]]: true }. [[Configurable]]: true }.
includes: [propertyHelper.js] includes: [propertyHelper.js]
features: [string-trimming]
---*/ ---*/
assert.sameValue(String.prototype.trimLeft.length, 0); verifyProperty(String.prototype.trimLeft, "length", {
value: 0,
verifyNotEnumerable(String.prototype.trimLeft, "length"); enumerable: false,
verifyNotWritable(String.prototype.trimLeft, "length"); writable: false,
verifyConfigurable(String.prototype.trimLeft, "length"); configurable: true,
});

View File

@ -2,7 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file. // This code is governed by the BSD license found in the LICENSE file.
/*--- /*---
esid: pending esid: sec-string.prototype.trimLeft
description: > description: >
String.prototype.trimLeft.name is "trimLeft". String.prototype.trimLeft.name is "trimLeft".
info: > info: >
@ -17,10 +17,12 @@ info: >
object, if it exists, has the attributes { [[Writable]]: false, object, if it exists, has the attributes { [[Writable]]: false,
[[Enumerable]]: false, [[Configurable]]: true }. [[Enumerable]]: false, [[Configurable]]: true }.
includes: [propertyHelper.js] includes: [propertyHelper.js]
features: [string-trimming]
---*/ ---*/
assert.sameValue(String.prototype.trimLeft.name, "valueOf"); verifyProperty(String.prototype.trimLeft, "name", {
value: "trimLeft",
verifyNotEnumerable(String.prototype.trimLeft, "name"); enumerable: false,
verifyNotWritable(String.prototype.trimLeft, "name"); writable: false,
verifyConfigurable(String.prototype.trimLeft, "name"); configurable: true,
});

View File

@ -2,7 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file. // This code is governed by the BSD license found in the LICENSE file.
/*--- /*---
esid: pending esid: sec-string.prototype.trimLeft
description: > description: >
"trimLeft" property of String.prototype "trimLeft" property of String.prototype
info: > info: >
@ -12,8 +12,11 @@ info: >
has the attributes { [[Writable]]: true, [[Enumerable]]: false, has the attributes { [[Writable]]: true, [[Enumerable]]: false,
[[Configurable]]: true } unless otherwise specified. [[Configurable]]: true } unless otherwise specified.
includes: [propertyHelper.js] includes: [propertyHelper.js]
features: [string-trimming]
---*/ ---*/
verifyNotEnumerable(String.prototype, "trimLeft"); verifyProperty(String.prototype, "trimLeft", {
verifyWritable(String.prototype, "trimLeft"); enumerable: false,
verifyConfigurable(String.prototype, "trimLeft); writable: true,
configurable: true,
});

View File

@ -2,7 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file. // This code is governed by the BSD license found in the LICENSE file.
/*--- /*---
esid: pending esid: sec-string.prototype.trimRight
description: > description: >
String.prototype.trimRight.length is 0. String.prototype.trimRight.length is 0.
info: > info: >
@ -20,10 +20,12 @@ info: >
object has the attributes { [[Writable]]: false, [[Enumerable]]: false, object has the attributes { [[Writable]]: false, [[Enumerable]]: false,
[[Configurable]]: true }. [[Configurable]]: true }.
includes: [propertyHelper.js] includes: [propertyHelper.js]
features: [string-trimming]
---*/ ---*/
assert.sameValue(String.prototype.trimRight.length, 0); verifyProperty(String.prototype.trimRight, "length", {
value: 0,
verifyNotEnumerable(String.prototype.trimRight, "length"); enumerable: false,
verifyNotWritable(String.prototype.trimRight, "length"); writable: false,
verifyConfigurable(String.prototype.trimRight, "length"); configurable: true,
});

View File

@ -2,7 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file. // This code is governed by the BSD license found in the LICENSE file.
/*--- /*---
esid: pending esid: sec-string.prototype.trimRight
description: > description: >
String.prototype.trimRight.name is "trimRight". String.prototype.trimRight.name is "trimRight".
info: > info: >
@ -17,10 +17,12 @@ info: >
object, if it exists, has the attributes { [[Writable]]: false, object, if it exists, has the attributes { [[Writable]]: false,
[[Enumerable]]: false, [[Configurable]]: true }. [[Enumerable]]: false, [[Configurable]]: true }.
includes: [propertyHelper.js] includes: [propertyHelper.js]
features: [string-trimming]
---*/ ---*/
assert.sameValue(String.prototype.trimRight.name, "valueOf"); verifyProperty(String.prototype.trimRight, "name", {
value: "trimRight",
verifyNotEnumerable(String.prototype.trimRight, "name"); enumerable: false,
verifyNotWritable(String.prototype.trimRight, "name"); writable: false,
verifyConfigurable(String.prototype.trimRight, "name"); configurable: true,
});

View File

@ -2,7 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file. // This code is governed by the BSD license found in the LICENSE file.
/*--- /*---
esid: pending esid: sec-string.prototype.trimRight
description: > description: >
"trimRight" property of String.prototype "trimRight" property of String.prototype
info: > info: >
@ -12,8 +12,11 @@ info: >
has the attributes { [[Writable]]: true, [[Enumerable]]: false, has the attributes { [[Writable]]: true, [[Enumerable]]: false,
[[Configurable]]: true } unless otherwise specified. [[Configurable]]: true } unless otherwise specified.
includes: [propertyHelper.js] includes: [propertyHelper.js]
features: [string-trimming]
---*/ ---*/
verifyNotEnumerable(String.prototype, "trimRight"); verifyProperty(String.prototype, "trimRight", {
verifyWritable(String.prototype, "trimRight"); enumerable: false,
verifyConfigurable(String.prototype, "trimRight); writable: true,
configurable: true,
});

View File

@ -2,7 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file. // This code is governed by the BSD license found in the LICENSE file.
/*--- /*---
esid: pending esid: sec-string.prototype.trimEnd
description: > description: >
String.prototype.trimEnd.length is 0. String.prototype.trimEnd.length is 0.
info: > info: >
@ -20,10 +20,12 @@ info: >
object has the attributes { [[Writable]]: false, [[Enumerable]]: false, object has the attributes { [[Writable]]: false, [[Enumerable]]: false,
[[Configurable]]: true }. [[Configurable]]: true }.
includes: [propertyHelper.js] includes: [propertyHelper.js]
features: [string-trimming]
---*/ ---*/
assert.sameValue(String.prototype.trimEnd.length, 0); verifyProperty(String.prototype.trimEnd, "length", {
value: 0,
verifyNotEnumerable(String.prototype.trimEnd, "length"); enumerable: false,
verifyNotWritable(String.prototype.trimEnd, "length"); writable: false,
verifyConfigurable(String.prototype.trimEnd, "length"); configurable: true,
});

View File

@ -2,7 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file. // This code is governed by the BSD license found in the LICENSE file.
/*--- /*---
esid: pending esid: sec-string.prototype.trimEnd
description: > description: >
String.prototype.trimEnd.name is "trimEnd". String.prototype.trimEnd.name is "trimEnd".
info: > info: >
@ -17,10 +17,12 @@ info: >
object, if it exists, has the attributes { [[Writable]]: false, object, if it exists, has the attributes { [[Writable]]: false,
[[Enumerable]]: false, [[Configurable]]: true }. [[Enumerable]]: false, [[Configurable]]: true }.
includes: [propertyHelper.js] includes: [propertyHelper.js]
features: [string-trimming]
---*/ ---*/
assert.sameValue(String.prototype.trimEnd.name, "valueOf"); verifyProperty(String.prototype.trimEnd, "name", {
value: "trimEnd",
verifyNotEnumerable(String.prototype.trimEnd, "name"); enumerable: false,
verifyNotWritable(String.prototype.trimEnd, "name"); writable: false,
verifyConfigurable(String.prototype.trimEnd, "name"); configurable: true,
});

View File

@ -2,7 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file. // This code is governed by the BSD license found in the LICENSE file.
/*--- /*---
esid: pending esid: sec-string.prototype.trimEnd
description: > description: >
"trimEnd" property of String.prototype "trimEnd" property of String.prototype
info: > info: >
@ -12,8 +12,11 @@ info: >
has the attributes { [[Writable]]: true, [[Enumerable]]: false, has the attributes { [[Writable]]: true, [[Enumerable]]: false,
[[Configurable]]: true } unless otherwise specified. [[Configurable]]: true } unless otherwise specified.
includes: [propertyHelper.js] includes: [propertyHelper.js]
features: [string-trimming]
---*/ ---*/
verifyNotEnumerable(String.prototype, "trimEnd"); verifyProperty(String.prototype, "trimEnd", {
verifyWritable(String.prototype, "trimEnd"); enumerable: false,
verifyConfigurable(String.prototype, "trimEnd"); writable: true,
configurable: true,
});

View File

@ -2,7 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file. // This code is governed by the BSD license found in the LICENSE file.
/*--- /*---
esid: pending esid: sec-string.prototype.trimStart
description: > description: >
String.prototype.trimStart.length is 0. String.prototype.trimStart.length is 0.
info: > info: >
@ -20,10 +20,12 @@ info: >
object has the attributes { [[Writable]]: false, [[Enumerable]]: false, object has the attributes { [[Writable]]: false, [[Enumerable]]: false,
[[Configurable]]: true }. [[Configurable]]: true }.
includes: [propertyHelper.js] includes: [propertyHelper.js]
features: [string-trimming]
---*/ ---*/
assert.sameValue(String.prototype.trimStart.length, 0); verifyProperty(String.prototype.trimStart, "length", {
value: 0,
verifyNotEnumerable(String.prototype.trimStart, "length"); enumerable: false,
verifyNotWritable(String.prototype.trimStart, "length"); writable: false,
verifyConfigurable(String.prototype.trimStart, "length"); configurable: true,
});

View File

@ -2,7 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file. // This code is governed by the BSD license found in the LICENSE file.
/*--- /*---
esid: pending esid: sec-string.prototype.trimStart
description: > description: >
String.prototype.trimStart.name is "trimStart". String.prototype.trimStart.name is "trimStart".
info: > info: >
@ -17,10 +17,12 @@ info: >
object, if it exists, has the attributes { [[Writable]]: false, object, if it exists, has the attributes { [[Writable]]: false,
[[Enumerable]]: false, [[Configurable]]: true }. [[Enumerable]]: false, [[Configurable]]: true }.
includes: [propertyHelper.js] includes: [propertyHelper.js]
features: [string-trimming]
---*/ ---*/
assert.sameValue(String.prototype.trimStart.name, "valueOf"); verifyProperty(String.prototype.trimStart, "name", {
value: "trimStart",
verifyNotEnumerable(String.prototype.trimStart, "name"); enumerable: false,
verifyNotWritable(String.prototype.trimStart, "name"); writable: false,
verifyConfigurable(String.prototype.trimStart, "name"); configurable: true,
});

View File

@ -2,7 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file. // This code is governed by the BSD license found in the LICENSE file.
/*--- /*---
esid: pending esid: sec-string.prototype.trimStart
description: > description: >
"trimStart" property of String.prototype "trimStart" property of String.prototype
info: > info: >
@ -12,8 +12,11 @@ info: >
has the attributes { [[Writable]]: true, [[Enumerable]]: false, has the attributes { [[Writable]]: true, [[Enumerable]]: false,
[[Configurable]]: true } unless otherwise specified. [[Configurable]]: true } unless otherwise specified.
includes: [propertyHelper.js] includes: [propertyHelper.js]
features: [string-trimming]
---*/ ---*/
verifyNotEnumerable(String.prototype, "trimStart"); verifyProperty(String.prototype, "trimStart", {
verifyWritable(String.prototype, "trimStart"); enumerable: false,
verifyConfigurable(String.prototype, "trimStart"); writable: true,
configurable: true,
});