summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/built-ins/Set/prototype/entries/returns-iterator-empty.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/tests/test262/built-ins/Set/prototype/entries/returns-iterator-empty.js')
-rw-r--r--js/src/tests/test262/built-ins/Set/prototype/entries/returns-iterator-empty.js27
1 files changed, 27 insertions, 0 deletions
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);