summaryrefslogtreecommitdiffstats
path: root/js/src/tests/non262/Tuple/from/iter-get-iter-err.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/tests/non262/Tuple/from/iter-get-iter-err.js')
-rw-r--r--js/src/tests/non262/Tuple/from/iter-get-iter-err.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/js/src/tests/non262/Tuple/from/iter-get-iter-err.js b/js/src/tests/non262/Tuple/from/iter-get-iter-err.js
new file mode 100644
index 0000000000..c868c549fd
--- /dev/null
+++ b/js/src/tests/non262/Tuple/from/iter-get-iter-err.js
@@ -0,0 +1,11 @@
+// |reftest| skip-if(!this.hasOwnProperty("Tuple"))
+var itemsPoisonedSymbolIterator = {};
+itemsPoisonedSymbolIterator[Symbol.iterator] = function() {
+ throw new RangeError();
+};
+
+assertThrowsInstanceOf(function() {
+ Tuple.from(itemsPoisonedSymbolIterator);
+}, RangeError, 'Tuple.from(itemsPoisonedSymbolIterator) throws');
+
+reportCompare(0, 0);