summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/annexB/built-ins/unescape/to-string-err.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/tests/test262/annexB/built-ins/unescape/to-string-err.js')
-rw-r--r--js/src/tests/test262/annexB/built-ins/unescape/to-string-err.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/js/src/tests/test262/annexB/built-ins/unescape/to-string-err.js b/js/src/tests/test262/annexB/built-ins/unescape/to-string-err.js
new file mode 100644
index 0000000000..6bb51700c9
--- /dev/null
+++ b/js/src/tests/test262/annexB/built-ins/unescape/to-string-err.js
@@ -0,0 +1,21 @@
+// Copyright (C) 2016 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-unescape-string
+es6id: B.2.1.2
+description: Abrupt completion from `ToString` operation
+info: |
+ 1. Let string be ? ToString(string).
+---*/
+
+var obj = {
+ toString: function() {
+ throw new Test262Error();
+ }
+};
+
+assert.throws(Test262Error, function() {
+ unescape(obj);
+});
+
+reportCompare(0, 0);