Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/annexB/built-ins/escape/to-string-err.js

raw
1 // Copyright (C) 2016 the V8 project authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3 /*---
4 esid: sec-escape-string
5 es6id: B.2.1.1
6 description: Abrupt completion from `ToString` operation
7 info: |
8 1. Let string be ? ToString(string).
9 ---*/
10
11 var obj = {
12 toString: function() {
13 throw new Test262Error();
14 }
15 };
16
17 assert.throws(Test262Error, function() {
18 escape(obj);
19 });