Skip to content
Snippets Groups Projects
Commit 5931e313 authored by Valerie R Young's avatar Valerie R Young Committed by Rick Waldron
Browse files

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

parent 40a7bd24
No related branches found
No related tags found
No related merge requests found
Showing
with 296 additions and 0 deletions
// Copyright (C) 2017 Valerie Young. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: pending
description: >
String.prototype.trimLeft.length is 0.
info: >
String.prototype.trimLeft ( )
17 ECMAScript Standard Built-in Objects:
Every built-in Function object, including constructors, has a length
property whose value is an integer. Unless otherwise specified, this
value is equal to the largest number of named arguments shown in the
subclause headings for the function description, including optional
parameters. However, rest parameters shown using the form “...name”
are not included in the default argument count.
Unless otherwise specified, the length property of a built-in Function
object has the attributes { [[Writable]]: false, [[Enumerable]]: false,
[[Configurable]]: true }.
includes: [propertyHelper.js]
---*/
assert.sameValue(String.prototype.trimLeft.length, 0);
verifyNotEnumerable(String.prototype.trimLeft, "length");
verifyNotWritable(String.prototype.trimLeft, "length");
verifyConfigurable(String.prototype.trimLeft, "length");
// Copyright (C) 2017 Valerie Young. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: pending
description: >
String.prototype.trimLeft.name is "trimLeft".
info: >
String.prototype.trimLeft ( )
17 ECMAScript Standard Built-in Objects:
Every built-in Function object, including constructors, that is not
identified as an anonymous function has a name property whose value
is a String.
Unless otherwise specified, the name property of a built-in Function
object, if it exists, has the attributes { [[Writable]]: false,
[[Enumerable]]: false, [[Configurable]]: true }.
includes: [propertyHelper.js]
---*/
assert.sameValue(String.prototype.trimLeft.name, "valueOf");
verifyNotEnumerable(String.prototype.trimLeft, "name");
verifyNotWritable(String.prototype.trimLeft, "name");
verifyConfigurable(String.prototype.trimLeft, "name");
// Copyright (C) 2017 The Valerie Young. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: pending
description: >
"trimLeft" property of String.prototype
info: >
17 ECMAScript Standard Built-in Objects:
Every other data property described in clauses 18 through 26 and in Annex B.2
has the attributes { [[Writable]]: true, [[Enumerable]]: false,
[[Configurable]]: true } unless otherwise specified.
includes: [propertyHelper.js]
---*/
verifyNotEnumerable(String.prototype, "trimLeft");
verifyWritable(String.prototype, "trimLeft");
verifyConfigurable(String.prototype, "trimLeft);
// Copyright (C) 2017 Valerie Young. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: pending
description: >
String.prototype.trimRight.length is 0.
info: >
String.prototype.trimRight ( )
17 ECMAScript Standard Built-in Objects:
Every built-in Function object, including constructors, has a length
property whose value is an integer. Unless otherwise specified, this
value is equal to the largest number of named arguments shown in the
subclause headings for the function description, including optional
parameters. However, rest parameters shown using the form “...name”
are not included in the default argument count.
Unless otherwise specified, the length property of a built-in Function
object has the attributes { [[Writable]]: false, [[Enumerable]]: false,
[[Configurable]]: true }.
includes: [propertyHelper.js]
---*/
assert.sameValue(String.prototype.trimRight.length, 0);
verifyNotEnumerable(String.prototype.trimRight, "length");
verifyNotWritable(String.prototype.trimRight, "length");
verifyConfigurable(String.prototype.trimRight, "length");
// Copyright (C) 2017 Valerie Young. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: pending
description: >
String.prototype.trimRight.name is "trimRight".
info: >
String.prototype.trimRight ( )
17 ECMAScript Standard Built-in Objects:
Every built-in Function object, including constructors, that is not
identified as an anonymous function has a name property whose value
is a String.
Unless otherwise specified, the name property of a built-in Function
object, if it exists, has the attributes { [[Writable]]: false,
[[Enumerable]]: false, [[Configurable]]: true }.
includes: [propertyHelper.js]
---*/
assert.sameValue(String.prototype.trimRight.name, "valueOf");
verifyNotEnumerable(String.prototype.trimRight, "name");
verifyNotWritable(String.prototype.trimRight, "name");
verifyConfigurable(String.prototype.trimRight, "name");
// Copyright (C) 2017 The Valerie Young. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: pending
description: >
"trimRight" property of String.prototype
info: >
17 ECMAScript Standard Built-in Objects:
Every other data property described in clauses 18 through 26 and in Annex B.2
has the attributes { [[Writable]]: true, [[Enumerable]]: false,
[[Configurable]]: true } unless otherwise specified.
includes: [propertyHelper.js]
---*/
verifyNotEnumerable(String.prototype, "trimRight");
verifyWritable(String.prototype, "trimRight");
verifyConfigurable(String.prototype, "trimRight);
// Copyright (C) 2017 Valerie Young. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: pending
description: >
String.prototype.trimEnd.length is 0.
info: >
String.prototype.trimEnd ( )
17 ECMAScript Standard Built-in Objects:
Every built-in Function object, including constructors, has a length
property whose value is an integer. Unless otherwise specified, this
value is equal to the largest number of named arguments shown in the
subclause headings for the function description, including optional
parameters. However, rest parameters shown using the form “...name”
are not included in the default argument count.
Unless otherwise specified, the length property of a built-in Function
object has the attributes { [[Writable]]: false, [[Enumerable]]: false,
[[Configurable]]: true }.
includes: [propertyHelper.js]
---*/
assert.sameValue(String.prototype.trimEnd.length, 0);
verifyNotEnumerable(String.prototype.trimEnd, "length");
verifyNotWritable(String.prototype.trimEnd, "length");
verifyConfigurable(String.prototype.trimEnd, "length");
// Copyright (C) 2017 Valerie Young. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: pending
description: >
String.prototype.trimEnd.name is "trimEnd".
info: >
String.prototype.trimEnd ( )
17 ECMAScript Standard Built-in Objects:
Every built-in Function object, including constructors, that is not
identified as an anonymous function has a name property whose value
is a String.
Unless otherwise specified, the name property of a built-in Function
object, if it exists, has the attributes { [[Writable]]: false,
[[Enumerable]]: false, [[Configurable]]: true }.
includes: [propertyHelper.js]
---*/
assert.sameValue(String.prototype.trimEnd.name, "valueOf");
verifyNotEnumerable(String.prototype.trimEnd, "name");
verifyNotWritable(String.prototype.trimEnd, "name");
verifyConfigurable(String.prototype.trimEnd, "name");
// Copyright (C) 2017 The Valerie Young. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: pending
description: >
"trimEnd" property of String.prototype
info: >
17 ECMAScript Standard Built-in Objects:
Every other data property described in clauses 18 through 26 and in Annex B.2
has the attributes { [[Writable]]: true, [[Enumerable]]: false,
[[Configurable]]: true } unless otherwise specified.
includes: [propertyHelper.js]
---*/
verifyNotEnumerable(String.prototype, "trimEnd");
verifyWritable(String.prototype, "trimEnd");
verifyConfigurable(String.prototype, "trimEnd");
// Copyright (C) 2017 Valerie Young. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: pending
description: >
String.prototype.trimStart.length is 0.
info: >
String.prototype.trimStart ( )
17 ECMAScript Standard Built-in Objects:
Every built-in Function object, including constructors, has a length
property whose value is an integer. Unless otherwise specified, this
value is equal to the largest number of named arguments shown in the
subclause headings for the function description, including optional
parameters. However, rest parameters shown using the form “...name”
are not included in the default argument count.
Unless otherwise specified, the length property of a built-in Function
object has the attributes { [[Writable]]: false, [[Enumerable]]: false,
[[Configurable]]: true }.
includes: [propertyHelper.js]
---*/
assert.sameValue(String.prototype.trimStart.length, 0);
verifyNotEnumerable(String.prototype.trimStart, "length");
verifyNotWritable(String.prototype.trimStart, "length");
verifyConfigurable(String.prototype.trimStart, "length");
// Copyright (C) 2017 Valerie Young. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: pending
description: >
String.prototype.trimStart.name is "trimStart".
info: >
String.prototype.trimStart ( )
17 ECMAScript Standard Built-in Objects:
Every built-in Function object, including constructors, that is not
identified as an anonymous function has a name property whose value
is a String.
Unless otherwise specified, the name property of a built-in Function
object, if it exists, has the attributes { [[Writable]]: false,
[[Enumerable]]: false, [[Configurable]]: true }.
includes: [propertyHelper.js]
---*/
assert.sameValue(String.prototype.trimStart.name, "valueOf");
verifyNotEnumerable(String.prototype.trimStart, "name");
verifyNotWritable(String.prototype.trimStart, "name");
verifyConfigurable(String.prototype.trimStart, "name");
// Copyright (C) 2017 The Valerie Young. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: pending
description: >
"trimStart" property of String.prototype
info: >
17 ECMAScript Standard Built-in Objects:
Every other data property described in clauses 18 through 26 and in Annex B.2
has the attributes { [[Writable]]: true, [[Enumerable]]: false,
[[Configurable]]: true } unless otherwise specified.
includes: [propertyHelper.js]
---*/
verifyNotEnumerable(String.prototype, "trimStart");
verifyWritable(String.prototype, "trimStart");
verifyConfigurable(String.prototype, "trimStart");
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment