Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/RegExp/S15.10.7_A2_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: RegExp instance has no [[Construct]] internal method
6 es5id: 15.10.7_A2_T2
7 description: Checking if creating "new RegExp" instance fails
8 ---*/
9
10 //CHECK#1
11 try {
12 $ERROR('#1.1: new new RegExp throw TypeError. Actual: ' + (new new RegExp));
13 } catch (e) {
14 if ((e instanceof TypeError) !== true) {
15 $ERROR('#1.2: new new RegExp throw TypeError. Actual: ' + (e));
16 }
17 }