Debian Codegraph @

js/src/tests/test262/built-ins/String/S15.5.5_A1_T2.js

raw
1 // Copyright 2009 the Sputnik authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3
4 /*---
5 info: String instance has not [[call]] property
6 es5id: 15.5.5_A1_T2
7 description: Checking if creating new "String("a|b")()" fails
8 ---*/
9
10 //////////////////////////////////////////////////////////////////////////////
11 //CHECK#1
12 try {
13 String("a|b")();
14 throw new Test262Error('#1: String("a|b")() lead to throwing exception');
15 } catch (e) {
16 if (!(e instanceof TypeError)) {
17 throw new Test262Error('#1.1: Exception is instance of TypeError. Actual: exception is ' + e);
18 }
19 }
20 //
21 //////////////////////////////////////////////////////////////////////////////
22
23 reportCompare(0, 0);