Debian Codegraph @

js/src/tests/test262/built-ins/String/S15.5.5_A1_T1.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_T1
7 description: Create new String and try call it
8 ---*/
9
10 var __str = new String;
11
12 //////////////////////////////////////////////////////////////////////////////
13 //CHECK#1
14 try {
15 __str();
16 throw new Test262Error('#1: __str = new String; __str() lead to throwing exception');
17 } catch (e) {
18 if (!(e instanceof TypeError)) {
19 throw new Test262Error('#1.1: Exception is instance of TypeError. Actual: exception is ' + e);
20 }
21 }
22 //
23 //////////////////////////////////////////////////////////////////////////////
24
25 reportCompare(0, 0);