From 5931e313fc1ed6d3eafb1a0be8c30f32cf8d41ac Mon Sep 17 00:00:00 2001
From: Valerie R Young <valerie@bocoup.com>
Date: Mon, 25 Sep 2017 14:01:27 -0400
Subject: [PATCH] Add initial tests for trim(Start/End/Left/Right)

---
 .../String/prototype/trimLeft/length.js       | 29 +++++++++++++++++++
 .../String/prototype/trimLeft/name.js         | 26 +++++++++++++++++
 .../String/prototype/trimLeft/prop-desc.js    | 19 ++++++++++++
 .../String/prototype/trimRight/length.js      | 29 +++++++++++++++++++
 .../String/prototype/trimRight/name.js        | 26 +++++++++++++++++
 .../String/prototype/trimRight/prop-desc.js   | 19 ++++++++++++
 .../String/prototype/trimEnd/length.js        | 29 +++++++++++++++++++
 .../String/prototype/trimEnd/name.js          | 26 +++++++++++++++++
 .../String/prototype/trimEnd/prop-desc.js     | 19 ++++++++++++
 .../String/prototype/trimStart/length.js      | 29 +++++++++++++++++++
 .../String/prototype/trimStart/name.js        | 26 +++++++++++++++++
 .../String/prototype/trimStart/prop-desc.js   | 19 ++++++++++++
 12 files changed, 296 insertions(+)
 create mode 100644 test/annexB/built-ins/String/prototype/trimLeft/length.js
 create mode 100644 test/annexB/built-ins/String/prototype/trimLeft/name.js
 create mode 100644 test/annexB/built-ins/String/prototype/trimLeft/prop-desc.js
 create mode 100644 test/annexB/built-ins/String/prototype/trimRight/length.js
 create mode 100644 test/annexB/built-ins/String/prototype/trimRight/name.js
 create mode 100644 test/annexB/built-ins/String/prototype/trimRight/prop-desc.js
 create mode 100644 test/built-ins/String/prototype/trimEnd/length.js
 create mode 100644 test/built-ins/String/prototype/trimEnd/name.js
 create mode 100644 test/built-ins/String/prototype/trimEnd/prop-desc.js
 create mode 100644 test/built-ins/String/prototype/trimStart/length.js
 create mode 100644 test/built-ins/String/prototype/trimStart/name.js
 create mode 100644 test/built-ins/String/prototype/trimStart/prop-desc.js

diff --git a/test/annexB/built-ins/String/prototype/trimLeft/length.js b/test/annexB/built-ins/String/prototype/trimLeft/length.js
new file mode 100644
index 0000000000..133c5ec034
--- /dev/null
+++ b/test/annexB/built-ins/String/prototype/trimLeft/length.js
@@ -0,0 +1,29 @@
+// 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");
diff --git a/test/annexB/built-ins/String/prototype/trimLeft/name.js b/test/annexB/built-ins/String/prototype/trimLeft/name.js
new file mode 100644
index 0000000000..75e33ad6af
--- /dev/null
+++ b/test/annexB/built-ins/String/prototype/trimLeft/name.js
@@ -0,0 +1,26 @@
+// 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");
diff --git a/test/annexB/built-ins/String/prototype/trimLeft/prop-desc.js b/test/annexB/built-ins/String/prototype/trimLeft/prop-desc.js
new file mode 100644
index 0000000000..1155025873
--- /dev/null
+++ b/test/annexB/built-ins/String/prototype/trimLeft/prop-desc.js
@@ -0,0 +1,19 @@
+// 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);
diff --git a/test/annexB/built-ins/String/prototype/trimRight/length.js b/test/annexB/built-ins/String/prototype/trimRight/length.js
new file mode 100644
index 0000000000..8392634261
--- /dev/null
+++ b/test/annexB/built-ins/String/prototype/trimRight/length.js
@@ -0,0 +1,29 @@
+// 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");
diff --git a/test/annexB/built-ins/String/prototype/trimRight/name.js b/test/annexB/built-ins/String/prototype/trimRight/name.js
new file mode 100644
index 0000000000..e5cea32442
--- /dev/null
+++ b/test/annexB/built-ins/String/prototype/trimRight/name.js
@@ -0,0 +1,26 @@
+// 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");
diff --git a/test/annexB/built-ins/String/prototype/trimRight/prop-desc.js b/test/annexB/built-ins/String/prototype/trimRight/prop-desc.js
new file mode 100644
index 0000000000..fb3f81e0b0
--- /dev/null
+++ b/test/annexB/built-ins/String/prototype/trimRight/prop-desc.js
@@ -0,0 +1,19 @@
+// 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);
diff --git a/test/built-ins/String/prototype/trimEnd/length.js b/test/built-ins/String/prototype/trimEnd/length.js
new file mode 100644
index 0000000000..a035d378b3
--- /dev/null
+++ b/test/built-ins/String/prototype/trimEnd/length.js
@@ -0,0 +1,29 @@
+// 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");
diff --git a/test/built-ins/String/prototype/trimEnd/name.js b/test/built-ins/String/prototype/trimEnd/name.js
new file mode 100644
index 0000000000..d76b00fcd0
--- /dev/null
+++ b/test/built-ins/String/prototype/trimEnd/name.js
@@ -0,0 +1,26 @@
+// 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");
diff --git a/test/built-ins/String/prototype/trimEnd/prop-desc.js b/test/built-ins/String/prototype/trimEnd/prop-desc.js
new file mode 100644
index 0000000000..fad9eac35c
--- /dev/null
+++ b/test/built-ins/String/prototype/trimEnd/prop-desc.js
@@ -0,0 +1,19 @@
+// 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");
diff --git a/test/built-ins/String/prototype/trimStart/length.js b/test/built-ins/String/prototype/trimStart/length.js
new file mode 100644
index 0000000000..0887a52c5b
--- /dev/null
+++ b/test/built-ins/String/prototype/trimStart/length.js
@@ -0,0 +1,29 @@
+// 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");
diff --git a/test/built-ins/String/prototype/trimStart/name.js b/test/built-ins/String/prototype/trimStart/name.js
new file mode 100644
index 0000000000..68e14ded40
--- /dev/null
+++ b/test/built-ins/String/prototype/trimStart/name.js
@@ -0,0 +1,26 @@
+// 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");
diff --git a/test/built-ins/String/prototype/trimStart/prop-desc.js b/test/built-ins/String/prototype/trimStart/prop-desc.js
new file mode 100644
index 0000000000..d2403dc15b
--- /dev/null
+++ b/test/built-ins/String/prototype/trimStart/prop-desc.js
@@ -0,0 +1,19 @@
+// 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");
-- 
GitLab