Debian Codegraph @

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