summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/built-ins/Set/prototype
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype-of-set.js16
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/Symbol.iterator.js22
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/Symbol.iterator/browser.js0
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/Symbol.iterator/not-a-constructor.js35
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/Symbol.iterator/shell.js0
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/Symbol.toStringTag.js23
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/Symbol.toStringTag/browser.js0
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/Symbol.toStringTag/property-descriptor.js25
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/Symbol.toStringTag/shell.js0
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/add/add.js23
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/add/browser.js0
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/add/does-not-have-setdata-internal-slot-array.js23
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/add/does-not-have-setdata-internal-slot-map.js23
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/add/does-not-have-setdata-internal-slot-object.js23
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/add/does-not-have-setdata-internal-slot-set-prototype.js23
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/add/does-not-have-setdata-internal-slot-weakset.js23
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/add/length.js19
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/add/name.js19
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/add/not-a-constructor.js31
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/add/preserves-insertion-order.js24
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/add/returns-this-when-ignoring-duplicate.js21
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/add/returns-this.js18
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/add/shell.js0
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/add/this-not-object-throw-boolean.js22
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/add/this-not-object-throw-null.js22
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/add/this-not-object-throw-number.js22
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/add/this-not-object-throw-string.js22
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/add/this-not-object-throw-symbol.js23
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/add/this-not-object-throw-undefined.js22
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/add/will-not-add-duplicate-entry-initial-iterable.js27
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/add/will-not-add-duplicate-entry-normalizes-zero.js31
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/add/will-not-add-duplicate-entry.js28
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/browser.js0
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/clear/browser.js0
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/clear/clear.js23
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/clear/clears-all-contents-from-iterable.js28
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/clear/clears-all-contents.js30
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/clear/clears-an-empty-set.js23
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/clear/does-not-have-setdata-internal-slot-array.js23
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/clear/does-not-have-setdata-internal-slot-map.js23
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/clear/does-not-have-setdata-internal-slot-object.js23
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/clear/does-not-have-setdata-internal-slot-set.prototype.js23
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/clear/does-not-have-setdata-internal-slot-weakset.js23
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/clear/length.js19
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/clear/name.js19
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/clear/not-a-constructor.js31
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/clear/returns-undefined.js17
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/clear/shell.js0
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/clear/this-not-object-throw-boolean.js22
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/clear/this-not-object-throw-null.js22
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/clear/this-not-object-throw-number.js22
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/clear/this-not-object-throw-string.js22
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/clear/this-not-object-throw-symbol.js23
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/clear/this-not-object-throw-undefined.js22
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/constructor/browser.js0
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/constructor/set-prototype-constructor-intrinsic.js18
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/constructor/set-prototype-constructor.js17
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/constructor/shell.js0
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/delete/browser.js0
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/delete/delete-entry-initial-iterable.js28
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/delete/delete-entry-normalizes-zero.js27
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/delete/delete-entry.js32
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/delete/delete.js23
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/delete/does-not-have-setdata-internal-slot-array.js23
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/delete/does-not-have-setdata-internal-slot-map.js23
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/delete/does-not-have-setdata-internal-slot-object.js23
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/delete/does-not-have-setdata-internal-slot-set-prototype.js23
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/delete/does-not-have-setdata-internal-slot-weakset.js23
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/delete/length.js19
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/delete/name.js19
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/delete/not-a-constructor.js31
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/delete/returns-false-when-delete-is-noop.js17
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/delete/returns-true-when-delete-operation-occurs.js24
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/delete/shell.js0
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/delete/this-not-object-throw-boolean.js22
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/delete/this-not-object-throw-null.js22
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/delete/this-not-object-throw-number.js22
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/delete/this-not-object-throw-string.js22
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/delete/this-not-object-throw-symbol.js23
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/delete/this-not-object-throw-undefined.js22
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/entries/browser.js0
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/entries/does-not-have-setdata-internal-slot-array.js29
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/entries/does-not-have-setdata-internal-slot-map.js28
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/entries/does-not-have-setdata-internal-slot-object.js28
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/entries/does-not-have-setdata-internal-slot-set-prototype.js28
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/entries/does-not-have-setdata-internal-slot-weakset.js29
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/entries/entries.js23
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/entries/length.js19
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/entries/name.js19
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/entries/not-a-constructor.js35
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/entries/returns-iterator-empty.js27
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/entries/returns-iterator.js58
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/entries/shell.js0
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/entries/this-not-object-throw-boolean.js28
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/entries/this-not-object-throw-null.js27
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/entries/this-not-object-throw-number.js27
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/entries/this-not-object-throw-string.js27
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/entries/this-not-object-throw-symbol.js28
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/entries/this-not-object-throw-undefined.js27
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/forEach/browser.js0
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/forEach/callback-not-callable-boolean.js22
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/forEach/callback-not-callable-null.js22
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/forEach/callback-not-callable-number.js22
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/forEach/callback-not-callable-string.js22
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/forEach/callback-not-callable-symbol.js23
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/forEach/callback-not-callable-undefined.js22
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/forEach/does-not-have-setdata-internal-slot-array.js23
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/forEach/does-not-have-setdata-internal-slot-map.js23
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/forEach/does-not-have-setdata-internal-slot-object.js23
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/forEach/does-not-have-setdata-internal-slot-set-prototype.js23
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/forEach/does-not-have-setdata-internal-slot-weakset.js23
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/forEach/forEach.js23
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/forEach/iterates-in-insertion-order.js31
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/forEach/iterates-in-iterable-entry-order.js29
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/forEach/iterates-values-added-after-foreach-begins.js44
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/forEach/iterates-values-deleted-then-readded.js47
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/forEach/iterates-values-not-deleted.js36
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/forEach/iterates-values-revisits-after-delete-re-add.js47
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/forEach/length.js19
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/forEach/name.js19
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/forEach/not-a-constructor.js35
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/forEach/returns-undefined.js21
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/forEach/shell.js0
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/forEach/this-arg-explicit-cannot-override-lexical-this-arrow.js28
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/forEach/this-arg-explicit.js24
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/forEach/this-non-strict.js26
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/forEach/this-not-object-throw-boolean.js22
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/forEach/this-not-object-throw-null.js22
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/forEach/this-not-object-throw-number.js22
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/forEach/this-not-object-throw-string.js22
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/forEach/this-not-object-throw-symbol.js23
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/forEach/this-not-object-throw-undefined.js22
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/forEach/this-strict-strict.js26
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/forEach/throws-when-callback-throws.js28
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/has/browser.js0
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/has/does-not-have-setdata-internal-slot-array.js23
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/has/does-not-have-setdata-internal-slot-map.js23
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/has/does-not-have-setdata-internal-slot-object.js23
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/has/does-not-have-setdata-internal-slot-set-prototype.js23
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/has/does-not-have-setdata-internal-slot-weakset.js23
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/has/has.js23
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/has/length.js19
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/has/name.js19
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/has/not-a-constructor.js31
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/has/returns-false-when-undefined-added-deleted-not-present-undefined.js23
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/has/returns-false-when-value-not-present-boolean.js17
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/has/returns-false-when-value-not-present-nan.js17
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/has/returns-false-when-value-not-present-null.js17
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/has/returns-false-when-value-not-present-number.js17
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/has/returns-false-when-value-not-present-string.js17
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/has/returns-false-when-value-not-present-symbol.js18
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/has/returns-false-when-value-not-present-undefined.js17
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/has/returns-true-when-value-present-boolean.js21
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/has/returns-true-when-value-present-nan.js21
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/has/returns-true-when-value-present-null.js21
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/has/returns-true-when-value-present-number.js21
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/has/returns-true-when-value-present-string.js21
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/has/returns-true-when-value-present-symbol.js23
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/has/returns-true-when-value-present-undefined.js21
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/has/shell.js0
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/has/this-not-object-throw-boolean.js22
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/has/this-not-object-throw-null.js22
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/has/this-not-object-throw-number.js22
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/has/this-not-object-throw-string.js22
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/has/this-not-object-throw-symbol.js23
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/has/this-not-object-throw-undefined.js22
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/keys/browser.js0
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/keys/keys.js17
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/keys/shell.js0
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/shell.js0
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/size/browser.js0
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/size/length.js22
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/size/name.js25
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/size/returns-count-of-present-values-before-after-add-delete.js27
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/size/returns-count-of-present-values-by-insertion.js27
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/size/returns-count-of-present-values-by-iterable.js19
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/size/shell.js0
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/size/size.js29
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/values/browser.js0
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/values/does-not-have-setdata-internal-slot-array.js29
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/values/does-not-have-setdata-internal-slot-map.js28
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/values/does-not-have-setdata-internal-slot-object.js28
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/values/does-not-have-setdata-internal-slot-set-prototype.js28
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/values/does-not-have-setdata-internal-slot-weakset.js29
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/values/length.js19
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/values/name.js19
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/values/not-a-constructor.js31
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/values/returns-iterator-empty.js16
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/values/returns-iterator.js43
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/values/shell.js0
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/values/this-not-object-throw-boolean.js28
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/values/this-not-object-throw-null.js27
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/values/this-not-object-throw-number.js27
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/values/this-not-object-throw-string.js27
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/values/this-not-object-throw-symbol.js28
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/values/this-not-object-throw-undefined.js27
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/values/values-iteration-mutable.js48
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/values/values.js23
198 files changed, 4205 insertions, 0 deletions
diff --git a/js/src/tests/test262/built-ins/Set/prototype-of-set.js b/js/src/tests/test262/built-ins/Set/prototype-of-set.js
new file mode 100644
index 0000000000..8b74372d0f
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype-of-set.js
@@ -0,0 +1,16 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-properties-of-the-set-constructor
+description: >
+ The value of the [[Prototype]] internal slot of the Set constructor
+ is the intrinsic object %FunctionPrototype% (19.2.3).
+---*/
+
+assert.sameValue(
+ Object.getPrototypeOf(Set),
+ Function.prototype,
+ "`Object.getPrototypeOf(Set)` returns `Function.prototype`"
+);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/Symbol.iterator.js b/js/src/tests/test262/built-ins/Set/prototype/Symbol.iterator.js
new file mode 100644
index 0000000000..d52cbf391e
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/Symbol.iterator.js
@@ -0,0 +1,22 @@
+// Copyright (C) 2014 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-set.prototype-@@iterator
+description: Initial state of the Symbol.iterator property
+info: |
+ The initial value of the @@iterator property is the same function object as
+ the initial value of the values property.
+
+ Per ES6 section 17, the method should exist on the Set prototype, and it
+ should be writable and configurable, but not enumerable.
+includes: [propertyHelper.js]
+features: [Symbol.iterator]
+---*/
+
+assert.sameValue(Set.prototype[Symbol.iterator], Set.prototype.values);
+verifyNotEnumerable(Set.prototype, Symbol.iterator);
+verifyWritable(Set.prototype, Symbol.iterator);
+verifyConfigurable(Set.prototype, Symbol.iterator);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/Symbol.iterator/browser.js b/js/src/tests/test262/built-ins/Set/prototype/Symbol.iterator/browser.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/Symbol.iterator/browser.js
diff --git a/js/src/tests/test262/built-ins/Set/prototype/Symbol.iterator/not-a-constructor.js b/js/src/tests/test262/built-ins/Set/prototype/Symbol.iterator/not-a-constructor.js
new file mode 100644
index 0000000000..8db788f9c0
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/Symbol.iterator/not-a-constructor.js
@@ -0,0 +1,35 @@
+// Copyright (C) 2020 Rick Waldron. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-ecmascript-standard-built-in-objects
+description: >
+ Set.prototype[Symbol.iterator] does not implement [[Construct]], is not new-able
+info: |
+ ECMAScript Function Objects
+
+ Built-in function objects that are not identified as constructors do not
+ implement the [[Construct]] internal method unless otherwise specified in
+ the description of a particular function.
+
+ sec-evaluatenew
+
+ ...
+ 7. If IsConstructor(constructor) is false, throw a TypeError exception.
+ ...
+includes: [isConstructor.js]
+features: [Reflect.construct, Symbol, Symbol.iterator, Set, arrow-function]
+---*/
+
+assert.sameValue(
+ isConstructor(Set.prototype[Symbol.iterator]),
+ false,
+ 'isConstructor(Set.prototype[Symbol.iterator]) must return false'
+);
+
+assert.throws(TypeError, () => {
+ let s = new Set([]); new s[Symbol.iterator]();
+}, '`let s = new Set([]); new s[Symbol.iterator]()` throws TypeError');
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/Symbol.iterator/shell.js b/js/src/tests/test262/built-ins/Set/prototype/Symbol.iterator/shell.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/Symbol.iterator/shell.js
diff --git a/js/src/tests/test262/built-ins/Set/prototype/Symbol.toStringTag.js b/js/src/tests/test262/built-ins/Set/prototype/Symbol.toStringTag.js
new file mode 100644
index 0000000000..c1defb8041
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/Symbol.toStringTag.js
@@ -0,0 +1,23 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype-@@tostringtag
+description: >
+ `Symbol.toStringTag` property descriptor
+info: |
+ The initial value of the @@toStringTag property is the String value
+ "Set".
+
+ This property has the attributes { [[Writable]]: false, [[Enumerable]]:
+ false, [[Configurable]]: true }.
+includes: [propertyHelper.js]
+features: [Symbol.toStringTag]
+---*/
+
+assert.sameValue(Set.prototype[Symbol.toStringTag], 'Set');
+
+verifyNotEnumerable(Set.prototype, Symbol.toStringTag);
+verifyNotWritable(Set.prototype, Symbol.toStringTag);
+verifyConfigurable(Set.prototype, Symbol.toStringTag);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/Symbol.toStringTag/browser.js b/js/src/tests/test262/built-ins/Set/prototype/Symbol.toStringTag/browser.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/Symbol.toStringTag/browser.js
diff --git a/js/src/tests/test262/built-ins/Set/prototype/Symbol.toStringTag/property-descriptor.js b/js/src/tests/test262/built-ins/Set/prototype/Symbol.toStringTag/property-descriptor.js
new file mode 100644
index 0000000000..5926763343
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/Symbol.toStringTag/property-descriptor.js
@@ -0,0 +1,25 @@
+// Copyright (C) 2014 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-set.prototype-@@tostringtag
+description: >
+ `Object.prototype.getOwnPropertyDescriptor` should reflect the value and
+ writability of the @@toStringTag attribute.
+includes: [propertyHelper.js]
+features: [Symbol.toStringTag]
+---*/
+
+var SetProto = Object.getPrototypeOf(new Set());
+
+assert.sameValue(
+ SetProto[Symbol.toStringTag],
+ 'Set',
+ "The value of `SetProto[Symbol.toStringTag]` is `'Set'`"
+);
+
+verifyNotEnumerable(SetProto, Symbol.toStringTag);
+verifyNotWritable(SetProto, Symbol.toStringTag);
+verifyConfigurable(SetProto, Symbol.toStringTag);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/Symbol.toStringTag/shell.js b/js/src/tests/test262/built-ins/Set/prototype/Symbol.toStringTag/shell.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/Symbol.toStringTag/shell.js
diff --git a/js/src/tests/test262/built-ins/Set/prototype/add/add.js b/js/src/tests/test262/built-ins/Set/prototype/add/add.js
new file mode 100644
index 0000000000..159a0ef029
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/add/add.js
@@ -0,0 +1,23 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.add
+description: >
+ Set.prototype.add ( value )
+
+ 17 ECMAScript Standard Built-in Objects
+
+includes: [propertyHelper.js]
+---*/
+
+assert.sameValue(
+ typeof Set.prototype.add,
+ "function",
+ "`typeof Set.prototype.add` is `'function'`"
+);
+
+verifyNotEnumerable(Set.prototype, "add");
+verifyWritable(Set.prototype, "add");
+verifyConfigurable(Set.prototype, "add");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/add/browser.js b/js/src/tests/test262/built-ins/Set/prototype/add/browser.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/add/browser.js
diff --git a/js/src/tests/test262/built-ins/Set/prototype/add/does-not-have-setdata-internal-slot-array.js b/js/src/tests/test262/built-ins/Set/prototype/add/does-not-have-setdata-internal-slot-array.js
new file mode 100644
index 0000000000..e28138f16f
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/add/does-not-have-setdata-internal-slot-array.js
@@ -0,0 +1,23 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.add
+description: >
+ Set.prototype.add ( value )
+
+ ...
+ 3. If S does not have a [[SetData]] internal slot, throw a TypeError exception.
+ ...
+
+---*/
+
+assert.throws(TypeError, function() {
+ Set.prototype.add.call([], 1);
+});
+
+assert.throws(TypeError, function() {
+ var s = new Set();
+ s.add.call([], 1);
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/add/does-not-have-setdata-internal-slot-map.js b/js/src/tests/test262/built-ins/Set/prototype/add/does-not-have-setdata-internal-slot-map.js
new file mode 100644
index 0000000000..4049431f04
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/add/does-not-have-setdata-internal-slot-map.js
@@ -0,0 +1,23 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.add
+description: >
+ Set.prototype.add ( value )
+
+ ...
+ 3. If S does not have a [[SetData]] internal slot, throw a TypeError exception.
+ ...
+
+---*/
+
+assert.throws(TypeError, function() {
+ Set.prototype.add.call(new Map(), 1);
+});
+
+assert.throws(TypeError, function() {
+ var s = new Set();
+ s.add.call(new Map(), 1);
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/add/does-not-have-setdata-internal-slot-object.js b/js/src/tests/test262/built-ins/Set/prototype/add/does-not-have-setdata-internal-slot-object.js
new file mode 100644
index 0000000000..b40f08509a
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/add/does-not-have-setdata-internal-slot-object.js
@@ -0,0 +1,23 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.add
+description: >
+ Set.prototype.add ( value )
+
+ ...
+ 3. If S does not have a [[SetData]] internal slot, throw a TypeError exception.
+ ...
+
+---*/
+
+assert.throws(TypeError, function() {
+ Set.prototype.add.call({}, 1);
+});
+
+assert.throws(TypeError, function() {
+ var s = new Set();
+ s.add.call({}, 1);
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/add/does-not-have-setdata-internal-slot-set-prototype.js b/js/src/tests/test262/built-ins/Set/prototype/add/does-not-have-setdata-internal-slot-set-prototype.js
new file mode 100644
index 0000000000..373a9c8583
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/add/does-not-have-setdata-internal-slot-set-prototype.js
@@ -0,0 +1,23 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.add
+description: >
+ Set.prototype.add ( value )
+
+ ...
+ 3. If S does not have a [[SetData]] internal slot, throw a TypeError exception.
+ ...
+
+---*/
+
+assert.throws(TypeError, function() {
+ Set.prototype.add.call(Set.prototype, 1);
+});
+
+assert.throws(TypeError, function() {
+ var s = new Set();
+ s.add.call(Set.prototype, 1);
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/add/does-not-have-setdata-internal-slot-weakset.js b/js/src/tests/test262/built-ins/Set/prototype/add/does-not-have-setdata-internal-slot-weakset.js
new file mode 100644
index 0000000000..42c33b2a27
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/add/does-not-have-setdata-internal-slot-weakset.js
@@ -0,0 +1,23 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.add
+description: >
+ Set.prototype.add ( value )
+
+ ...
+ 3. If S does not have a [[SetData]] internal slot, throw a TypeError exception.
+ ...
+features: [WeakSet]
+---*/
+
+assert.throws(TypeError, function() {
+ Set.prototype.add.call(new WeakSet(), 1);
+});
+
+assert.throws(TypeError, function() {
+ var s = new Set();
+ s.add.call(new WeakSet(), 1);
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/add/length.js b/js/src/tests/test262/built-ins/Set/prototype/add/length.js
new file mode 100644
index 0000000000..88b79c7dae
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/add/length.js
@@ -0,0 +1,19 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.add
+description: >
+ Set.prototype.add ( value )
+
+ 17 ECMAScript Standard Built-in Objects
+
+includes: [propertyHelper.js]
+---*/
+
+assert.sameValue(Set.prototype.add.length, 1, "The value of `Set.prototype.add.length` is `1`");
+
+verifyNotEnumerable(Set.prototype.add, "length");
+verifyNotWritable(Set.prototype.add, "length");
+verifyConfigurable(Set.prototype.add, "length");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/add/name.js b/js/src/tests/test262/built-ins/Set/prototype/add/name.js
new file mode 100644
index 0000000000..f8f5441845
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/add/name.js
@@ -0,0 +1,19 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.add
+description: >
+ Set.prototype.add ( value )
+
+ 17 ECMAScript Standard Built-in Objects
+
+includes: [propertyHelper.js]
+---*/
+
+assert.sameValue(Set.prototype.add.name, "add", "The value of `Set.prototype.add.name` is `'add'`");
+
+verifyNotEnumerable(Set.prototype.add, "name");
+verifyNotWritable(Set.prototype.add, "name");
+verifyConfigurable(Set.prototype.add, "name");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/add/not-a-constructor.js b/js/src/tests/test262/built-ins/Set/prototype/add/not-a-constructor.js
new file mode 100644
index 0000000000..c1ba69377d
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/add/not-a-constructor.js
@@ -0,0 +1,31 @@
+// Copyright (C) 2020 Rick Waldron. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-ecmascript-standard-built-in-objects
+description: >
+ Set.prototype.add does not implement [[Construct]], is not new-able
+info: |
+ ECMAScript Function Objects
+
+ Built-in function objects that are not identified as constructors do not
+ implement the [[Construct]] internal method unless otherwise specified in
+ the description of a particular function.
+
+ sec-evaluatenew
+
+ ...
+ 7. If IsConstructor(constructor) is false, throw a TypeError exception.
+ ...
+includes: [isConstructor.js]
+features: [Reflect.construct, Set, arrow-function]
+---*/
+
+assert.sameValue(isConstructor(Set.prototype.add), false, 'isConstructor(Set.prototype.add) must return false');
+
+assert.throws(TypeError, () => {
+ let s = new Set([]); new s.add();
+}, '`let s = new Set([]); new s.add()` throws TypeError');
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/add/preserves-insertion-order.js b/js/src/tests/test262/built-ins/Set/prototype/add/preserves-insertion-order.js
new file mode 100644
index 0000000000..1cef6a0cc7
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/add/preserves-insertion-order.js
@@ -0,0 +1,24 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.add
+description: >
+ Set.prototype.add ( value )
+
+ ...
+ 7. Append value as the last element of entries.
+ ...
+---*/
+
+var s = new Set();
+var expects = [1, 2, 3];
+
+s.add(1).add(2).add(3);
+
+s.forEach(function(value) {
+ assert.sameValue(value, expects.shift());
+});
+
+assert.sameValue(expects.length, 0, "The value of `expects.length` is `0`");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/add/returns-this-when-ignoring-duplicate.js b/js/src/tests/test262/built-ins/Set/prototype/add/returns-this-when-ignoring-duplicate.js
new file mode 100644
index 0000000000..5635af8eb6
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/add/returns-this-when-ignoring-duplicate.js
@@ -0,0 +1,21 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.add
+description: >
+ Set.prototype.add ( value )
+
+ 1. Let S be this value.
+ ...
+ 5. Repeat for each e that is an element of entries,
+ a. If e is not empty and SameValueZero(e, value) is true, then
+ i. Return S.
+ ...
+
+---*/
+
+var s = new Set([1]);
+
+assert.sameValue(s.add(1), s, "`s.add(1)` returns `s`");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/add/returns-this.js b/js/src/tests/test262/built-ins/Set/prototype/add/returns-this.js
new file mode 100644
index 0000000000..da84ccde06
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/add/returns-this.js
@@ -0,0 +1,18 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.add
+description: >
+ Set.prototype.add ( value )
+
+ 1. Let S be this value.
+ ...
+ 8. Return S.
+
+---*/
+
+var s = new Set();
+
+assert.sameValue(s.add(1), s, "`s.add(1)` returns `s`");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/add/shell.js b/js/src/tests/test262/built-ins/Set/prototype/add/shell.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/add/shell.js
diff --git a/js/src/tests/test262/built-ins/Set/prototype/add/this-not-object-throw-boolean.js b/js/src/tests/test262/built-ins/Set/prototype/add/this-not-object-throw-boolean.js
new file mode 100644
index 0000000000..f21abae912
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/add/this-not-object-throw-boolean.js
@@ -0,0 +1,22 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.add
+description: >
+ Set.prototype.add ( value )
+
+ 1. Let S be the this value.
+ 2. If Type(S) is not Object, throw a TypeError exception.
+
+---*/
+
+assert.throws(TypeError, function() {
+ Set.prototype.add.call(false, 1);
+});
+
+assert.throws(TypeError, function() {
+ var s = new Set();
+ s.add.call(false, 1);
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/add/this-not-object-throw-null.js b/js/src/tests/test262/built-ins/Set/prototype/add/this-not-object-throw-null.js
new file mode 100644
index 0000000000..e99e6729d6
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/add/this-not-object-throw-null.js
@@ -0,0 +1,22 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.add
+description: >
+ Set.prototype.add ( value )
+
+ 1. Let S be the this value.
+ 2. If Type(S) is not Object, throw a TypeError exception.
+
+---*/
+
+assert.throws(TypeError, function() {
+ Set.prototype.add.call(null, 1);
+});
+
+assert.throws(TypeError, function() {
+ var s = new Set();
+ s.add.call(null, 1);
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/add/this-not-object-throw-number.js b/js/src/tests/test262/built-ins/Set/prototype/add/this-not-object-throw-number.js
new file mode 100644
index 0000000000..d5abae701c
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/add/this-not-object-throw-number.js
@@ -0,0 +1,22 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.add
+description: >
+ Set.prototype.add ( value )
+
+ 1. Let S be the this value.
+ 2. If Type(S) is not Object, throw a TypeError exception.
+
+---*/
+
+assert.throws(TypeError, function() {
+ Set.prototype.add.call(0, 1);
+});
+
+assert.throws(TypeError, function() {
+ var s = new Set();
+ s.add.call(0, 1);
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/add/this-not-object-throw-string.js b/js/src/tests/test262/built-ins/Set/prototype/add/this-not-object-throw-string.js
new file mode 100644
index 0000000000..bf2e69fc91
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/add/this-not-object-throw-string.js
@@ -0,0 +1,22 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.add
+description: >
+ Set.prototype.add ( value )
+
+ 1. Let S be the this value.
+ 2. If Type(S) is not Object, throw a TypeError exception.
+
+---*/
+
+assert.throws(TypeError, function() {
+ Set.prototype.add.call("", 1);
+});
+
+assert.throws(TypeError, function() {
+ var s = new Set();
+ s.add.call("", 1);
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/add/this-not-object-throw-symbol.js b/js/src/tests/test262/built-ins/Set/prototype/add/this-not-object-throw-symbol.js
new file mode 100644
index 0000000000..5e6996de64
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/add/this-not-object-throw-symbol.js
@@ -0,0 +1,23 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.add
+description: >
+ Set.prototype.add ( value )
+
+ 1. Let S be the this value.
+ 2. If Type(S) is not Object, throw a TypeError exception.
+
+features: [Symbol]
+---*/
+
+assert.throws(TypeError, function() {
+ Set.prototype.add.call(Symbol(), 1);
+});
+
+assert.throws(TypeError, function() {
+ var s = new Set();
+ s.add.call(Symbol(), 1);
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/add/this-not-object-throw-undefined.js b/js/src/tests/test262/built-ins/Set/prototype/add/this-not-object-throw-undefined.js
new file mode 100644
index 0000000000..3d301c001f
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/add/this-not-object-throw-undefined.js
@@ -0,0 +1,22 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.add
+description: >
+ Set.prototype.add ( value )
+
+ 1. Let S be the this value.
+ 2. If Type(S) is not Object, throw a TypeError exception.
+
+---*/
+
+assert.throws(TypeError, function() {
+ Set.prototype.add.call(undefined, 1);
+});
+
+assert.throws(TypeError, function() {
+ var s = new Set();
+ s.add.call(undefined, 1);
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/add/will-not-add-duplicate-entry-initial-iterable.js b/js/src/tests/test262/built-ins/Set/prototype/add/will-not-add-duplicate-entry-initial-iterable.js
new file mode 100644
index 0000000000..5b078d29bb
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/add/will-not-add-duplicate-entry-initial-iterable.js
@@ -0,0 +1,27 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.add
+description: >
+ Set.prototype.add ( value )
+
+ ...
+ 4. Let entries be the List that is the value of S’s [[SetData]] internal slot.
+ 5. Repeat for each e that is an element of entries,
+ a. If e is not empty and SameValueZero(e, value) is true, then
+ i. Return S.
+ 6. If value is −0, let value be +0.
+ 7. Append value as the last element of entries.
+ ...
+
+---*/
+
+var s = new Set([1]);
+
+assert.sameValue(s.size, 1, "The value of `s.size` is `1`");
+
+s.add(1);
+
+assert.sameValue(s.size, 1, "The value of `s.size` is `1`");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/add/will-not-add-duplicate-entry-normalizes-zero.js b/js/src/tests/test262/built-ins/Set/prototype/add/will-not-add-duplicate-entry-normalizes-zero.js
new file mode 100644
index 0000000000..9cc7167351
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/add/will-not-add-duplicate-entry-normalizes-zero.js
@@ -0,0 +1,31 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.add
+description: >
+ Set.prototype.add ( value )
+
+ ...
+ 4. Let entries be the List that is the value of S’s [[SetData]] internal slot.
+ 5. Repeat for each e that is an element of entries,
+ a. If e is not empty and SameValueZero(e, value) is true, then
+ i. Return S.
+ 6. If value is −0, let value be +0.
+ 7. Append value as the last element of entries.
+ ...
+
+---*/
+
+var s = new Set([-0]);
+
+assert.sameValue(s.size, 1, "The value of `s.size` is `1`");
+
+s.add(-0);
+
+assert.sameValue(s.size, 1, "The value of `s.size` is `1`, after executing `s.add(-0)`");
+
+s.add(0);
+
+assert.sameValue(s.size, 1, "The value of `s.size` is `1`, after executing `s.add(0)`");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/add/will-not-add-duplicate-entry.js b/js/src/tests/test262/built-ins/Set/prototype/add/will-not-add-duplicate-entry.js
new file mode 100644
index 0000000000..28d5c75759
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/add/will-not-add-duplicate-entry.js
@@ -0,0 +1,28 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.add
+description: >
+ Set.prototype.add ( value )
+
+ ...
+ 4. Let entries be the List that is the value of S’s [[SetData]] internal slot.
+ 5. Repeat for each e that is an element of entries,
+ a. If e is not empty and SameValueZero(e, value) is true, then
+ i. Return S.
+ 6. If value is −0, let value be +0.
+ 7. Append value as the last element of entries.
+ ...
+
+---*/
+
+var s = new Set();
+
+assert.sameValue(s.size, 0, "The value of `s.size` is `0`");
+
+s.add(1);
+s.add(1);
+
+assert.sameValue(s.size, 1, "The value of `s.size` is `1`, after executing `s.add(1); s.add(1);`");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/browser.js b/js/src/tests/test262/built-ins/Set/prototype/browser.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/browser.js
diff --git a/js/src/tests/test262/built-ins/Set/prototype/clear/browser.js b/js/src/tests/test262/built-ins/Set/prototype/clear/browser.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/clear/browser.js
diff --git a/js/src/tests/test262/built-ins/Set/prototype/clear/clear.js b/js/src/tests/test262/built-ins/Set/prototype/clear/clear.js
new file mode 100644
index 0000000000..802c67227a
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/clear/clear.js
@@ -0,0 +1,23 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.clear
+description: >
+ Set.prototype.clear ( )
+
+ 17 ECMAScript Standard Built-in Objects
+
+includes: [propertyHelper.js]
+---*/
+
+assert.sameValue(
+ typeof Set.prototype.clear,
+ "function",
+ "`typeof Set.prototype.clear` is `'function'`"
+);
+
+verifyNotEnumerable(Set.prototype, "clear");
+verifyWritable(Set.prototype, "clear");
+verifyConfigurable(Set.prototype, "clear");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/clear/clears-all-contents-from-iterable.js b/js/src/tests/test262/built-ins/Set/prototype/clear/clears-all-contents-from-iterable.js
new file mode 100644
index 0000000000..5b0c5adbd4
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/clear/clears-all-contents-from-iterable.js
@@ -0,0 +1,28 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.clear
+description: >
+ Set.prototype.clear ( )
+
+ ...
+ 4. Let entries be the List that is the value of S’s [[SetData]] internal slot.
+ 5. Repeat for each e that is an element of entries,
+ a. Replace the element of entries whose value is e with an element whose value is empty.
+ ...
+
+---*/
+
+var s = new Set([1, 2, 3]);
+
+assert.sameValue(s.size, 3, "The value of `s.size` is `3`");
+
+var result = s.clear();
+
+assert.sameValue(s.size, 0, "The value of `s.size` is `0`, after executing `s.clear()`");
+assert.sameValue(s.has(1), false, "`s.has(1)` returns `false`");
+assert.sameValue(s.has(2), false, "`s.has(2)` returns `false`");
+assert.sameValue(s.has(3), false, "`s.has(3)` returns `false`");
+assert.sameValue(result, undefined, "The result of `s.clear()` is `undefined`");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/clear/clears-all-contents.js b/js/src/tests/test262/built-ins/Set/prototype/clear/clears-all-contents.js
new file mode 100644
index 0000000000..44c4ecf59b
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/clear/clears-all-contents.js
@@ -0,0 +1,30 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.clear
+description: >
+ Set.prototype.clear ( )
+
+ ...
+ 4. Let entries be the List that is the value of S’s [[SetData]] internal slot.
+ 5. Repeat for each e that is an element of entries,
+ a. Replace the element of entries whose value is e with an element whose value is empty.
+ ...
+
+---*/
+
+var s = new Set();
+
+s.add(1).add(2).add(3);
+
+assert.sameValue(s.size, 3, "The value of `s.size` is `3`");
+
+var result = s.clear();
+
+assert.sameValue(s.size, 0, "The value of `s.size` is `0`, after executing `s.clear()`");
+assert.sameValue(s.has(1), false, "`s.has(1)` returns `false`");
+assert.sameValue(s.has(2), false, "`s.has(2)` returns `false`");
+assert.sameValue(s.has(3), false, "`s.has(3)` returns `false`");
+assert.sameValue(result, undefined, "The result of `s.clear()` is `undefined`");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/clear/clears-an-empty-set.js b/js/src/tests/test262/built-ins/Set/prototype/clear/clears-an-empty-set.js
new file mode 100644
index 0000000000..47fe4dd05b
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/clear/clears-an-empty-set.js
@@ -0,0 +1,23 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.clear
+description: >
+ Set.prototype.clear ( )
+
+ ...
+ 4. Let entries be the List that is the value of S’s [[SetData]] internal slot.
+ 5. Repeat for each e that is an element of entries,
+ a. Replace the element of entries whose value is e with an element whose value is empty.
+ ...
+
+---*/
+
+var s = new Set();
+
+var result = s.clear();
+
+assert.sameValue(s.size, 0, "The value of `s.size` is `0`");
+assert.sameValue(result, undefined, "The result of `s.clear()` is `undefined`");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/clear/does-not-have-setdata-internal-slot-array.js b/js/src/tests/test262/built-ins/Set/prototype/clear/does-not-have-setdata-internal-slot-array.js
new file mode 100644
index 0000000000..a892c1d9d1
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/clear/does-not-have-setdata-internal-slot-array.js
@@ -0,0 +1,23 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.clear
+description: >
+ Set.prototype.clear ( )
+
+ ...
+ 3. If S does not have a [[SetData]] internal slot, throw a TypeError exception.
+ ...
+
+---*/
+
+assert.throws(TypeError, function() {
+ Set.prototype.clear.call([]);
+});
+
+assert.throws(TypeError, function() {
+ var s = new Set();
+ s.clear.call([]);
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/clear/does-not-have-setdata-internal-slot-map.js b/js/src/tests/test262/built-ins/Set/prototype/clear/does-not-have-setdata-internal-slot-map.js
new file mode 100644
index 0000000000..4177ce9c6d
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/clear/does-not-have-setdata-internal-slot-map.js
@@ -0,0 +1,23 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.clear
+description: >
+ Set.prototype.clear ( )
+
+ ...
+ 3. If S does not have a [[SetData]] internal slot, throw a TypeError exception.
+ ...
+
+---*/
+
+assert.throws(TypeError, function() {
+ Set.prototype.clear.call(new Map());
+});
+
+assert.throws(TypeError, function() {
+ var s = new Set();
+ s.clear.call(new Map());
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/clear/does-not-have-setdata-internal-slot-object.js b/js/src/tests/test262/built-ins/Set/prototype/clear/does-not-have-setdata-internal-slot-object.js
new file mode 100644
index 0000000000..fc0ac57bd8
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/clear/does-not-have-setdata-internal-slot-object.js
@@ -0,0 +1,23 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.clear
+description: >
+ Set.prototype.clear ( )
+
+ ...
+ 3. If S does not have a [[SetData]] internal slot, throw a TypeError exception.
+ ...
+
+---*/
+
+assert.throws(TypeError, function() {
+ Set.prototype.clear.call({});
+});
+
+assert.throws(TypeError, function() {
+ var s = new Set();
+ s.clear.call({});
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/clear/does-not-have-setdata-internal-slot-set.prototype.js b/js/src/tests/test262/built-ins/Set/prototype/clear/does-not-have-setdata-internal-slot-set.prototype.js
new file mode 100644
index 0000000000..b13aee60b9
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/clear/does-not-have-setdata-internal-slot-set.prototype.js
@@ -0,0 +1,23 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.clear
+description: >
+ Set.prototype.clear ( )
+
+ ...
+ 3. If S does not have a [[SetData]] internal slot, throw a TypeError exception.
+ ...
+
+---*/
+
+assert.throws(TypeError, function() {
+ Set.prototype.clear.call(Set.prototype);
+});
+
+assert.throws(TypeError, function() {
+ var s = new Set();
+ s.clear.call(Set.prototype);
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/clear/does-not-have-setdata-internal-slot-weakset.js b/js/src/tests/test262/built-ins/Set/prototype/clear/does-not-have-setdata-internal-slot-weakset.js
new file mode 100644
index 0000000000..e693c1e5bd
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/clear/does-not-have-setdata-internal-slot-weakset.js
@@ -0,0 +1,23 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.clear
+description: >
+ Set.prototype.clear ( )
+
+ ...
+ 3. If S does not have a [[SetData]] internal slot, throw a TypeError exception.
+ ...
+features: [WeakSet]
+---*/
+
+assert.throws(TypeError, function() {
+ Set.prototype.clear.call(new WeakSet());
+});
+
+assert.throws(TypeError, function() {
+ var s = new Set();
+ s.clear.call(new WeakSet());
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/clear/length.js b/js/src/tests/test262/built-ins/Set/prototype/clear/length.js
new file mode 100644
index 0000000000..84e1dd1146
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/clear/length.js
@@ -0,0 +1,19 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.clear
+description: >
+ Set.prototype.clear ( )
+
+ 17 ECMAScript Standard Built-in Objects
+
+includes: [propertyHelper.js]
+---*/
+
+assert.sameValue(Set.prototype.clear.length, 0, "The value of `Set.prototype.clear.length` is `0`");
+
+verifyNotEnumerable(Set.prototype.clear, "length");
+verifyNotWritable(Set.prototype.clear, "length");
+verifyConfigurable(Set.prototype.clear, "length");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/clear/name.js b/js/src/tests/test262/built-ins/Set/prototype/clear/name.js
new file mode 100644
index 0000000000..722a8af8f1
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/clear/name.js
@@ -0,0 +1,19 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.clear
+description: >
+ Set.prototype.clear ( )
+
+ 17 ECMAScript Standard Built-in Objects
+
+includes: [propertyHelper.js]
+---*/
+
+assert.sameValue(Set.prototype.clear.name, "clear", "The value of `Set.prototype.clear.name` is `'clear'`");
+
+verifyNotEnumerable(Set.prototype.clear, "name");
+verifyNotWritable(Set.prototype.clear, "name");
+verifyConfigurable(Set.prototype.clear, "name");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/clear/not-a-constructor.js b/js/src/tests/test262/built-ins/Set/prototype/clear/not-a-constructor.js
new file mode 100644
index 0000000000..16f0ebd97c
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/clear/not-a-constructor.js
@@ -0,0 +1,31 @@
+// Copyright (C) 2020 Rick Waldron. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-ecmascript-standard-built-in-objects
+description: >
+ Set.prototype.clear does not implement [[Construct]], is not new-able
+info: |
+ ECMAScript Function Objects
+
+ Built-in function objects that are not identified as constructors do not
+ implement the [[Construct]] internal method unless otherwise specified in
+ the description of a particular function.
+
+ sec-evaluatenew
+
+ ...
+ 7. If IsConstructor(constructor) is false, throw a TypeError exception.
+ ...
+includes: [isConstructor.js]
+features: [Reflect.construct, Set, arrow-function]
+---*/
+
+assert.sameValue(isConstructor(Set.prototype.clear), false, 'isConstructor(Set.prototype.clear) must return false');
+
+assert.throws(TypeError, () => {
+ let s = new Set([]); new s.clear();
+}, '`let s = new Set([]); new s.clear()` throws TypeError');
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/clear/returns-undefined.js b/js/src/tests/test262/built-ins/Set/prototype/clear/returns-undefined.js
new file mode 100644
index 0000000000..8857aa8a85
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/clear/returns-undefined.js
@@ -0,0 +1,17 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.clear
+description: >
+ Set.prototype.clear ( )
+
+ ...
+ 6. Return undefined.
+
+---*/
+
+var s = new Set();
+
+assert.sameValue(s.clear(), undefined, "`s.clear()` returns `undefined`");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/clear/shell.js b/js/src/tests/test262/built-ins/Set/prototype/clear/shell.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/clear/shell.js
diff --git a/js/src/tests/test262/built-ins/Set/prototype/clear/this-not-object-throw-boolean.js b/js/src/tests/test262/built-ins/Set/prototype/clear/this-not-object-throw-boolean.js
new file mode 100644
index 0000000000..8b8a18b1ca
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/clear/this-not-object-throw-boolean.js
@@ -0,0 +1,22 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.clear
+description: >
+ Set.prototype.clear ( )
+
+ 1. Let S be the this value.
+ 2. If Type(S) is not Object, throw a TypeError exception.
+
+---*/
+
+assert.throws(TypeError, function() {
+ Set.prototype.clear.call(false);
+});
+
+assert.throws(TypeError, function() {
+ var s = new Set();
+ s.clear.call(false);
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/clear/this-not-object-throw-null.js b/js/src/tests/test262/built-ins/Set/prototype/clear/this-not-object-throw-null.js
new file mode 100644
index 0000000000..c21931f3e1
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/clear/this-not-object-throw-null.js
@@ -0,0 +1,22 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.clear
+description: >
+ Set.prototype.clear ( )
+
+ 1. Let S be the this value.
+ 2. If Type(S) is not Object, throw a TypeError exception.
+
+---*/
+
+assert.throws(TypeError, function() {
+ Set.prototype.clear.call(null);
+});
+
+assert.throws(TypeError, function() {
+ var s = new Set();
+ s.clear.call(null);
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/clear/this-not-object-throw-number.js b/js/src/tests/test262/built-ins/Set/prototype/clear/this-not-object-throw-number.js
new file mode 100644
index 0000000000..211fa883ff
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/clear/this-not-object-throw-number.js
@@ -0,0 +1,22 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.clear
+description: >
+ Set.prototype.clear ( )
+
+ 1. Let S be the this value.
+ 2. If Type(S) is not Object, throw a TypeError exception.
+
+---*/
+
+assert.throws(TypeError, function() {
+ Set.prototype.clear.call(0);
+});
+
+assert.throws(TypeError, function() {
+ var s = new Set();
+ s.clear.call(0);
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/clear/this-not-object-throw-string.js b/js/src/tests/test262/built-ins/Set/prototype/clear/this-not-object-throw-string.js
new file mode 100644
index 0000000000..8097a19afa
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/clear/this-not-object-throw-string.js
@@ -0,0 +1,22 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.clear
+description: >
+ Set.prototype.clear ( )
+
+ 1. Let S be the this value.
+ 2. If Type(S) is not Object, throw a TypeError exception.
+
+---*/
+
+assert.throws(TypeError, function() {
+ Set.prototype.clear.call("");
+});
+
+assert.throws(TypeError, function() {
+ var s = new Set();
+ s.clear.call("");
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/clear/this-not-object-throw-symbol.js b/js/src/tests/test262/built-ins/Set/prototype/clear/this-not-object-throw-symbol.js
new file mode 100644
index 0000000000..3b284170fb
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/clear/this-not-object-throw-symbol.js
@@ -0,0 +1,23 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.clear
+description: >
+ Set.prototype.clear ( )
+
+ 1. Let S be the this value.
+ 2. If Type(S) is not Object, throw a TypeError exception.
+
+features: [Symbol]
+---*/
+
+assert.throws(TypeError, function() {
+ Set.prototype.clear.call(Symbol());
+});
+
+assert.throws(TypeError, function() {
+ var s = new Set();
+ s.clear.call(Symbol());
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/clear/this-not-object-throw-undefined.js b/js/src/tests/test262/built-ins/Set/prototype/clear/this-not-object-throw-undefined.js
new file mode 100644
index 0000000000..35b9fc665a
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/clear/this-not-object-throw-undefined.js
@@ -0,0 +1,22 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.clear
+description: >
+ Set.prototype.clear ( )
+
+ 1. Let S be the this value.
+ 2. If Type(S) is not Object, throw a TypeError exception.
+
+---*/
+
+assert.throws(TypeError, function() {
+ Set.prototype.clear.call(undefined);
+});
+
+assert.throws(TypeError, function() {
+ var s = new Set();
+ s.clear.call(undefined);
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/constructor/browser.js b/js/src/tests/test262/built-ins/Set/prototype/constructor/browser.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/constructor/browser.js
diff --git a/js/src/tests/test262/built-ins/Set/prototype/constructor/set-prototype-constructor-intrinsic.js b/js/src/tests/test262/built-ins/Set/prototype/constructor/set-prototype-constructor-intrinsic.js
new file mode 100644
index 0000000000..356342fe06
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/constructor/set-prototype-constructor-intrinsic.js
@@ -0,0 +1,18 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-ecmascript-standard-built-in-objects
+description: >
+ Set.prototype.constructor
+
+ The initial value of Set.prototype.constructor is the intrinsic object %Set%.
+
+---*/
+
+assert.sameValue(
+ Set.prototype.constructor,
+ Set,
+ "The value of `Set.prototype.constructor` is `Set`"
+);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/constructor/set-prototype-constructor.js b/js/src/tests/test262/built-ins/Set/prototype/constructor/set-prototype-constructor.js
new file mode 100644
index 0000000000..0c48222b34
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/constructor/set-prototype-constructor.js
@@ -0,0 +1,17 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-ecmascript-standard-built-in-objects
+description: >
+ Set ( [ iterable ] )
+
+ 17 ECMAScript Standard Built-in Objects
+
+includes: [propertyHelper.js]
+---*/
+
+verifyNotEnumerable(Set.prototype, "constructor");
+verifyWritable(Set.prototype, "constructor");
+verifyConfigurable(Set.prototype, "constructor");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/constructor/shell.js b/js/src/tests/test262/built-ins/Set/prototype/constructor/shell.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/constructor/shell.js
diff --git a/js/src/tests/test262/built-ins/Set/prototype/delete/browser.js b/js/src/tests/test262/built-ins/Set/prototype/delete/browser.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/delete/browser.js
diff --git a/js/src/tests/test262/built-ins/Set/prototype/delete/delete-entry-initial-iterable.js b/js/src/tests/test262/built-ins/Set/prototype/delete/delete-entry-initial-iterable.js
new file mode 100644
index 0000000000..688b467b30
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/delete/delete-entry-initial-iterable.js
@@ -0,0 +1,28 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.delete
+description: >
+ Set.prototype.delete ( value )
+
+ ...
+ 4. Let entries be the List that is the value of S’s [[SetData]] internal slot.
+ 5. Repeat for each e that is an element of entries,
+ a. If e is not empty and SameValueZero(e, value) is true, then
+ b. Replace the element of entries whose value is e with an element whose value is empty.
+ c. Return true.
+ ...
+
+
+---*/
+
+var s = new Set([1]);
+
+assert.sameValue(s.size, 1, "The value of `s.size` is `1`");
+
+var result = s.delete(1);
+
+assert.sameValue(s.size, 0, "The value of `s.size` is `0`, after executing `s.delete(1)`");
+assert.sameValue(result, true, "The result of `s.delete(1)` is `true`");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/delete/delete-entry-normalizes-zero.js b/js/src/tests/test262/built-ins/Set/prototype/delete/delete-entry-normalizes-zero.js
new file mode 100644
index 0000000000..fb17ea0e00
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/delete/delete-entry-normalizes-zero.js
@@ -0,0 +1,27 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.delete
+description: >
+ Set.prototype.delete ( value )
+
+ ...
+ 4. Let entries be the List that is the value of S’s [[SetData]] internal slot.
+ 5. Repeat for each e that is an element of entries,
+ a. If e is not empty and SameValueZero(e, value) is true, then
+ b. Replace the element of entries whose value is e with an element whose value is empty.
+ c. Return true.
+ ...
+
+---*/
+
+var s = new Set([-0]);
+
+assert.sameValue(s.size, 1, "The value of `s.size` is `1`");
+
+var result = s.delete(+0);
+
+assert.sameValue(s.size, 0, "The value of `s.size` is `0`, after executing `s.delete(-0)`");
+assert.sameValue(result, true, "The result of `s.delete(+0)` is `true`");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/delete/delete-entry.js b/js/src/tests/test262/built-ins/Set/prototype/delete/delete-entry.js
new file mode 100644
index 0000000000..cc84a3a368
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/delete/delete-entry.js
@@ -0,0 +1,32 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.delete
+description: >
+ Set.prototype.delete ( value )
+
+ ...
+ 4. Let entries be the List that is the value of S’s [[SetData]] internal slot.
+ 5. Repeat for each e that is an element of entries,
+ a. If e is not empty and SameValueZero(e, value) is true, then
+ i. Return S.
+ 6. If value is −0, let value be +0.
+ 7. Append value as the last element of entries.
+ ...
+
+---*/
+
+var s = new Set();
+
+assert.sameValue(s.size, 0, "The value of `s.size` is `0`");
+
+s.add(1);
+
+assert.sameValue(s.size, 1, "The value of `s.size` is `1`, after executing `s.add(1)`");
+
+var result = s.delete(1);
+
+assert.sameValue(s.size, 0, "The value of `s.size` is `0`, after executing `s.delete(1)`");
+assert.sameValue(result, true, "The result of `s.delete(1)` is `true`");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/delete/delete.js b/js/src/tests/test262/built-ins/Set/prototype/delete/delete.js
new file mode 100644
index 0000000000..1cea6e6103
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/delete/delete.js
@@ -0,0 +1,23 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.delete
+description: >
+ Set.prototype.delete ( value )
+
+ 17 ECMAScript Standard Built-in Objects
+
+includes: [propertyHelper.js]
+---*/
+
+assert.sameValue(
+ typeof Set.prototype.delete,
+ "function",
+ "`typeof Set.prototype.delete` is `'function'`"
+);
+
+verifyNotEnumerable(Set.prototype, "delete");
+verifyWritable(Set.prototype, "delete");
+verifyConfigurable(Set.prototype, "delete");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/delete/does-not-have-setdata-internal-slot-array.js b/js/src/tests/test262/built-ins/Set/prototype/delete/does-not-have-setdata-internal-slot-array.js
new file mode 100644
index 0000000000..b69fc404d7
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/delete/does-not-have-setdata-internal-slot-array.js
@@ -0,0 +1,23 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.delete
+description: >
+ Set.prototype.delete ( value )
+
+ ...
+ 3. If S does not have a [[SetData]] internal slot, throw a TypeError exception.
+ ...
+
+---*/
+
+assert.throws(TypeError, function() {
+ Set.prototype.delete.call([], 1);
+});
+
+assert.throws(TypeError, function() {
+ var s = new Set();
+ s.delete.call([], 1);
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/delete/does-not-have-setdata-internal-slot-map.js b/js/src/tests/test262/built-ins/Set/prototype/delete/does-not-have-setdata-internal-slot-map.js
new file mode 100644
index 0000000000..9ac5ce0e03
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/delete/does-not-have-setdata-internal-slot-map.js
@@ -0,0 +1,23 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.delete
+description: >
+ Set.prototype.delete ( value )
+
+ ...
+ 3. If S does not have a [[SetData]] internal slot, throw a TypeError exception.
+ ...
+
+---*/
+
+assert.throws(TypeError, function() {
+ Set.prototype.delete.call(new Map(), 1);
+});
+
+assert.throws(TypeError, function() {
+ var s = new Set();
+ s.delete.call(new Map(), 1);
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/delete/does-not-have-setdata-internal-slot-object.js b/js/src/tests/test262/built-ins/Set/prototype/delete/does-not-have-setdata-internal-slot-object.js
new file mode 100644
index 0000000000..0bf57e4ce0
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/delete/does-not-have-setdata-internal-slot-object.js
@@ -0,0 +1,23 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.delete
+description: >
+ Set.prototype.delete ( value )
+
+ ...
+ 3. If S does not have a [[SetData]] internal slot, throw a TypeError exception.
+ ...
+
+---*/
+
+assert.throws(TypeError, function() {
+ Set.prototype.delete.call({}, 1);
+});
+
+assert.throws(TypeError, function() {
+ var s = new Set();
+ s.delete.call({}, 1);
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/delete/does-not-have-setdata-internal-slot-set-prototype.js b/js/src/tests/test262/built-ins/Set/prototype/delete/does-not-have-setdata-internal-slot-set-prototype.js
new file mode 100644
index 0000000000..6c564ec064
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/delete/does-not-have-setdata-internal-slot-set-prototype.js
@@ -0,0 +1,23 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.delete
+description: >
+ Set.prototype.delete ( value )
+
+ ...
+ 3. If S does not have a [[SetData]] internal slot, throw a TypeError exception.
+ ...
+
+---*/
+
+assert.throws(TypeError, function() {
+ Set.prototype.delete.call(Set.prototype, 1);
+});
+
+assert.throws(TypeError, function() {
+ var s = new Set();
+ s.delete.call(Set.prototype, 1);
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/delete/does-not-have-setdata-internal-slot-weakset.js b/js/src/tests/test262/built-ins/Set/prototype/delete/does-not-have-setdata-internal-slot-weakset.js
new file mode 100644
index 0000000000..60e1ef49e3
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/delete/does-not-have-setdata-internal-slot-weakset.js
@@ -0,0 +1,23 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.delete
+description: >
+ Set.prototype.delete ( value )
+
+ ...
+ 3. If S does not have a [[SetData]] internal slot, throw a TypeError exception.
+ ...
+features: [WeakSet]
+---*/
+
+assert.throws(TypeError, function() {
+ Set.prototype.delete.call(new WeakSet(), 1);
+});
+
+assert.throws(TypeError, function() {
+ var s = new Set();
+ s.delete.call(new WeakSet(), 1);
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/delete/length.js b/js/src/tests/test262/built-ins/Set/prototype/delete/length.js
new file mode 100644
index 0000000000..5d28a0ad40
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/delete/length.js
@@ -0,0 +1,19 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.delete
+description: >
+ Set.prototype.delete ( value )
+
+ 17 ECMAScript Standard Built-in Objects
+
+includes: [propertyHelper.js]
+---*/
+
+assert.sameValue(Set.prototype.delete.length, 1, "The value of `Set.prototype.delete.length` is `1`");
+
+verifyNotEnumerable(Set.prototype.delete, "length");
+verifyNotWritable(Set.prototype.delete, "length");
+verifyConfigurable(Set.prototype.delete, "length");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/delete/name.js b/js/src/tests/test262/built-ins/Set/prototype/delete/name.js
new file mode 100644
index 0000000000..538d7b4370
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/delete/name.js
@@ -0,0 +1,19 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.delete
+description: >
+ Set.prototype.delete ( value )
+
+ 17 ECMAScript Standard Built-in Objects
+
+includes: [propertyHelper.js]
+---*/
+
+assert.sameValue(Set.prototype.delete.name, "delete", "The value of `Set.prototype.delete.name` is `'delete'`");
+
+verifyNotEnumerable(Set.prototype.delete, "name");
+verifyNotWritable(Set.prototype.delete, "name");
+verifyConfigurable(Set.prototype.delete, "name");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/delete/not-a-constructor.js b/js/src/tests/test262/built-ins/Set/prototype/delete/not-a-constructor.js
new file mode 100644
index 0000000000..3c978d44f0
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/delete/not-a-constructor.js
@@ -0,0 +1,31 @@
+// Copyright (C) 2020 Rick Waldron. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-ecmascript-standard-built-in-objects
+description: >
+ Set.prototype.delete does not implement [[Construct]], is not new-able
+info: |
+ ECMAScript Function Objects
+
+ Built-in function objects that are not identified as constructors do not
+ implement the [[Construct]] internal method unless otherwise specified in
+ the description of a particular function.
+
+ sec-evaluatenew
+
+ ...
+ 7. If IsConstructor(constructor) is false, throw a TypeError exception.
+ ...
+includes: [isConstructor.js]
+features: [Reflect.construct, Set, arrow-function]
+---*/
+
+assert.sameValue(isConstructor(Set.prototype.delete), false, 'isConstructor(Set.prototype.delete) must return false');
+
+assert.throws(TypeError, () => {
+ let s = new Set([]); new s.delete();
+}, '`let s = new Set([]); new s.delete()` throws TypeError');
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/delete/returns-false-when-delete-is-noop.js b/js/src/tests/test262/built-ins/Set/prototype/delete/returns-false-when-delete-is-noop.js
new file mode 100644
index 0000000000..8a8e69e886
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/delete/returns-false-when-delete-is-noop.js
@@ -0,0 +1,17 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.delete
+description: >
+ Set.prototype.delete ( value )
+
+ ...
+ 6. Return false.
+
+---*/
+
+var s = new Set();
+
+assert.sameValue(s.delete(1), false, "`s.delete(1)` returns `false`");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/delete/returns-true-when-delete-operation-occurs.js b/js/src/tests/test262/built-ins/Set/prototype/delete/returns-true-when-delete-operation-occurs.js
new file mode 100644
index 0000000000..e622e9bc17
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/delete/returns-true-when-delete-operation-occurs.js
@@ -0,0 +1,24 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.delete
+description: >
+ Set.prototype.delete ( value )
+
+ ...
+ 4. Let entries be the List that is the value of S’s [[SetData]] internal slot.
+ 5. Repeat for each e that is an element of entries,
+ a. If e is not empty and SameValueZero(e, value) is true, then
+ b. Replace the element of entries whose value is e with an element whose value is empty.
+ c. Return true.
+ ...
+
+---*/
+
+var s = new Set();
+
+s.add(1);
+
+assert.sameValue(s.delete(1), true, "`s.delete(1)` returns `true`");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/delete/shell.js b/js/src/tests/test262/built-ins/Set/prototype/delete/shell.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/delete/shell.js
diff --git a/js/src/tests/test262/built-ins/Set/prototype/delete/this-not-object-throw-boolean.js b/js/src/tests/test262/built-ins/Set/prototype/delete/this-not-object-throw-boolean.js
new file mode 100644
index 0000000000..3f40763571
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/delete/this-not-object-throw-boolean.js
@@ -0,0 +1,22 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.delete
+description: >
+ Set.prototype.delete ( value )
+
+ 1. Let S be the this value.
+ 2. If Type(S) is not Object, throw a TypeError exception.
+
+---*/
+
+assert.throws(TypeError, function() {
+ Set.prototype.delete.call(false, 1);
+});
+
+assert.throws(TypeError, function() {
+ var s = new Set();
+ s.delete.call(false, 1);
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/delete/this-not-object-throw-null.js b/js/src/tests/test262/built-ins/Set/prototype/delete/this-not-object-throw-null.js
new file mode 100644
index 0000000000..11415e35c0
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/delete/this-not-object-throw-null.js
@@ -0,0 +1,22 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.delete
+description: >
+ Set.prototype.delete ( value )
+
+ 1. Let S be the this value.
+ 2. If Type(S) is not Object, throw a TypeError exception.
+
+---*/
+
+assert.throws(TypeError, function() {
+ Set.prototype.delete.call(null, 1);
+});
+
+assert.throws(TypeError, function() {
+ var s = new Set();
+ s.delete.call(null, 1);
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/delete/this-not-object-throw-number.js b/js/src/tests/test262/built-ins/Set/prototype/delete/this-not-object-throw-number.js
new file mode 100644
index 0000000000..4dfc55488e
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/delete/this-not-object-throw-number.js
@@ -0,0 +1,22 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.delete
+description: >
+ Set.prototype.delete ( value )
+
+ 1. Let S be the this value.
+ 2. If Type(S) is not Object, throw a TypeError exception.
+
+---*/
+
+assert.throws(TypeError, function() {
+ Set.prototype.delete.call(0, 1);
+});
+
+assert.throws(TypeError, function() {
+ var s = new Set();
+ s.delete.call(0, 1);
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/delete/this-not-object-throw-string.js b/js/src/tests/test262/built-ins/Set/prototype/delete/this-not-object-throw-string.js
new file mode 100644
index 0000000000..5d97d8fb2a
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/delete/this-not-object-throw-string.js
@@ -0,0 +1,22 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.delete
+description: >
+ Set.prototype.delete ( value )
+
+ 1. Let S be the this value.
+ 2. If Type(S) is not Object, throw a TypeError exception.
+
+---*/
+
+assert.throws(TypeError, function() {
+ Set.prototype.delete.call("", 1);
+});
+
+assert.throws(TypeError, function() {
+ var s = new Set();
+ s.delete.call("", 1);
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/delete/this-not-object-throw-symbol.js b/js/src/tests/test262/built-ins/Set/prototype/delete/this-not-object-throw-symbol.js
new file mode 100644
index 0000000000..cf01f94cb3
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/delete/this-not-object-throw-symbol.js
@@ -0,0 +1,23 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.delete
+description: >
+ Set.prototype.delete ( value )
+
+ 1. Let S be the this value.
+ 2. If Type(S) is not Object, throw a TypeError exception.
+
+features: [Symbol]
+---*/
+
+assert.throws(TypeError, function() {
+ Set.prototype.delete.call(Symbol(), 1);
+});
+
+assert.throws(TypeError, function() {
+ var s = new Set();
+ s.delete.call(Symbol(), 1);
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/delete/this-not-object-throw-undefined.js b/js/src/tests/test262/built-ins/Set/prototype/delete/this-not-object-throw-undefined.js
new file mode 100644
index 0000000000..ffa90305f1
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/delete/this-not-object-throw-undefined.js
@@ -0,0 +1,22 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.delete
+description: >
+ Set.prototype.delete ( value )
+
+ 1. Let S be the this value.
+ 2. If Type(S) is not Object, throw a TypeError exception.
+
+---*/
+
+assert.throws(TypeError, function() {
+ Set.prototype.delete.call(undefined, 1);
+});
+
+assert.throws(TypeError, function() {
+ var s = new Set();
+ s.delete.call(undefined, 1);
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/entries/browser.js b/js/src/tests/test262/built-ins/Set/prototype/entries/browser.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/entries/browser.js
diff --git a/js/src/tests/test262/built-ins/Set/prototype/entries/does-not-have-setdata-internal-slot-array.js b/js/src/tests/test262/built-ins/Set/prototype/entries/does-not-have-setdata-internal-slot-array.js
new file mode 100644
index 0000000000..771d461f65
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/entries/does-not-have-setdata-internal-slot-array.js
@@ -0,0 +1,29 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.entries
+description: >
+ Set.prototype.entries ( )
+
+ ...
+ 2. Return CreateSetIterator(S, "key+value").
+
+
+ 23.2.5.1 CreateSetIterator Abstract Operation
+
+ ...
+ 2. If S does not have a [[SetData]] internal slot, throw a TypeError exception.
+ ...
+
+---*/
+
+assert.throws(TypeError, function() {
+ Set.prototype.entries.call([]);
+});
+
+assert.throws(TypeError, function() {
+ var s = new Set();
+ s.entries.call([]);
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/entries/does-not-have-setdata-internal-slot-map.js b/js/src/tests/test262/built-ins/Set/prototype/entries/does-not-have-setdata-internal-slot-map.js
new file mode 100644
index 0000000000..5326a8eb6b
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/entries/does-not-have-setdata-internal-slot-map.js
@@ -0,0 +1,28 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.entries
+description: >
+ Set.prototype.entries ( )
+
+ ...
+ 2. Return CreateSetIterator(S, "key+value").
+
+
+ 23.2.5.1 CreateSetIterator Abstract Operation
+
+ ...
+ 2. If S does not have a [[SetData]] internal slot, throw a TypeError exception.
+ ...
+---*/
+
+assert.throws(TypeError, function() {
+ Set.prototype.entries.call(new Map());
+});
+
+assert.throws(TypeError, function() {
+ var s = new Set();
+ s.entries.call(new Map());
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/entries/does-not-have-setdata-internal-slot-object.js b/js/src/tests/test262/built-ins/Set/prototype/entries/does-not-have-setdata-internal-slot-object.js
new file mode 100644
index 0000000000..37e0b7f7a4
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/entries/does-not-have-setdata-internal-slot-object.js
@@ -0,0 +1,28 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.entries
+description: >
+ Set.prototype.entries ( )
+
+ ...
+ 2. Return CreateSetIterator(S, "key+value").
+
+
+ 23.2.5.1 CreateSetIterator Abstract Operation
+
+ ...
+ 2. If S does not have a [[SetData]] internal slot, throw a TypeError exception.
+ ...
+---*/
+
+assert.throws(TypeError, function() {
+ Set.prototype.entries.call({});
+});
+
+assert.throws(TypeError, function() {
+ var s = new Set();
+ s.entries.call({});
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/entries/does-not-have-setdata-internal-slot-set-prototype.js b/js/src/tests/test262/built-ins/Set/prototype/entries/does-not-have-setdata-internal-slot-set-prototype.js
new file mode 100644
index 0000000000..588d45aee6
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/entries/does-not-have-setdata-internal-slot-set-prototype.js
@@ -0,0 +1,28 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.entries
+description: >
+ Set.prototype.entries ( )
+
+ ...
+ 2. Return CreateSetIterator(S, "key+value").
+
+
+ 23.2.5.1 CreateSetIterator Abstract Operation
+
+ ...
+ 2. If S does not have a [[SetData]] internal slot, throw a TypeError exception.
+ ...
+---*/
+
+assert.throws(TypeError, function() {
+ Set.prototype.entries.call(Set.prototype);
+});
+
+assert.throws(TypeError, function() {
+ var s = new Set();
+ s.entries.call(Set.prototype);
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/entries/does-not-have-setdata-internal-slot-weakset.js b/js/src/tests/test262/built-ins/Set/prototype/entries/does-not-have-setdata-internal-slot-weakset.js
new file mode 100644
index 0000000000..b8b7c97974
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/entries/does-not-have-setdata-internal-slot-weakset.js
@@ -0,0 +1,29 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.entries
+description: >
+ Set.prototype.entries ( )
+
+ ...
+ 2. Return CreateSetIterator(S, "key+value").
+
+
+ 23.2.5.1 CreateSetIterator Abstract Operation
+
+ ...
+ 2. If S does not have a [[SetData]] internal slot, throw a TypeError exception.
+ ...
+features: [WeakSet]
+---*/
+
+assert.throws(TypeError, function() {
+ Set.prototype.entries.call(new WeakSet());
+});
+
+assert.throws(TypeError, function() {
+ var s = new Set();
+ s.entries.call(new WeakSet());
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/entries/entries.js b/js/src/tests/test262/built-ins/Set/prototype/entries/entries.js
new file mode 100644
index 0000000000..2dc649d63a
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/entries/entries.js
@@ -0,0 +1,23 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.entries
+description: >
+ Set.prototype.entries ( )
+
+ 17 ECMAScript Standard Built-in Objects
+
+includes: [propertyHelper.js]
+---*/
+
+assert.sameValue(
+ typeof Set.prototype.entries,
+ "function",
+ "`typeof Set.prototype.entries` is `'function'`"
+);
+
+verifyNotEnumerable(Set.prototype, "entries");
+verifyWritable(Set.prototype, "entries");
+verifyConfigurable(Set.prototype, "entries");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/entries/length.js b/js/src/tests/test262/built-ins/Set/prototype/entries/length.js
new file mode 100644
index 0000000000..5f7ab9dd4c
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/entries/length.js
@@ -0,0 +1,19 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.entries
+description: >
+ Set.prototype.entries ( )
+
+ 17 ECMAScript Standard Built-in Objects
+
+includes: [propertyHelper.js]
+---*/
+
+assert.sameValue(Set.prototype.entries.length, 0, "The value of `Set.prototype.entries.length` is `0`");
+
+verifyNotEnumerable(Set.prototype.entries, "length");
+verifyNotWritable(Set.prototype.entries, "length");
+verifyConfigurable(Set.prototype.entries, "length");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/entries/name.js b/js/src/tests/test262/built-ins/Set/prototype/entries/name.js
new file mode 100644
index 0000000000..ffcfec6df1
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/entries/name.js
@@ -0,0 +1,19 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.entries
+description: >
+ Set.prototype.entries ( )
+
+ 17 ECMAScript Standard Built-in Objects
+
+includes: [propertyHelper.js]
+---*/
+
+assert.sameValue(Set.prototype.entries.name, "entries", "The value of `Set.prototype.entries.name` is `'entries'`");
+
+verifyNotEnumerable(Set.prototype.entries, "name");
+verifyNotWritable(Set.prototype.entries, "name");
+verifyConfigurable(Set.prototype.entries, "name");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/entries/not-a-constructor.js b/js/src/tests/test262/built-ins/Set/prototype/entries/not-a-constructor.js
new file mode 100644
index 0000000000..cd385a7077
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/entries/not-a-constructor.js
@@ -0,0 +1,35 @@
+// Copyright (C) 2020 Rick Waldron. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-ecmascript-standard-built-in-objects
+description: >
+ Set.prototype.entries does not implement [[Construct]], is not new-able
+info: |
+ ECMAScript Function Objects
+
+ Built-in function objects that are not identified as constructors do not
+ implement the [[Construct]] internal method unless otherwise specified in
+ the description of a particular function.
+
+ sec-evaluatenew
+
+ ...
+ 7. If IsConstructor(constructor) is false, throw a TypeError exception.
+ ...
+includes: [isConstructor.js]
+features: [Reflect.construct, Set, arrow-function]
+---*/
+
+assert.sameValue(
+ isConstructor(Set.prototype.entries),
+ false,
+ 'isConstructor(Set.prototype.entries) must return false'
+);
+
+assert.throws(TypeError, () => {
+ let s = new Set([]); new s.entries();
+}, '`let s = new Set([]); new s.entries()` throws TypeError');
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/entries/returns-iterator-empty.js b/js/src/tests/test262/built-ins/Set/prototype/entries/returns-iterator-empty.js
new file mode 100644
index 0000000000..306b48546f
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/entries/returns-iterator-empty.js
@@ -0,0 +1,27 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.entries
+description: >
+ Set.prototype.entries ( )
+
+ ...
+ 2. Return CreateSetIterator(S, "key+value").
+
+
+ 23.2.5.1 CreateSetIterator Abstract Operation
+
+ ...
+ 7. Return iterator.
+
+
+---*/
+
+var set = new Set();
+var iterator = set.entries();
+var result = iterator.next();
+
+assert.sameValue(result.value, undefined, "The value of `result.value` is `undefined`");
+assert.sameValue(result.done, true, "The value of `result.done` is `true`");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/entries/returns-iterator.js b/js/src/tests/test262/built-ins/Set/prototype/entries/returns-iterator.js
new file mode 100644
index 0000000000..8193ffd31f
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/entries/returns-iterator.js
@@ -0,0 +1,58 @@
+// Copyright (C) 2014 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.entries
+description: >
+ Set.prototype.entries ( )
+
+ ...
+ 2. Return CreateSetIterator(S, "key+value").
+
+
+ 23.2.5.1 CreateSetIterator Abstract Operation
+
+ ...
+ 7. Return iterator.
+
+
+---*/
+
+var set = new Set();
+set.add(1);
+set.add(2);
+set.add(3);
+
+var iterator = set.entries();
+var result;
+
+result = iterator.next();
+assert.sameValue(result.value[0], 1, 'First result `value` ("key")');
+assert.sameValue(result.value[1], 1, 'First result `value` ("value")');
+assert.sameValue(result.value.length, 2, 'First result `value` (length)');
+assert.sameValue(result.done, false, 'First result `done` flag');
+
+result = iterator.next();
+assert.sameValue(result.value[0], 2, 'Second result `value` ("key")');
+assert.sameValue(result.value[1], 2, 'Second result `value` ("value")');
+assert.sameValue(result.value.length, 2, 'Second result `value` (length)');
+assert.sameValue(result.done, false, 'Second result `done` flag');
+
+result = iterator.next();
+assert.sameValue(result.value[0], 3, 'Third result `value` ("key")');
+assert.sameValue(result.value[1], 3, 'Third result `value` ("value")');
+assert.sameValue(result.value.length, 2, 'Third result `value` (length)');
+assert.sameValue(result.done, false, 'Third result `done` flag');
+
+result = iterator.next();
+assert.sameValue(result.value, undefined, 'Exhausted result `value`');
+assert.sameValue(result.done, true, 'Exhausted result `done` flag');
+
+result = iterator.next();
+assert.sameValue(
+ result.value, undefined, 'Exhausted result `value` (repeated request)'
+);
+assert.sameValue(
+ result.done, true, 'Exhausted result `done` flag (repeated request)'
+);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/entries/shell.js b/js/src/tests/test262/built-ins/Set/prototype/entries/shell.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/entries/shell.js
diff --git a/js/src/tests/test262/built-ins/Set/prototype/entries/this-not-object-throw-boolean.js b/js/src/tests/test262/built-ins/Set/prototype/entries/this-not-object-throw-boolean.js
new file mode 100644
index 0000000000..d3ebbfdc38
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/entries/this-not-object-throw-boolean.js
@@ -0,0 +1,28 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.entries
+description: >
+ Set.prototype.entries ( )
+
+ ...
+ 2. Return CreateSetIterator(S, "key+value").
+
+
+ 23.2.5.1 CreateSetIterator Abstract Operation
+
+ 1. If Type(set) is not Object, throw a TypeError exception.
+ ...
+
+---*/
+
+assert.throws(TypeError, function() {
+ Set.prototype.entries.call(false);
+});
+
+assert.throws(TypeError, function() {
+ var s = new Set();
+ s.entries.call(false);
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/entries/this-not-object-throw-null.js b/js/src/tests/test262/built-ins/Set/prototype/entries/this-not-object-throw-null.js
new file mode 100644
index 0000000000..93613ac76d
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/entries/this-not-object-throw-null.js
@@ -0,0 +1,27 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.entries
+description: >
+ Set.prototype.entries ( )
+
+ ...
+ 2. Return CreateSetIterator(S, "key+value").
+
+
+ 23.2.5.1 CreateSetIterator Abstract Operation
+
+ 1. If Type(set) is not Object, throw a TypeError exception.
+ ...
+---*/
+
+assert.throws(TypeError, function() {
+ Set.prototype.entries.call(null);
+});
+
+assert.throws(TypeError, function() {
+ var s = new Set();
+ s.entries.call(null);
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/entries/this-not-object-throw-number.js b/js/src/tests/test262/built-ins/Set/prototype/entries/this-not-object-throw-number.js
new file mode 100644
index 0000000000..6d03bbba3e
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/entries/this-not-object-throw-number.js
@@ -0,0 +1,27 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.entries
+description: >
+ Set.prototype.entries ( )
+
+ ...
+ 2. Return CreateSetIterator(S, "key+value").
+
+
+ 23.2.5.1 CreateSetIterator Abstract Operation
+
+ 1. If Type(set) is not Object, throw a TypeError exception.
+ ...
+---*/
+
+assert.throws(TypeError, function() {
+ Set.prototype.entries.call(0);
+});
+
+assert.throws(TypeError, function() {
+ var s = new Set();
+ s.entries.call(0);
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/entries/this-not-object-throw-string.js b/js/src/tests/test262/built-ins/Set/prototype/entries/this-not-object-throw-string.js
new file mode 100644
index 0000000000..8230c391d9
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/entries/this-not-object-throw-string.js
@@ -0,0 +1,27 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.entries
+description: >
+ Set.prototype.entries ( )
+
+ ...
+ 2. Return CreateSetIterator(S, "key+value").
+
+
+ 23.2.5.1 CreateSetIterator Abstract Operation
+
+ 1. If Type(set) is not Object, throw a TypeError exception.
+ ...
+---*/
+
+assert.throws(TypeError, function() {
+ Set.prototype.entries.call("");
+});
+
+assert.throws(TypeError, function() {
+ var s = new Set();
+ s.entries.call("");
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/entries/this-not-object-throw-symbol.js b/js/src/tests/test262/built-ins/Set/prototype/entries/this-not-object-throw-symbol.js
new file mode 100644
index 0000000000..cddd8e20f3
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/entries/this-not-object-throw-symbol.js
@@ -0,0 +1,28 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.entries
+description: >
+ Set.prototype.entries ( )
+
+ ...
+ 2. Return CreateSetIterator(S, "key+value").
+
+
+ 23.2.5.1 CreateSetIterator Abstract Operation
+
+ 1. If Type(set) is not Object, throw a TypeError exception.
+ ...
+features: [Symbol]
+---*/
+
+assert.throws(TypeError, function() {
+ Set.prototype.entries.call(Symbol());
+});
+
+assert.throws(TypeError, function() {
+ var s = new Set();
+ s.entries.call(Symbol());
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/entries/this-not-object-throw-undefined.js b/js/src/tests/test262/built-ins/Set/prototype/entries/this-not-object-throw-undefined.js
new file mode 100644
index 0000000000..cbae89d89d
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/entries/this-not-object-throw-undefined.js
@@ -0,0 +1,27 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.entries
+description: >
+ Set.prototype.entries ( )
+
+ ...
+ 2. Return CreateSetIterator(S, "key+value").
+
+
+ 23.2.5.1 CreateSetIterator Abstract Operation
+
+ 1. If Type(set) is not Object, throw a TypeError exception.
+ ...
+---*/
+
+assert.throws(TypeError, function() {
+ Set.prototype.entries.call(undefined);
+});
+
+assert.throws(TypeError, function() {
+ var s = new Set();
+ s.entries.call(undefined);
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/forEach/browser.js b/js/src/tests/test262/built-ins/Set/prototype/forEach/browser.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/forEach/browser.js
diff --git a/js/src/tests/test262/built-ins/Set/prototype/forEach/callback-not-callable-boolean.js b/js/src/tests/test262/built-ins/Set/prototype/forEach/callback-not-callable-boolean.js
new file mode 100644
index 0000000000..f24c6d0ade
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/forEach/callback-not-callable-boolean.js
@@ -0,0 +1,22 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.forEach
+description: >
+ Set.prototype.forEach ( callbackfn [ , thisArg ] )
+
+ ...
+ 4. If IsCallable(callbackfn) is false, throw a TypeError exception.
+ ...
+
+ Passing `false` as callback
+
+---*/
+
+var s = new Set([1]);
+
+assert.throws(TypeError, function() {
+ s.forEach(false);
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/forEach/callback-not-callable-null.js b/js/src/tests/test262/built-ins/Set/prototype/forEach/callback-not-callable-null.js
new file mode 100644
index 0000000000..89b29d2737
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/forEach/callback-not-callable-null.js
@@ -0,0 +1,22 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.forEach
+description: >
+ Set.prototype.forEach ( callbackfn [ , thisArg ] )
+
+ ...
+ 4. If IsCallable(callbackfn) is false, throw a TypeError exception.
+ ...
+
+ Passing `null` as callback
+
+---*/
+
+var s = new Set([1]);
+
+assert.throws(TypeError, function() {
+ s.forEach(null);
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/forEach/callback-not-callable-number.js b/js/src/tests/test262/built-ins/Set/prototype/forEach/callback-not-callable-number.js
new file mode 100644
index 0000000000..38740e4dd0
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/forEach/callback-not-callable-number.js
@@ -0,0 +1,22 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.forEach
+description: >
+ Set.prototype.forEach ( callbackfn [ , thisArg ] )
+
+ ...
+ 4. If IsCallable(callbackfn) is false, throw a TypeError exception.
+ ...
+
+ Passing `number` as callback
+
+---*/
+
+var s = new Set([1]);
+
+assert.throws(TypeError, function() {
+ s.forEach(0);
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/forEach/callback-not-callable-string.js b/js/src/tests/test262/built-ins/Set/prototype/forEach/callback-not-callable-string.js
new file mode 100644
index 0000000000..071fd839e2
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/forEach/callback-not-callable-string.js
@@ -0,0 +1,22 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.forEach
+description: >
+ Set.prototype.forEach ( callbackfn [ , thisArg ] )
+
+ ...
+ 4. If IsCallable(callbackfn) is false, throw a TypeError exception.
+ ...
+
+ Passing `string` as callback
+
+---*/
+
+var s = new Set([1]);
+
+assert.throws(TypeError, function() {
+ s.forEach("");
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/forEach/callback-not-callable-symbol.js b/js/src/tests/test262/built-ins/Set/prototype/forEach/callback-not-callable-symbol.js
new file mode 100644
index 0000000000..0fccfd438a
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/forEach/callback-not-callable-symbol.js
@@ -0,0 +1,23 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.forEach
+description: >
+ Set.prototype.forEach ( callbackfn [ , thisArg ] )
+
+ ...
+ 4. If IsCallable(callbackfn) is false, throw a TypeError exception.
+ ...
+
+ Passing `symbol` as callback
+
+features: [Symbol]
+---*/
+
+var s = new Set([1]);
+
+assert.throws(TypeError, function() {
+ s.forEach(Symbol());
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/forEach/callback-not-callable-undefined.js b/js/src/tests/test262/built-ins/Set/prototype/forEach/callback-not-callable-undefined.js
new file mode 100644
index 0000000000..40afeda4db
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/forEach/callback-not-callable-undefined.js
@@ -0,0 +1,22 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.forEach
+description: >
+ Set.prototype.forEach ( callbackfn [ , thisArg ] )
+
+ ...
+ 4. If IsCallable(callbackfn) is false, throw a TypeError exception.
+ ...
+
+ Passing `undefined` as callback
+
+---*/
+
+var s = new Set([1]);
+
+assert.throws(TypeError, function() {
+ s.forEach(undefined);
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/forEach/does-not-have-setdata-internal-slot-array.js b/js/src/tests/test262/built-ins/Set/prototype/forEach/does-not-have-setdata-internal-slot-array.js
new file mode 100644
index 0000000000..d462ba579b
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/forEach/does-not-have-setdata-internal-slot-array.js
@@ -0,0 +1,23 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.forEach
+description: >
+ Set.prototype.forEach ( callbackfn [ , thisArg ] )
+
+ ...
+ 3. If S does not have a [[SetData]] internal slot, throw a TypeError exception.
+ ...
+
+---*/
+
+assert.throws(TypeError, function() {
+ Set.prototype.forEach.call([], function() {});
+});
+
+assert.throws(TypeError, function() {
+ var s = new Set();
+ s.forEach.call([], function() {});
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/forEach/does-not-have-setdata-internal-slot-map.js b/js/src/tests/test262/built-ins/Set/prototype/forEach/does-not-have-setdata-internal-slot-map.js
new file mode 100644
index 0000000000..50f6171e36
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/forEach/does-not-have-setdata-internal-slot-map.js
@@ -0,0 +1,23 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.forEach
+description: >
+ Set.prototype.forEach ( callbackfn [ , thisArg ] )
+
+ ...
+ 3. If S does not have a [[SetData]] internal slot, throw a TypeError exception.
+ ...
+
+---*/
+
+assert.throws(TypeError, function() {
+ Set.prototype.forEach.call(new Map(), function() {});
+});
+
+assert.throws(TypeError, function() {
+ var s = new Set();
+ s.forEach.call(new Map(), function() {});
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/forEach/does-not-have-setdata-internal-slot-object.js b/js/src/tests/test262/built-ins/Set/prototype/forEach/does-not-have-setdata-internal-slot-object.js
new file mode 100644
index 0000000000..a8f2bb3d1e
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/forEach/does-not-have-setdata-internal-slot-object.js
@@ -0,0 +1,23 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.forEach
+description: >
+ Set.prototype.forEach ( callbackfn [ , thisArg ] )
+
+ ...
+ 3. If S does not have a [[SetData]] internal slot, throw a TypeError exception.
+ ...
+
+---*/
+
+assert.throws(TypeError, function() {
+ Set.prototype.forEach.call({}, function() {});
+});
+
+assert.throws(TypeError, function() {
+ var s = new Set();
+ s.forEach.call({}, function() {});
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/forEach/does-not-have-setdata-internal-slot-set-prototype.js b/js/src/tests/test262/built-ins/Set/prototype/forEach/does-not-have-setdata-internal-slot-set-prototype.js
new file mode 100644
index 0000000000..8ec937a84c
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/forEach/does-not-have-setdata-internal-slot-set-prototype.js
@@ -0,0 +1,23 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.forEach
+description: >
+ Set.prototype.forEach ( callbackfn [ , thisArg ] )
+
+ ...
+ 3. If S does not have a [[SetData]] internal slot, throw a TypeError exception.
+ ...
+
+---*/
+
+assert.throws(TypeError, function() {
+ Set.prototype.forEach.call(Set.prototype, function() {});
+});
+
+assert.throws(TypeError, function() {
+ var s = new Set();
+ s.forEach.call(Set.prototype, function() {});
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/forEach/does-not-have-setdata-internal-slot-weakset.js b/js/src/tests/test262/built-ins/Set/prototype/forEach/does-not-have-setdata-internal-slot-weakset.js
new file mode 100644
index 0000000000..e407f5e46c
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/forEach/does-not-have-setdata-internal-slot-weakset.js
@@ -0,0 +1,23 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.forEach
+description: >
+ Set.prototype.forEach ( callbackfn [ , thisArg ] )
+
+ ...
+ 3. If S does not have a [[SetData]] internal slot, throw a TypeError exception.
+ ...
+features: [WeakSet]
+---*/
+
+assert.throws(TypeError, function() {
+ Set.prototype.forEach.call(new WeakSet(), function() {});
+});
+
+assert.throws(TypeError, function() {
+ var s = new Set();
+ s.forEach.call(new WeakSet(), function() {});
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/forEach/forEach.js b/js/src/tests/test262/built-ins/Set/prototype/forEach/forEach.js
new file mode 100644
index 0000000000..e1ec73eb15
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/forEach/forEach.js
@@ -0,0 +1,23 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.forEach
+description: >
+ Set.prototype.forEach ( callbackfn [ , thisArg ] )
+
+ 17 ECMAScript Standard Built-in Objects
+
+includes: [propertyHelper.js]
+---*/
+
+assert.sameValue(
+ typeof Set.prototype.forEach,
+ "function",
+ "`typeof Set.prototype.forEach` is `'function'`"
+);
+
+verifyNotEnumerable(Set.prototype, "forEach");
+verifyWritable(Set.prototype, "forEach");
+verifyConfigurable(Set.prototype, "forEach");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/forEach/iterates-in-insertion-order.js b/js/src/tests/test262/built-ins/Set/prototype/forEach/iterates-in-insertion-order.js
new file mode 100644
index 0000000000..594b2c0735
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/forEach/iterates-in-insertion-order.js
@@ -0,0 +1,31 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.forEach
+description: >
+ Set.prototype.forEach ( callbackfn [ , thisArg ] )
+
+ ...
+ 7. Repeat for each e that is an element of entries, in original insertion order
+ a. If e is not empty, then
+ i. Let funcResult be Call(callbackfn, T, «e, e, S»).
+ ii. ReturnIfAbrupt(funcResult).
+ ...
+---*/
+
+var s = new Set();
+var expects = [1, 2, 3];
+
+s.add(1).add(2).add(3);
+
+s.forEach(function(value, entry, set) {
+ var expect = expects.shift();
+
+ assert.sameValue(value, expect);
+ assert.sameValue(entry, expect);
+ assert.sameValue(set, s);
+});
+
+assert.sameValue(expects.length, 0, "The value of `expects.length` is `0`");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/forEach/iterates-in-iterable-entry-order.js b/js/src/tests/test262/built-ins/Set/prototype/forEach/iterates-in-iterable-entry-order.js
new file mode 100644
index 0000000000..920de93dff
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/forEach/iterates-in-iterable-entry-order.js
@@ -0,0 +1,29 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.forEach
+description: >
+ Set.prototype.forEach ( callbackfn [ , thisArg ] )
+
+ ...
+ 7. Repeat for each e that is an element of entries, in original insertion order
+ a. If e is not empty, then
+ i. Let funcResult be Call(callbackfn, T, «e, e, S»).
+ ii. ReturnIfAbrupt(funcResult).
+ ...
+---*/
+
+var expects = [1, 2, 3];
+var s = new Set(expects);
+
+s.forEach(function(value, entry, set) {
+ var expect = expects.shift();
+
+ assert.sameValue(value, expect);
+ assert.sameValue(entry, expect);
+ assert.sameValue(set, s);
+});
+
+assert.sameValue(expects.length, 0, "The value of `expects.length` is `0`");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/forEach/iterates-values-added-after-foreach-begins.js b/js/src/tests/test262/built-ins/Set/prototype/forEach/iterates-values-added-after-foreach-begins.js
new file mode 100644
index 0000000000..4a6eb0a13e
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/forEach/iterates-values-added-after-foreach-begins.js
@@ -0,0 +1,44 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.forEach
+description: >
+ Set.prototype.forEach ( callbackfn [ , thisArg ] )
+
+ ...
+ 7. Repeat for each e that is an element of entries, in original insertion order
+ a. If e is not empty, then
+ i. Let funcResult be Call(callbackfn, T, «e, e, S»).
+ ii. ReturnIfAbrupt(funcResult).
+ ...
+
+ NOTE:
+
+ ...
+ New values added after the call to forEach begins are visited.
+
+---*/
+
+
+var s = new Set([1]);
+var expects = [1, 2, 3];
+
+s.forEach(function(value, entry, set) {
+ var expect = expects.shift();
+
+ if (value === 1) {
+ set.add(2);
+ }
+
+ if (value === 2) {
+ set.add(3);
+ }
+
+ assert.sameValue(value, expect);
+ assert.sameValue(entry, expect);
+ assert.sameValue(set, s);
+});
+
+assert.sameValue(expects.length, 0, "The value of `expects.length` is `0`");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/forEach/iterates-values-deleted-then-readded.js b/js/src/tests/test262/built-ins/Set/prototype/forEach/iterates-values-deleted-then-readded.js
new file mode 100644
index 0000000000..b764598d72
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/forEach/iterates-values-deleted-then-readded.js
@@ -0,0 +1,47 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.forEach
+description: >
+ Set.prototype.forEach ( callbackfn [ , thisArg ] )
+
+ ...
+ 7. Repeat for each e that is an element of entries, in original insertion order
+ a. If e is not empty, then
+ i. Let funcResult be Call(callbackfn, T, «e, e, S»).
+ ii. ReturnIfAbrupt(funcResult).
+ ...
+
+ NOTE:
+
+ ...
+ Values that are deleted after the call to forEach begins and before being visited are not visited unless the value is added again before the forEach call completes.
+ ...
+
+---*/
+
+
+var s = new Set([1, 2, 3]);
+var expects = [1, 3, 2];
+
+s.forEach(function(value, entry, set) {
+ var expect = expects.shift();
+
+ // Delete `2` before being visited
+ if (value === 1) {
+ set.delete(2);
+ }
+
+ // Re-add `2` before forEach call completes
+ if (value === 3) {
+ set.add(2);
+ }
+
+ assert.sameValue(value, expect);
+ assert.sameValue(entry, expect);
+ assert.sameValue(set, s);
+});
+
+assert.sameValue(expects.length, 0, "The value of `expects.length` is `0`");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/forEach/iterates-values-not-deleted.js b/js/src/tests/test262/built-ins/Set/prototype/forEach/iterates-values-not-deleted.js
new file mode 100644
index 0000000000..97f5bde079
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/forEach/iterates-values-not-deleted.js
@@ -0,0 +1,36 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.forEach
+description: >
+ Set.prototype.forEach ( callbackfn [ , thisArg ] )
+
+ ...
+ 7. Repeat for each e that is an element of entries, in original insertion order
+ a. If e is not empty, then
+ i. Let funcResult be Call(callbackfn, T, «e, e, S»).
+ ii. ReturnIfAbrupt(funcResult).
+ ...
+
+ NOTE:
+
+ callbackfn should be a function that accepts three arguments. forEach calls callbackfn once for each value present in the set object, in value insertion order. callbackfn is called only for values of the Set which actually exist; it is not called for keys that have been deleted from the set.
+
+---*/
+
+var expects = [1, 3];
+var s = new Set([1, 2, 3]);
+
+s.delete(2);
+
+s.forEach(function(value, entry, set) {
+ var expect = expects.shift();
+
+ assert.sameValue(value, expect);
+ assert.sameValue(entry, expect);
+ assert.sameValue(set, s);
+});
+
+assert.sameValue(expects.length, 0, "`forEach` is not a no-op");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/forEach/iterates-values-revisits-after-delete-re-add.js b/js/src/tests/test262/built-ins/Set/prototype/forEach/iterates-values-revisits-after-delete-re-add.js
new file mode 100644
index 0000000000..11de01c1be
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/forEach/iterates-values-revisits-after-delete-re-add.js
@@ -0,0 +1,47 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.forEach
+description: >
+ Set.prototype.forEach ( callbackfn [ , thisArg ] )
+
+ ...
+ 7. Repeat for each e that is an element of entries, in original insertion order
+ a. If e is not empty, then
+ i. Let funcResult be Call(callbackfn, T, «e, e, S»).
+ ii. ReturnIfAbrupt(funcResult).
+ ...
+
+ NOTE:
+
+ ...
+ a value will be revisited if it is deleted after it has been visited and then re-added before the forEach call completes.
+ ...
+
+---*/
+
+
+var s = new Set([1, 2, 3]);
+var expects = [1, 2, 3, 1];
+
+s.forEach(function(value, entry, set) {
+ var expect = expects.shift();
+
+ // Delete `1` after visit
+ if (value === 2) {
+ set.delete(1);
+ }
+
+ // Re-add `1`
+ if (value === 3) {
+ set.add(1);
+ }
+
+ assert.sameValue(value, expect);
+ assert.sameValue(entry, expect);
+ assert.sameValue(set, s);
+});
+
+assert.sameValue(expects.length, 0, "The value of `expects.length` is `0`");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/forEach/length.js b/js/src/tests/test262/built-ins/Set/prototype/forEach/length.js
new file mode 100644
index 0000000000..8304c78447
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/forEach/length.js
@@ -0,0 +1,19 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.forEach
+description: >
+ Set.prototype.forEach ( callbackfn [ , thisArg ] )
+
+ The length property of the forEach method is 1.
+
+includes: [propertyHelper.js]
+---*/
+
+assert.sameValue(Set.prototype.forEach.length, 1, "The value of `Set.prototype.forEach.length` is `1`");
+
+verifyNotEnumerable(Set.prototype.forEach, "length");
+verifyNotWritable(Set.prototype.forEach, "length");
+verifyConfigurable(Set.prototype.forEach, "length");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/forEach/name.js b/js/src/tests/test262/built-ins/Set/prototype/forEach/name.js
new file mode 100644
index 0000000000..390b016c64
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/forEach/name.js
@@ -0,0 +1,19 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.forEach
+description: >
+ Set.prototype.forEach ( callbackfn [ , thisArg ] )
+
+ 17 ECMAScript Standard Built-in Objects
+
+includes: [propertyHelper.js]
+---*/
+
+assert.sameValue(Set.prototype.forEach.name, "forEach", "The value of `Set.prototype.forEach.name` is `'forEach'`");
+
+verifyNotEnumerable(Set.prototype.forEach, "name");
+verifyNotWritable(Set.prototype.forEach, "name");
+verifyConfigurable(Set.prototype.forEach, "name");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/forEach/not-a-constructor.js b/js/src/tests/test262/built-ins/Set/prototype/forEach/not-a-constructor.js
new file mode 100644
index 0000000000..96509bf80a
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/forEach/not-a-constructor.js
@@ -0,0 +1,35 @@
+// Copyright (C) 2020 Rick Waldron. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-ecmascript-standard-built-in-objects
+description: >
+ Set.prototype.forEach does not implement [[Construct]], is not new-able
+info: |
+ ECMAScript Function Objects
+
+ Built-in function objects that are not identified as constructors do not
+ implement the [[Construct]] internal method unless otherwise specified in
+ the description of a particular function.
+
+ sec-evaluatenew
+
+ ...
+ 7. If IsConstructor(constructor) is false, throw a TypeError exception.
+ ...
+includes: [isConstructor.js]
+features: [Reflect.construct, Set, arrow-function]
+---*/
+
+assert.sameValue(
+ isConstructor(Set.prototype.forEach),
+ false,
+ 'isConstructor(Set.prototype.forEach) must return false'
+);
+
+assert.throws(TypeError, () => {
+ let s = new Set([]); new s.forEach(() => {});
+}, '`let s = new Set([]); new s.forEach(() => {})` throws TypeError');
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/forEach/returns-undefined.js b/js/src/tests/test262/built-ins/Set/prototype/forEach/returns-undefined.js
new file mode 100644
index 0000000000..27cac6eb45
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/forEach/returns-undefined.js
@@ -0,0 +1,21 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.forEach
+description: >
+ Set.prototype.forEach ( callbackfn [ , thisArg ] )
+
+ ...
+ 8. Return undefined.
+
+---*/
+
+var s = new Set([1]);
+
+assert.sameValue(
+ s.forEach(function() {}),
+ undefined,
+ "`s.forEach(function() {})` returns `undefined`"
+);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/forEach/shell.js b/js/src/tests/test262/built-ins/Set/prototype/forEach/shell.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/forEach/shell.js
diff --git a/js/src/tests/test262/built-ins/Set/prototype/forEach/this-arg-explicit-cannot-override-lexical-this-arrow.js b/js/src/tests/test262/built-ins/Set/prototype/forEach/this-arg-explicit-cannot-override-lexical-this-arrow.js
new file mode 100644
index 0000000000..7c20508936
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/forEach/this-arg-explicit-cannot-override-lexical-this-arrow.js
@@ -0,0 +1,28 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.forEach
+description: >
+ Set.prototype.forEach ( callbackfn [ , thisArg ] )
+
+ ...
+ 5. If thisArg was supplied, let T be thisArg; else let T be undefined.
+ ...
+
+ An arrow function will ignore an explicit thisArg
+
+features: [arrow-function]
+---*/
+
+var s = new Set([1]);
+var usurper = {};
+var counter = 0;
+
+s.forEach(_ => {
+ assert.notSameValue(this, usurper, "`this` is not `usurper`");
+ counter++;
+}, usurper);
+
+assert.sameValue(counter, 1, "`forEach` is not a no-op");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/forEach/this-arg-explicit.js b/js/src/tests/test262/built-ins/Set/prototype/forEach/this-arg-explicit.js
new file mode 100644
index 0000000000..dcae47e946
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/forEach/this-arg-explicit.js
@@ -0,0 +1,24 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.forEach
+description: >
+ Set.prototype.forEach ( callbackfn [ , thisArg ] )
+
+ ...
+ 5. If thisArg was supplied, let T be thisArg; else let T be undefined.
+ ...
+---*/
+
+var s = new Set([1]);
+var thisArg = {};
+var counter = 0;
+
+s.forEach(function() {
+ assert.sameValue(this, thisArg, "`this` is `thisArg`");
+ counter++;
+}, thisArg);
+
+assert.sameValue(counter, 1, "`forEach` is not a no-op");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/forEach/this-non-strict.js b/js/src/tests/test262/built-ins/Set/prototype/forEach/this-non-strict.js
new file mode 100644
index 0000000000..b7d3a08faf
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/forEach/this-non-strict.js
@@ -0,0 +1,26 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.forEach
+description: >
+ Set.prototype.forEach ( callbackfn [ , thisArg ] )
+
+ ...
+ 5. If thisArg was supplied, let T be thisArg; else let T be undefined.
+ ...
+
+flags: [noStrict]
+---*/
+
+var s = new Set([1]);
+var counter = 0;
+var globalObject = this;
+
+s.forEach(function() {
+ assert.sameValue(this, globalObject, "`this` is the global object in non-strict mode code");
+ counter++;
+});
+
+assert.sameValue(counter, 1, "`forEach` is not a no-op");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/forEach/this-not-object-throw-boolean.js b/js/src/tests/test262/built-ins/Set/prototype/forEach/this-not-object-throw-boolean.js
new file mode 100644
index 0000000000..d06d23cec1
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/forEach/this-not-object-throw-boolean.js
@@ -0,0 +1,22 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.forEach
+description: >
+ Set.prototype.forEach ( callbackfn [ , thisArg ] )
+
+ 1. Let S be the this value.
+ 2. If Type(S) is not Object, throw a TypeError exception.
+
+---*/
+
+assert.throws(TypeError, function() {
+ Set.prototype.forEach.call(false, function() {});
+});
+
+assert.throws(TypeError, function() {
+ var s = new Set();
+ s.forEach.call(false, function() {});
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/forEach/this-not-object-throw-null.js b/js/src/tests/test262/built-ins/Set/prototype/forEach/this-not-object-throw-null.js
new file mode 100644
index 0000000000..9fb0dd4177
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/forEach/this-not-object-throw-null.js
@@ -0,0 +1,22 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.forEach
+description: >
+ Set.prototype.forEach ( callbackfn [ , thisArg ] )
+
+ 1. Let S be the this value.
+ 2. If Type(S) is not Object, throw a TypeError exception.
+
+---*/
+
+assert.throws(TypeError, function() {
+ Set.prototype.forEach.call(null, function() {});
+});
+
+assert.throws(TypeError, function() {
+ var s = new Set();
+ s.forEach.call(null, function() {});
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/forEach/this-not-object-throw-number.js b/js/src/tests/test262/built-ins/Set/prototype/forEach/this-not-object-throw-number.js
new file mode 100644
index 0000000000..2ee877c8dc
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/forEach/this-not-object-throw-number.js
@@ -0,0 +1,22 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.forEach
+description: >
+ Set.prototype.forEach ( callbackfn [ , thisArg ] )
+
+ 1. Let S be the this value.
+ 2. If Type(S) is not Object, throw a TypeError exception.
+
+---*/
+
+assert.throws(TypeError, function() {
+ Set.prototype.forEach.call(0, function() {});
+});
+
+assert.throws(TypeError, function() {
+ var s = new Set();
+ s.forEach.call(0, function() {});
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/forEach/this-not-object-throw-string.js b/js/src/tests/test262/built-ins/Set/prototype/forEach/this-not-object-throw-string.js
new file mode 100644
index 0000000000..0e12d3fdc5
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/forEach/this-not-object-throw-string.js
@@ -0,0 +1,22 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.forEach
+description: >
+ Set.prototype.forEach ( callbackfn [ , thisArg ] )
+
+ 1. Let S be the this value.
+ 2. If Type(S) is not Object, throw a TypeError exception.
+
+---*/
+
+assert.throws(TypeError, function() {
+ Set.prototype.forEach.call("", function() {});
+});
+
+assert.throws(TypeError, function() {
+ var s = new Set();
+ s.forEach.call("", function() {});
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/forEach/this-not-object-throw-symbol.js b/js/src/tests/test262/built-ins/Set/prototype/forEach/this-not-object-throw-symbol.js
new file mode 100644
index 0000000000..acf72f3e03
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/forEach/this-not-object-throw-symbol.js
@@ -0,0 +1,23 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.forEach
+description: >
+ Set.prototype.forEach ( callbackfn [ , thisArg ] )
+
+ 1. Let S be the this value.
+ 2. If Type(S) is not Object, throw a TypeError exception.
+
+features: [Symbol]
+---*/
+
+assert.throws(TypeError, function() {
+ Set.prototype.forEach.call(Symbol(), function() {});
+});
+
+assert.throws(TypeError, function() {
+ var s = new Set();
+ s.forEach.call(Symbol(), function() {});
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/forEach/this-not-object-throw-undefined.js b/js/src/tests/test262/built-ins/Set/prototype/forEach/this-not-object-throw-undefined.js
new file mode 100644
index 0000000000..cc97196396
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/forEach/this-not-object-throw-undefined.js
@@ -0,0 +1,22 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.forEach
+description: >
+ Set.prototype.forEach ( callbackfn [ , thisArg ] )
+
+ 1. Let S be the this value.
+ 2. If Type(S) is not Object, throw a TypeError exception.
+
+---*/
+
+assert.throws(TypeError, function() {
+ Set.prototype.forEach.call(undefined, function() {});
+});
+
+assert.throws(TypeError, function() {
+ var s = new Set();
+ s.forEach.call(undefined, function() {});
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/forEach/this-strict-strict.js b/js/src/tests/test262/built-ins/Set/prototype/forEach/this-strict-strict.js
new file mode 100644
index 0000000000..8360f34120
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/forEach/this-strict-strict.js
@@ -0,0 +1,26 @@
+'use strict';
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.forEach
+description: >
+ Set.prototype.forEach ( callbackfn [ , thisArg ] )
+
+ ...
+ 5. If thisArg was supplied, let T be thisArg; else let T be undefined.
+ ...
+
+flags: [onlyStrict]
+---*/
+
+var s = new Set([1]);
+var counter = 0;
+
+s.forEach(function() {
+ assert.sameValue(this, undefined, "`this` is `undefined` in strict mode code");
+ counter++;
+});
+
+assert.sameValue(counter, 1, "`forEach` is not a no-op");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/forEach/throws-when-callback-throws.js b/js/src/tests/test262/built-ins/Set/prototype/forEach/throws-when-callback-throws.js
new file mode 100644
index 0000000000..423b0d2fe5
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/forEach/throws-when-callback-throws.js
@@ -0,0 +1,28 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.forEach
+description: >
+ Set.prototype.forEach ( callbackfn [ , thisArg ] )
+
+ ...
+ 7. Repeat for each e that is an element of entries, in original insertion order
+ a. If e is not empty, then
+ i. Let funcResult be Call(callbackfn, T, «e, e, S»).
+ ii. ReturnIfAbrupt(funcResult).
+ ...
+---*/
+
+var s = new Set([1]);
+var counter = 0;
+
+assert.throws(Error, function() {
+ s.forEach(function() {
+ counter++;
+ throw new Error();
+ });
+});
+
+assert.sameValue(counter, 1, "`forEach` is not a no-op");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/has/browser.js b/js/src/tests/test262/built-ins/Set/prototype/has/browser.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/has/browser.js
diff --git a/js/src/tests/test262/built-ins/Set/prototype/has/does-not-have-setdata-internal-slot-array.js b/js/src/tests/test262/built-ins/Set/prototype/has/does-not-have-setdata-internal-slot-array.js
new file mode 100644
index 0000000000..3ae1b82da5
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/has/does-not-have-setdata-internal-slot-array.js
@@ -0,0 +1,23 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.has
+description: >
+ Set.prototype.has ( value )
+
+ ...
+ 3. If S does not have a [[SetData]] internal slot, throw a TypeError exception.
+ ...
+
+---*/
+
+assert.throws(TypeError, function() {
+ Set.prototype.has.call([], 1);
+});
+
+assert.throws(TypeError, function() {
+ var s = new Set();
+ s.has.call([], 1);
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/has/does-not-have-setdata-internal-slot-map.js b/js/src/tests/test262/built-ins/Set/prototype/has/does-not-have-setdata-internal-slot-map.js
new file mode 100644
index 0000000000..1730d3589f
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/has/does-not-have-setdata-internal-slot-map.js
@@ -0,0 +1,23 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.has
+description: >
+ Set.prototype.has ( value )
+
+ ...
+ 3. If S does not have a [[SetData]] internal slot, throw a TypeError exception.
+ ...
+
+---*/
+
+assert.throws(TypeError, function() {
+ Set.prototype.has.call(new Map(), 1);
+});
+
+assert.throws(TypeError, function() {
+ var s = new Set();
+ s.has.call(new Map(), 1);
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/has/does-not-have-setdata-internal-slot-object.js b/js/src/tests/test262/built-ins/Set/prototype/has/does-not-have-setdata-internal-slot-object.js
new file mode 100644
index 0000000000..ec257eb554
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/has/does-not-have-setdata-internal-slot-object.js
@@ -0,0 +1,23 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.has
+description: >
+ Set.prototype.has ( value )
+
+ ...
+ 3. If S does not have a [[SetData]] internal slot, throw a TypeError exception.
+ ...
+
+---*/
+
+assert.throws(TypeError, function() {
+ Set.prototype.has.call({}, 1);
+});
+
+assert.throws(TypeError, function() {
+ var s = new Set();
+ s.has.call({}, 1);
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/has/does-not-have-setdata-internal-slot-set-prototype.js b/js/src/tests/test262/built-ins/Set/prototype/has/does-not-have-setdata-internal-slot-set-prototype.js
new file mode 100644
index 0000000000..aa82cb1ade
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/has/does-not-have-setdata-internal-slot-set-prototype.js
@@ -0,0 +1,23 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.has
+description: >
+ Set.prototype.has ( value )
+
+ ...
+ 3. If S does not have a [[SetData]] internal slot, throw a TypeError exception.
+ ...
+
+---*/
+
+assert.throws(TypeError, function() {
+ Set.prototype.has.call(Set.prototype, 1);
+});
+
+assert.throws(TypeError, function() {
+ var s = new Set();
+ s.has.call(Set.prototype, 1);
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/has/does-not-have-setdata-internal-slot-weakset.js b/js/src/tests/test262/built-ins/Set/prototype/has/does-not-have-setdata-internal-slot-weakset.js
new file mode 100644
index 0000000000..e2137cc903
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/has/does-not-have-setdata-internal-slot-weakset.js
@@ -0,0 +1,23 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.has
+description: >
+ Set.prototype.has ( value )
+
+ ...
+ 3. If S does not have a [[SetData]] internal slot, throw a TypeError exception.
+ ...
+features: [WeakSet]
+---*/
+
+assert.throws(TypeError, function() {
+ Set.prototype.has.call(new WeakSet(), 1);
+});
+
+assert.throws(TypeError, function() {
+ var s = new Set();
+ s.has.call(new WeakSet(), 1);
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/has/has.js b/js/src/tests/test262/built-ins/Set/prototype/has/has.js
new file mode 100644
index 0000000000..c8f3c054ae
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/has/has.js
@@ -0,0 +1,23 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.has
+description: >
+ Set.prototype.has ( value )
+
+ 17 ECMAScript Standard Built-in Objects
+
+includes: [propertyHelper.js]
+---*/
+
+assert.sameValue(
+ typeof Set.prototype.has,
+ "function",
+ "`typeof Set.prototype.has` is `'function'`"
+);
+
+verifyNotEnumerable(Set.prototype, "has");
+verifyWritable(Set.prototype, "has");
+verifyConfigurable(Set.prototype, "has");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/has/length.js b/js/src/tests/test262/built-ins/Set/prototype/has/length.js
new file mode 100644
index 0000000000..93326a3565
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/has/length.js
@@ -0,0 +1,19 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.has
+description: >
+ Set.prototype.has ( value )
+
+ 17 ECMAScript Standard Built-in Objects
+
+includes: [propertyHelper.js]
+---*/
+
+assert.sameValue(Set.prototype.has.length, 1, "The value of `Set.prototype.has.length` is `1`");
+
+verifyNotEnumerable(Set.prototype.has, "length");
+verifyNotWritable(Set.prototype.has, "length");
+verifyConfigurable(Set.prototype.has, "length");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/has/name.js b/js/src/tests/test262/built-ins/Set/prototype/has/name.js
new file mode 100644
index 0000000000..c95b4ff0b5
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/has/name.js
@@ -0,0 +1,19 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.has
+description: >
+ Set.prototype.has ( value )
+
+ 17 ECMAScript Standard Built-in Objects
+
+includes: [propertyHelper.js]
+---*/
+
+assert.sameValue(Set.prototype.has.name, "has", "The value of `Set.prototype.has.name` is `'has'`");
+
+verifyNotEnumerable(Set.prototype.has, "name");
+verifyNotWritable(Set.prototype.has, "name");
+verifyConfigurable(Set.prototype.has, "name");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/has/not-a-constructor.js b/js/src/tests/test262/built-ins/Set/prototype/has/not-a-constructor.js
new file mode 100644
index 0000000000..8f41ff0c1f
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/has/not-a-constructor.js
@@ -0,0 +1,31 @@
+// Copyright (C) 2020 Rick Waldron. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-ecmascript-standard-built-in-objects
+description: >
+ Set.prototype.has does not implement [[Construct]], is not new-able
+info: |
+ ECMAScript Function Objects
+
+ Built-in function objects that are not identified as constructors do not
+ implement the [[Construct]] internal method unless otherwise specified in
+ the description of a particular function.
+
+ sec-evaluatenew
+
+ ...
+ 7. If IsConstructor(constructor) is false, throw a TypeError exception.
+ ...
+includes: [isConstructor.js]
+features: [Reflect.construct, Set, arrow-function]
+---*/
+
+assert.sameValue(isConstructor(Set.prototype.has), false, 'isConstructor(Set.prototype.has) must return false');
+
+assert.throws(TypeError, () => {
+ let s = new Set([]); new s.has();
+}, '`let s = new Set([]); new s.has()` throws TypeError');
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/has/returns-false-when-undefined-added-deleted-not-present-undefined.js b/js/src/tests/test262/built-ins/Set/prototype/has/returns-false-when-undefined-added-deleted-not-present-undefined.js
new file mode 100644
index 0000000000..4391df70be
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/has/returns-false-when-undefined-added-deleted-not-present-undefined.js
@@ -0,0 +1,23 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.has
+description: >
+ Set.prototype.has ( value )
+
+ ...
+ 6. Return false.
+
+---*/
+
+var s = new Set();
+
+s.add(undefined);
+assert.sameValue(s.has(undefined), true, "`s.has(undefined)` returns `true`");
+
+var result = s.delete(undefined);
+
+assert.sameValue(s.has(undefined), false, "`s.has(undefined)` returns `false`");
+assert.sameValue(result, true, "The result of `s.delete(undefined)` is `true`");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/has/returns-false-when-value-not-present-boolean.js b/js/src/tests/test262/built-ins/Set/prototype/has/returns-false-when-value-not-present-boolean.js
new file mode 100644
index 0000000000..366a694050
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/has/returns-false-when-value-not-present-boolean.js
@@ -0,0 +1,17 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.has
+description: >
+ Set.prototype.has ( value )
+
+ ...
+ 6. Return false.
+
+---*/
+
+var s = new Set();
+
+assert.sameValue(s.has(false), false, "`s.has(false)` returns `false`");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/has/returns-false-when-value-not-present-nan.js b/js/src/tests/test262/built-ins/Set/prototype/has/returns-false-when-value-not-present-nan.js
new file mode 100644
index 0000000000..7ce69a5c8b
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/has/returns-false-when-value-not-present-nan.js
@@ -0,0 +1,17 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.has
+description: >
+ Set.prototype.has ( value )
+
+ ...
+ 6. Return false.
+
+---*/
+
+var s = new Set();
+
+assert.sameValue(s.has(NaN), false, "`s.has(NaN)` returns `false`");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/has/returns-false-when-value-not-present-null.js b/js/src/tests/test262/built-ins/Set/prototype/has/returns-false-when-value-not-present-null.js
new file mode 100644
index 0000000000..ddfada5bf3
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/has/returns-false-when-value-not-present-null.js
@@ -0,0 +1,17 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.has
+description: >
+ Set.prototype.has ( value )
+
+ ...
+ 6. Return false.
+
+---*/
+
+var s = new Set();
+
+assert.sameValue(s.has(null), false, "`s.has(null)` returns `false`");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/has/returns-false-when-value-not-present-number.js b/js/src/tests/test262/built-ins/Set/prototype/has/returns-false-when-value-not-present-number.js
new file mode 100644
index 0000000000..9075d36884
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/has/returns-false-when-value-not-present-number.js
@@ -0,0 +1,17 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.has
+description: >
+ Set.prototype.has ( value )
+
+ ...
+ 6. Return false.
+
+---*/
+
+var s = new Set();
+
+assert.sameValue(s.has(0), false, "`s.has(0)` returns `false`");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/has/returns-false-when-value-not-present-string.js b/js/src/tests/test262/built-ins/Set/prototype/has/returns-false-when-value-not-present-string.js
new file mode 100644
index 0000000000..f244b2ee87
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/has/returns-false-when-value-not-present-string.js
@@ -0,0 +1,17 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.has
+description: >
+ Set.prototype.has ( value )
+
+ ...
+ 6. Return false.
+
+---*/
+
+var s = new Set();
+
+assert.sameValue(s.has(""), false, "`s.has('')` returns `false`");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/has/returns-false-when-value-not-present-symbol.js b/js/src/tests/test262/built-ins/Set/prototype/has/returns-false-when-value-not-present-symbol.js
new file mode 100644
index 0000000000..8f974f799c
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/has/returns-false-when-value-not-present-symbol.js
@@ -0,0 +1,18 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.has
+description: >
+ Set.prototype.has ( value )
+
+ ...
+ 6. Return false.
+
+features: [Symbol]
+---*/
+
+var s = new Set();
+
+assert.sameValue(s.has(Symbol()), false, "`s.has(Symbol())` returns `false`");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/has/returns-false-when-value-not-present-undefined.js b/js/src/tests/test262/built-ins/Set/prototype/has/returns-false-when-value-not-present-undefined.js
new file mode 100644
index 0000000000..6863c7a53f
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/has/returns-false-when-value-not-present-undefined.js
@@ -0,0 +1,17 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.has
+description: >
+ Set.prototype.has ( value )
+
+ ...
+ 6. Return false.
+
+---*/
+
+var s = new Set();
+
+assert.sameValue(s.has(undefined), false, "`s.has(undefined)` returns `false`");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/has/returns-true-when-value-present-boolean.js b/js/src/tests/test262/built-ins/Set/prototype/has/returns-true-when-value-present-boolean.js
new file mode 100644
index 0000000000..4809af3dc6
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/has/returns-true-when-value-present-boolean.js
@@ -0,0 +1,21 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.has
+description: >
+ Set.prototype.has ( value )
+
+ ...
+ 5. Repeat for each e that is an element of entries,
+ a. If e is not empty and SameValueZero(e, value) is true, return true.
+ ...
+
+---*/
+
+var s = new Set();
+
+s.add(false)
+
+assert.sameValue(s.has(false), true, "`s.has(false)` returns `true`");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/has/returns-true-when-value-present-nan.js b/js/src/tests/test262/built-ins/Set/prototype/has/returns-true-when-value-present-nan.js
new file mode 100644
index 0000000000..dcc51d54e5
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/has/returns-true-when-value-present-nan.js
@@ -0,0 +1,21 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.has
+description: >
+ Set.prototype.has ( value )
+
+ ...
+ 5. Repeat for each e that is an element of entries,
+ a. If e is not empty and SameValueZero(e, value) is true, return true.
+ ...
+
+---*/
+
+var s = new Set();
+
+s.add(NaN)
+
+assert.sameValue(s.has(NaN), true, "`s.has(NaN)` returns `true`");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/has/returns-true-when-value-present-null.js b/js/src/tests/test262/built-ins/Set/prototype/has/returns-true-when-value-present-null.js
new file mode 100644
index 0000000000..7c90fcd66f
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/has/returns-true-when-value-present-null.js
@@ -0,0 +1,21 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.has
+description: >
+ Set.prototype.has ( value )
+
+ ...
+ 5. Repeat for each e that is an element of entries,
+ a. If e is not empty and SameValueZero(e, value) is true, return true.
+ ...
+
+---*/
+
+var s = new Set();
+
+s.add(null)
+
+assert.sameValue(s.has(null), true, "`s.has(null)` returns `true`");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/has/returns-true-when-value-present-number.js b/js/src/tests/test262/built-ins/Set/prototype/has/returns-true-when-value-present-number.js
new file mode 100644
index 0000000000..1831aaa35f
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/has/returns-true-when-value-present-number.js
@@ -0,0 +1,21 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.has
+description: >
+ Set.prototype.has ( value )
+
+ ...
+ 5. Repeat for each e that is an element of entries,
+ a. If e is not empty and SameValueZero(e, value) is true, return true.
+ ...
+
+---*/
+
+var s = new Set();
+
+s.add(0)
+
+assert.sameValue(s.has(0), true, "`s.has(0)` returns `true`");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/has/returns-true-when-value-present-string.js b/js/src/tests/test262/built-ins/Set/prototype/has/returns-true-when-value-present-string.js
new file mode 100644
index 0000000000..938bcae841
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/has/returns-true-when-value-present-string.js
@@ -0,0 +1,21 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.has
+description: >
+ Set.prototype.has ( value )
+
+ ...
+ 5. Repeat for each e that is an element of entries,
+ a. If e is not empty and SameValueZero(e, value) is true, return true.
+ ...
+
+---*/
+
+var s = new Set();
+
+s.add("")
+
+assert.sameValue(s.has(""), true, "`s.has('')` returns `true`");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/has/returns-true-when-value-present-symbol.js b/js/src/tests/test262/built-ins/Set/prototype/has/returns-true-when-value-present-symbol.js
new file mode 100644
index 0000000000..f8c5b80400
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/has/returns-true-when-value-present-symbol.js
@@ -0,0 +1,23 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.has
+description: >
+ Set.prototype.has ( value )
+
+ ...
+ 5. Repeat for each e that is an element of entries,
+ a. If e is not empty and SameValueZero(e, value) is true, return true.
+ ...
+
+features: [Symbol]
+---*/
+
+var s = new Set();
+var a = Symbol();
+
+s.add(a)
+
+assert.sameValue(s.has(a), true, "`s.has(a)` returns `true`");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/has/returns-true-when-value-present-undefined.js b/js/src/tests/test262/built-ins/Set/prototype/has/returns-true-when-value-present-undefined.js
new file mode 100644
index 0000000000..0f14f5c490
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/has/returns-true-when-value-present-undefined.js
@@ -0,0 +1,21 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.has
+description: >
+ Set.prototype.has ( value )
+
+ ...
+ 5. Repeat for each e that is an element of entries,
+ a. If e is not empty and SameValueZero(e, value) is true, return true.
+ ...
+
+---*/
+
+var s = new Set();
+
+s.add(undefined)
+
+assert.sameValue(s.has(undefined), true, "`s.has(undefined)` returns `true`");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/has/shell.js b/js/src/tests/test262/built-ins/Set/prototype/has/shell.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/has/shell.js
diff --git a/js/src/tests/test262/built-ins/Set/prototype/has/this-not-object-throw-boolean.js b/js/src/tests/test262/built-ins/Set/prototype/has/this-not-object-throw-boolean.js
new file mode 100644
index 0000000000..c954fa9572
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/has/this-not-object-throw-boolean.js
@@ -0,0 +1,22 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.has
+description: >
+ Set.prototype.has ( value )
+
+ 1. Let S be the this value.
+ 2. If Type(S) is not Object, throw a TypeError exception.
+
+---*/
+
+assert.throws(TypeError, function() {
+ Set.prototype.has.call(false, 1);
+});
+
+assert.throws(TypeError, function() {
+ var s = new Set();
+ s.has.call(false, 1);
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/has/this-not-object-throw-null.js b/js/src/tests/test262/built-ins/Set/prototype/has/this-not-object-throw-null.js
new file mode 100644
index 0000000000..150cb8fb83
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/has/this-not-object-throw-null.js
@@ -0,0 +1,22 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.has
+description: >
+ Set.prototype.has ( value )
+
+ 1. Let S be the this value.
+ 2. If Type(S) is not Object, throw a TypeError exception.
+
+---*/
+
+assert.throws(TypeError, function() {
+ Set.prototype.has.call(null, 1);
+});
+
+assert.throws(TypeError, function() {
+ var s = new Set();
+ s.has.call(null, 1);
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/has/this-not-object-throw-number.js b/js/src/tests/test262/built-ins/Set/prototype/has/this-not-object-throw-number.js
new file mode 100644
index 0000000000..067c2918bd
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/has/this-not-object-throw-number.js
@@ -0,0 +1,22 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.has
+description: >
+ Set.prototype.has ( value )
+
+ 1. Let S be the this value.
+ 2. If Type(S) is not Object, throw a TypeError exception.
+
+---*/
+
+assert.throws(TypeError, function() {
+ Set.prototype.has.call(0, 1);
+});
+
+assert.throws(TypeError, function() {
+ var s = new Set();
+ s.has.call(0, 1);
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/has/this-not-object-throw-string.js b/js/src/tests/test262/built-ins/Set/prototype/has/this-not-object-throw-string.js
new file mode 100644
index 0000000000..e8f4b2ec5b
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/has/this-not-object-throw-string.js
@@ -0,0 +1,22 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.has
+description: >
+ Set.prototype.has ( value )
+
+ 1. Let S be the this value.
+ 2. If Type(S) is not Object, throw a TypeError exception.
+
+---*/
+
+assert.throws(TypeError, function() {
+ Set.prototype.has.call("", 1);
+});
+
+assert.throws(TypeError, function() {
+ var s = new Set();
+ s.has.call("", 1);
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/has/this-not-object-throw-symbol.js b/js/src/tests/test262/built-ins/Set/prototype/has/this-not-object-throw-symbol.js
new file mode 100644
index 0000000000..8254cab357
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/has/this-not-object-throw-symbol.js
@@ -0,0 +1,23 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.has
+description: >
+ Set.prototype.has ( value )
+
+ 1. Let S be the this value.
+ 2. If Type(S) is not Object, throw a TypeError exception.
+
+features: [Symbol]
+---*/
+
+assert.throws(TypeError, function() {
+ Set.prototype.has.call(Symbol(), 1);
+});
+
+assert.throws(TypeError, function() {
+ var s = new Set();
+ s.has.call(Symbol(), 1);
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/has/this-not-object-throw-undefined.js b/js/src/tests/test262/built-ins/Set/prototype/has/this-not-object-throw-undefined.js
new file mode 100644
index 0000000000..bee6d27e3e
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/has/this-not-object-throw-undefined.js
@@ -0,0 +1,22 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.has
+description: >
+ Set.prototype.has ( value )
+
+ 1. Let S be the this value.
+ 2. If Type(S) is not Object, throw a TypeError exception.
+
+---*/
+
+assert.throws(TypeError, function() {
+ Set.prototype.has.call(undefined, 1);
+});
+
+assert.throws(TypeError, function() {
+ var s = new Set();
+ s.has.call(undefined, 1);
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/keys/browser.js b/js/src/tests/test262/built-ins/Set/prototype/keys/browser.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/keys/browser.js
diff --git a/js/src/tests/test262/built-ins/Set/prototype/keys/keys.js b/js/src/tests/test262/built-ins/Set/prototype/keys/keys.js
new file mode 100644
index 0000000000..0f4325be91
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/keys/keys.js
@@ -0,0 +1,17 @@
+// Copyright (C) 2014 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-set.prototype.keys
+description: >
+ The initial value of the keys property is the same function object as the
+ initial value of the values property.
+---*/
+
+assert.sameValue(
+ Set.prototype.keys,
+ Set.prototype.values,
+ "The value of `Set.prototype.keys` is `Set.prototype.values`"
+);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/keys/shell.js b/js/src/tests/test262/built-ins/Set/prototype/keys/shell.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/keys/shell.js
diff --git a/js/src/tests/test262/built-ins/Set/prototype/shell.js b/js/src/tests/test262/built-ins/Set/prototype/shell.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/shell.js
diff --git a/js/src/tests/test262/built-ins/Set/prototype/size/browser.js b/js/src/tests/test262/built-ins/Set/prototype/size/browser.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/size/browser.js
diff --git a/js/src/tests/test262/built-ins/Set/prototype/size/length.js b/js/src/tests/test262/built-ins/Set/prototype/size/length.js
new file mode 100644
index 0000000000..4b0b0675dd
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/size/length.js
@@ -0,0 +1,22 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-get-set.prototype.size
+description: >
+ get Set.prototype.size
+
+ 17 ECMAScript Standard Built-in Objects
+
+includes: [propertyHelper.js]
+---*/
+
+var descriptor = Object.getOwnPropertyDescriptor(Set.prototype, "size");
+
+
+assert.sameValue(descriptor.get.length, 0, "The value of `Set.prototype.size.length` is `0`");
+
+verifyNotEnumerable(descriptor.get, "length");
+verifyNotWritable(descriptor.get, "length");
+verifyConfigurable(descriptor.get, "length");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/size/name.js b/js/src/tests/test262/built-ins/Set/prototype/size/name.js
new file mode 100644
index 0000000000..79723d8f0e
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/size/name.js
@@ -0,0 +1,25 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-get-set.prototype.size
+description: >
+ get Set.prototype.size
+
+ 17 ECMAScript Standard Built-in Objects
+
+ Functions that are specified as get or set accessor functions of built-in
+ properties have "get " or "set " prepended to the property name string.
+
+includes: [propertyHelper.js]
+---*/
+
+var descriptor = Object.getOwnPropertyDescriptor(Set.prototype, "size");
+
+
+assert.sameValue(descriptor.get.name, "get size", "The value of `descriptor.get.name` is `'get size'`");
+
+verifyNotEnumerable(descriptor.get, "name");
+verifyNotWritable(descriptor.get, "name");
+verifyConfigurable(descriptor.get, "name");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/size/returns-count-of-present-values-before-after-add-delete.js b/js/src/tests/test262/built-ins/Set/prototype/size/returns-count-of-present-values-before-after-add-delete.js
new file mode 100644
index 0000000000..6a6c083bae
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/size/returns-count-of-present-values-before-after-add-delete.js
@@ -0,0 +1,27 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-get-set.prototype.size
+description: >
+ get Set.prototype.size
+
+ 5. Let count be 0.
+ 6. For each e that is an element of entries
+ a. If e is not empty, set count to count+1.
+
+ Before and after add(), delete()
+---*/
+
+var s = new Set();
+
+assert.sameValue(s.size, 0, "The value of `s.size` is `0`");
+
+s.add(0);
+
+assert.sameValue(s.size, 1, "The value of `s.size` is `1`, after executing `s.add(0)`");
+
+s.delete(0);
+
+assert.sameValue(s.size, 0, "The value of `s.size` is `0`, after executing `s.delete(0)`");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/size/returns-count-of-present-values-by-insertion.js b/js/src/tests/test262/built-ins/Set/prototype/size/returns-count-of-present-values-by-insertion.js
new file mode 100644
index 0000000000..b1ea12fc5f
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/size/returns-count-of-present-values-by-insertion.js
@@ -0,0 +1,27 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-get-set.prototype.size
+description: >
+ get Set.prototype.size
+
+ 5. Let count be 0.
+ 6. For each e that is an element of entries
+ a. If e is not empty, set count to count+1.
+
+features: [Symbol]
+---*/
+
+var s = new Set();
+
+s.add(0);
+s.add(undefined);
+s.add(false);
+s.add(NaN);
+s.add(null);
+s.add("");
+s.add(Symbol());
+
+assert.sameValue(s.size, 7, "The value of `s.size` is `7`");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/size/returns-count-of-present-values-by-iterable.js b/js/src/tests/test262/built-ins/Set/prototype/size/returns-count-of-present-values-by-iterable.js
new file mode 100644
index 0000000000..9ef5423a70
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/size/returns-count-of-present-values-by-iterable.js
@@ -0,0 +1,19 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-get-set.prototype.size
+description: >
+ get Set.prototype.size
+
+ 5. Let count be 0.
+ 6. For each e that is an element of entries
+ a. If e is not empty, set count to count+1.
+
+features: [Symbol]
+---*/
+
+var s = new Set([0, undefined, false, NaN, null, "", Symbol()]);
+
+assert.sameValue(s.size, 7, "The value of `s.size` is `7`");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/size/shell.js b/js/src/tests/test262/built-ins/Set/prototype/size/shell.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/size/shell.js
diff --git a/js/src/tests/test262/built-ins/Set/prototype/size/size.js b/js/src/tests/test262/built-ins/Set/prototype/size/size.js
new file mode 100644
index 0000000000..18b0566e2c
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/size/size.js
@@ -0,0 +1,29 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-get-set.prototype.size
+description: >
+ get Set.prototype.size
+
+ 17 ECMAScript Standard Built-in Objects
+
+includes: [propertyHelper.js]
+---*/
+
+var descriptor = Object.getOwnPropertyDescriptor(Set.prototype, "size");
+
+assert.sameValue(
+ typeof descriptor.get,
+ "function",
+ "`typeof descriptor.get` is `'function'`"
+);
+assert.sameValue(
+ typeof descriptor.set,
+ "undefined",
+ "`typeof descriptor.set` is `\"undefined\"`"
+);
+
+verifyNotEnumerable(Set.prototype, "size");
+verifyConfigurable(Set.prototype, "size");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/values/browser.js b/js/src/tests/test262/built-ins/Set/prototype/values/browser.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/values/browser.js
diff --git a/js/src/tests/test262/built-ins/Set/prototype/values/does-not-have-setdata-internal-slot-array.js b/js/src/tests/test262/built-ins/Set/prototype/values/does-not-have-setdata-internal-slot-array.js
new file mode 100644
index 0000000000..8c09871a1a
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/values/does-not-have-setdata-internal-slot-array.js
@@ -0,0 +1,29 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.values
+description: >
+ Set.prototype.values ( )
+
+ ...
+ 2. Return CreateSetIterator(S, "value").
+
+
+ 23.2.5.1 CreateSetIterator Abstract Operation
+
+ ...
+ 2. If S does not have a [[SetData]] internal slot, throw a TypeError exception.
+ ...
+
+---*/
+
+assert.throws(TypeError, function() {
+ Set.prototype.values.call([]);
+});
+
+assert.throws(TypeError, function() {
+ var s = new Set();
+ s.values.call([]);
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/values/does-not-have-setdata-internal-slot-map.js b/js/src/tests/test262/built-ins/Set/prototype/values/does-not-have-setdata-internal-slot-map.js
new file mode 100644
index 0000000000..ba9452f718
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/values/does-not-have-setdata-internal-slot-map.js
@@ -0,0 +1,28 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.values
+description: >
+ Set.prototype.values ( )
+
+ ...
+ 2. Return CreateSetIterator(S, "value").
+
+
+ 23.2.5.1 CreateSetIterator Abstract Operation
+
+ ...
+ 2. If S does not have a [[SetData]] internal slot, throw a TypeError exception.
+ ...
+---*/
+
+assert.throws(TypeError, function() {
+ Set.prototype.values.call(new Map());
+});
+
+assert.throws(TypeError, function() {
+ var s = new Set();
+ s.values.call(new Map());
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/values/does-not-have-setdata-internal-slot-object.js b/js/src/tests/test262/built-ins/Set/prototype/values/does-not-have-setdata-internal-slot-object.js
new file mode 100644
index 0000000000..8c96537bd7
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/values/does-not-have-setdata-internal-slot-object.js
@@ -0,0 +1,28 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.values
+description: >
+ Set.prototype.values ( )
+
+ ...
+ 2. Return CreateSetIterator(S, "value").
+
+
+ 23.2.5.1 CreateSetIterator Abstract Operation
+
+ ...
+ 2. If S does not have a [[SetData]] internal slot, throw a TypeError exception.
+ ...
+---*/
+
+assert.throws(TypeError, function() {
+ Set.prototype.values.call({});
+});
+
+assert.throws(TypeError, function() {
+ var s = new Set();
+ s.values.call({});
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/values/does-not-have-setdata-internal-slot-set-prototype.js b/js/src/tests/test262/built-ins/Set/prototype/values/does-not-have-setdata-internal-slot-set-prototype.js
new file mode 100644
index 0000000000..6d9fcceecb
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/values/does-not-have-setdata-internal-slot-set-prototype.js
@@ -0,0 +1,28 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.values
+description: >
+ Set.prototype.values ( )
+
+ ...
+ 2. Return CreateSetIterator(S, "value").
+
+
+ 23.2.5.1 CreateSetIterator Abstract Operation
+
+ ...
+ 2. If S does not have a [[SetData]] internal slot, throw a TypeError exception.
+ ...
+---*/
+
+assert.throws(TypeError, function() {
+ Set.prototype.values.call(Set.prototype);
+});
+
+assert.throws(TypeError, function() {
+ var s = new Set();
+ s.values.call(Set.prototype);
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/values/does-not-have-setdata-internal-slot-weakset.js b/js/src/tests/test262/built-ins/Set/prototype/values/does-not-have-setdata-internal-slot-weakset.js
new file mode 100644
index 0000000000..24a79a9138
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/values/does-not-have-setdata-internal-slot-weakset.js
@@ -0,0 +1,29 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.values
+description: >
+ Set.prototype.values ( )
+
+ ...
+ 2. Return CreateSetIterator(S, "value").
+
+
+ 23.2.5.1 CreateSetIterator Abstract Operation
+
+ ...
+ 2. If S does not have a [[SetData]] internal slot, throw a TypeError exception.
+ ...
+features: [WeakSet]
+---*/
+
+assert.throws(TypeError, function() {
+ Set.prototype.values.call(new WeakSet());
+});
+
+assert.throws(TypeError, function() {
+ var s = new Set();
+ s.values.call(new WeakSet());
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/values/length.js b/js/src/tests/test262/built-ins/Set/prototype/values/length.js
new file mode 100644
index 0000000000..8e49d1bc51
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/values/length.js
@@ -0,0 +1,19 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.values
+description: >
+ Set.prototype.values ( )
+
+ 17 ECMAScript Standard Built-in Objects
+
+includes: [propertyHelper.js]
+---*/
+
+assert.sameValue(Set.prototype.values.length, 0, "The value of `Set.prototype.values.length` is `0`");
+
+verifyNotEnumerable(Set.prototype.values, "length");
+verifyNotWritable(Set.prototype.values, "length");
+verifyConfigurable(Set.prototype.values, "length");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/values/name.js b/js/src/tests/test262/built-ins/Set/prototype/values/name.js
new file mode 100644
index 0000000000..a2458e9505
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/values/name.js
@@ -0,0 +1,19 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.values
+description: >
+ Set.prototype.values ( )
+
+ 17 ECMAScript Standard Built-in Objects
+
+includes: [propertyHelper.js]
+---*/
+
+assert.sameValue(Set.prototype.values.name, "values", "The value of `Set.prototype.values.name` is `'values'`");
+
+verifyNotEnumerable(Set.prototype.values, "name");
+verifyNotWritable(Set.prototype.values, "name");
+verifyConfigurable(Set.prototype.values, "name");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/values/not-a-constructor.js b/js/src/tests/test262/built-ins/Set/prototype/values/not-a-constructor.js
new file mode 100644
index 0000000000..f21399ca9f
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/values/not-a-constructor.js
@@ -0,0 +1,31 @@
+// Copyright (C) 2020 Rick Waldron. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-ecmascript-standard-built-in-objects
+description: >
+ Set.prototype.values does not implement [[Construct]], is not new-able
+info: |
+ ECMAScript Function Objects
+
+ Built-in function objects that are not identified as constructors do not
+ implement the [[Construct]] internal method unless otherwise specified in
+ the description of a particular function.
+
+ sec-evaluatenew
+
+ ...
+ 7. If IsConstructor(constructor) is false, throw a TypeError exception.
+ ...
+includes: [isConstructor.js]
+features: [Reflect.construct, Set, arrow-function]
+---*/
+
+assert.sameValue(isConstructor(Set.prototype.values), false, 'isConstructor(Set.prototype.values) must return false');
+
+assert.throws(TypeError, () => {
+ let s = new Set([]); new s.values();
+}, '`let s = new Set([]); new s.values()` throws TypeError');
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/values/returns-iterator-empty.js b/js/src/tests/test262/built-ins/Set/prototype/values/returns-iterator-empty.js
new file mode 100644
index 0000000000..92c4dff059
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/values/returns-iterator-empty.js
@@ -0,0 +1,16 @@
+// Copyright (C) 2014 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-set.prototype.values
+description: >
+ Returns an iterator that's already done if Set is empty.
+---*/
+
+var set = new Set();
+var iterator = set.values();
+var result = iterator.next();
+assert.sameValue(result.value, undefined, "The value of `result.value` is `undefined`");
+assert.sameValue(result.done, true, "The value of `result.done` is `true`");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/values/returns-iterator.js b/js/src/tests/test262/built-ins/Set/prototype/values/returns-iterator.js
new file mode 100644
index 0000000000..319cbbddbe
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/values/returns-iterator.js
@@ -0,0 +1,43 @@
+// Copyright (C) 2014 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-set.prototype.values
+description: >
+ The method should return a valid iterator with the context as the
+ IteratedObject.
+---*/
+
+var set = new Set();
+set.add(1);
+set.add(2);
+set.add(3);
+
+var iterator = set.values();
+var result;
+
+result = iterator.next();
+assert.sameValue(result.value, 1, 'First result `value`');
+assert.sameValue(result.done, false, 'First result `done` flag');
+
+result = iterator.next();
+assert.sameValue(result.value, 2, 'Second result `value`');
+assert.sameValue(result.done, false, 'Second result `done` flag');
+
+result = iterator.next();
+assert.sameValue(result.value, 3, 'Third result `value`');
+assert.sameValue(result.done, false, 'Third result `done` flag');
+
+result = iterator.next();
+assert.sameValue(result.value, undefined, 'Exhausted result `value`');
+assert.sameValue(result.done, true, 'Exhausted result `done` flag');
+
+result = iterator.next();
+assert.sameValue(
+ result.value, undefined, 'Exhausted result `value` (repeated request)'
+);
+assert.sameValue(
+ result.done, true, 'Exhausted result `done` flag (repeated request)'
+);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/values/shell.js b/js/src/tests/test262/built-ins/Set/prototype/values/shell.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/values/shell.js
diff --git a/js/src/tests/test262/built-ins/Set/prototype/values/this-not-object-throw-boolean.js b/js/src/tests/test262/built-ins/Set/prototype/values/this-not-object-throw-boolean.js
new file mode 100644
index 0000000000..83828a339d
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/values/this-not-object-throw-boolean.js
@@ -0,0 +1,28 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.values
+description: >
+ Set.prototype.values ( )
+
+ ...
+ 2. Return CreateSetIterator(S, "value").
+
+
+ 23.2.5.1 CreateSetIterator Abstract Operation
+
+ 1. If Type(set) is not Object, throw a TypeError exception.
+ ...
+
+---*/
+
+assert.throws(TypeError, function() {
+ Set.prototype.values.call(false);
+});
+
+assert.throws(TypeError, function() {
+ var s = new Set();
+ s.values.call(false);
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/values/this-not-object-throw-null.js b/js/src/tests/test262/built-ins/Set/prototype/values/this-not-object-throw-null.js
new file mode 100644
index 0000000000..253f10a31d
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/values/this-not-object-throw-null.js
@@ -0,0 +1,27 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.values
+description: >
+ Set.prototype.values ( )
+
+ ...
+ 2. Return CreateSetIterator(S, "value").
+
+
+ 23.2.5.1 CreateSetIterator Abstract Operation
+
+ 1. If Type(set) is not Object, throw a TypeError exception.
+ ...
+---*/
+
+assert.throws(TypeError, function() {
+ Set.prototype.values.call(null);
+});
+
+assert.throws(TypeError, function() {
+ var s = new Set();
+ s.values.call(null);
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/values/this-not-object-throw-number.js b/js/src/tests/test262/built-ins/Set/prototype/values/this-not-object-throw-number.js
new file mode 100644
index 0000000000..1c8319a523
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/values/this-not-object-throw-number.js
@@ -0,0 +1,27 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.values
+description: >
+ Set.prototype.values ( )
+
+ ...
+ 2. Return CreateSetIterator(S, "value").
+
+
+ 23.2.5.1 CreateSetIterator Abstract Operation
+
+ 1. If Type(set) is not Object, throw a TypeError exception.
+ ...
+---*/
+
+assert.throws(TypeError, function() {
+ Set.prototype.values.call(0);
+});
+
+assert.throws(TypeError, function() {
+ var s = new Set();
+ s.values.call(0);
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/values/this-not-object-throw-string.js b/js/src/tests/test262/built-ins/Set/prototype/values/this-not-object-throw-string.js
new file mode 100644
index 0000000000..e6e81fdba2
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/values/this-not-object-throw-string.js
@@ -0,0 +1,27 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.values
+description: >
+ Set.prototype.values ( )
+
+ ...
+ 2. Return CreateSetIterator(S, "value").
+
+
+ 23.2.5.1 CreateSetIterator Abstract Operation
+
+ 1. If Type(set) is not Object, throw a TypeError exception.
+ ...
+---*/
+
+assert.throws(TypeError, function() {
+ Set.prototype.values.call("");
+});
+
+assert.throws(TypeError, function() {
+ var s = new Set();
+ s.values.call("");
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/values/this-not-object-throw-symbol.js b/js/src/tests/test262/built-ins/Set/prototype/values/this-not-object-throw-symbol.js
new file mode 100644
index 0000000000..bd88d0fabf
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/values/this-not-object-throw-symbol.js
@@ -0,0 +1,28 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.values
+description: >
+ Set.prototype.values ( )
+
+ ...
+ 2. Return CreateSetIterator(S, "value").
+
+
+ 23.2.5.1 CreateSetIterator Abstract Operation
+
+ 1. If Type(set) is not Object, throw a TypeError exception.
+ ...
+features: [Symbol]
+---*/
+
+assert.throws(TypeError, function() {
+ Set.prototype.values.call(Symbol());
+});
+
+assert.throws(TypeError, function() {
+ var s = new Set();
+ s.values.call(Symbol());
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/values/this-not-object-throw-undefined.js b/js/src/tests/test262/built-ins/Set/prototype/values/this-not-object-throw-undefined.js
new file mode 100644
index 0000000000..14c2ec0a0e
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/values/this-not-object-throw-undefined.js
@@ -0,0 +1,27 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.values
+description: >
+ Set.prototype.values ( )
+
+ ...
+ 2. Return CreateSetIterator(S, "value").
+
+
+ 23.2.5.1 CreateSetIterator Abstract Operation
+
+ 1. If Type(set) is not Object, throw a TypeError exception.
+ ...
+---*/
+
+assert.throws(TypeError, function() {
+ Set.prototype.values.call(undefined);
+});
+
+assert.throws(TypeError, function() {
+ var s = new Set();
+ s.values.call(undefined);
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/values/values-iteration-mutable.js b/js/src/tests/test262/built-ins/Set/prototype/values/values-iteration-mutable.js
new file mode 100644
index 0000000000..c0ba8093c5
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/values/values-iteration-mutable.js
@@ -0,0 +1,48 @@
+// Copyright (C) 2014 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-set.prototype.values
+description: >
+ When an item is added to the set after the iterator is created but before
+ the iterator is "done" (as defined by 23.2.5.2.1), the new item should be
+ accessible via iteration. When an item is added to the set after the
+ iterator is "done", the new item should not be accessible via iteration.
+---*/
+
+var set = new Set();
+set.add(1);
+set.add(2);
+
+var iterator = set.values();
+var result;
+
+result = iterator.next();
+assert.sameValue(result.value, 1, 'First result `value`');
+assert.sameValue(result.done, false, 'First result `done` flag');
+
+set.add(3);
+
+result = iterator.next();
+assert.sameValue(result.value, 2, 'Second result `value`');
+assert.sameValue(result.done, false, 'Second result `done` flag');
+
+result = iterator.next();
+assert.sameValue(result.value, 3, 'Third result `value`');
+assert.sameValue(result.done, false, 'Third result `done` flag');
+
+result = iterator.next();
+assert.sameValue(result.value, undefined, 'Exhausted result `value`');
+assert.sameValue(result.done, true, 'Exhausted result `done` flag');
+
+set.add(4);
+
+result = iterator.next();
+assert.sameValue(
+ result.value, undefined, 'Exhausted result `value` (repeated request)'
+);
+assert.sameValue(
+ result.done, true, 'Exhausted result `done` flag (repeated request)'
+);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Set/prototype/values/values.js b/js/src/tests/test262/built-ins/Set/prototype/values/values.js
new file mode 100644
index 0000000000..4a02e37d00
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Set/prototype/values/values.js
@@ -0,0 +1,23 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-set.prototype.values
+description: >
+ Set.prototype.values ( )
+
+ 17 ECMAScript Standard Built-in Objects
+
+includes: [propertyHelper.js]
+---*/
+
+assert.sameValue(
+ typeof Set.prototype.values,
+ "function",
+ "`typeof Set.prototype.values` is `'function'`"
+);
+
+verifyNotEnumerable(Set.prototype, "values");
+verifyWritable(Set.prototype, "values");
+verifyConfigurable(Set.prototype, "values");
+
+reportCompare(0, 0);