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.
/*---
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,
});

View File

@ -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,
});

View File

@ -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,
});

View File

@ -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,
});

View File

@ -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,
});

View File

@ -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,
});

View File

@ -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,
});

View File

@ -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,
});

View File

@ -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,
});

View File

@ -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,
});

View File

@ -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,
});

View File

@ -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,
});