js/src/tests/test262/ch11/11.8/11.8.6/S11.8.6_A5_T2.js

branch
TOR_BUG_3246
changeset 6
8bccb770b82d
equal deleted inserted replaced
-1:000000000000 0:9f7f63a99f70
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 * TypeError is subclass of Error from instanceof operator point of view
6 *
7 * @path ch11/11.8/11.8.6/S11.8.6_A5_T2.js
8 * @description Checking TypeError case
9 */
10
11 var __t__err = new TypeError;
12
13 //CHECK#1
14 if (!(__t__err instanceof Error)) {
15 $ERROR('#1: TypeError is subclass of Error from instanceof operator poit of view');
16 }
17
18 //CHECK#2
19 if (!(__t__err instanceof TypeError)) {
20 $ERROR('#2: TypeError is subclass of Error from instanceof operator poit of view');
21 }
22
23 //////////////////////////////////////////////////////////////////////////////
24 var err__t__ = TypeError('failed');
25
26 //CHECK#3
27 if (!(err__t__ instanceof Error)) {
28 $ERROR('#3: TypeError is subclass of Error from instanceof operator poit of view');
29 }
30
31 //CHECK#4
32 if (!(err__t__ instanceof TypeError)) {
33 $ERROR('#4: TypeError is subclass of Error from instanceof operator poit of view');
34 }
35
36

mercurial