Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/RegExp/S15.10.1_A1_T11.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 syntax errors must be caught when matcher(s) compiles
6 es5id: 15.10.1_A1_T11
7 description: Tested RegExp is "?a"
8 ---*/
9
10 //CHECK#1
11 try {
12 $ERROR('#1.1: new RegExp("?a") throw SyntaxError. Actual: ' + (new RegExp("?a")));
13 } catch (e) {
14 if ((e instanceof SyntaxError) !== true) {
15 $ERROR('#1.2: new RegExp("?a") throw SyntaxError. Actual: ' + (e));
16 }
17 }