Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/RegExp/S15.10.1_A1_T13.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_T13
7 description: Tested RegExp is "x{1}{1,}"
8 ---*/
9
10 //CHECK#1
11 try {
12 $ERROR('#1.1: new RegExp("x{1}{1,}") throw SyntaxError. Actual: ' + (new RegExp("x{1}{1,}")));
13 } catch (e) {
14 if ((e instanceof SyntaxError) !== true) {
15 $ERROR('#1.2: new RegExp("x{1}{1,}") throw SyntaxError. Actual: ' + (e));
16 }
17 }