Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/RegExp/S15.10.4.1_A9_T3.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: |
6 If P's characters do not have the form Pattern, then throw a SyntaxError
7 exception
8 es5id: 15.10.4.1_A9_T3
9 description: Pattern is "[a--z]"
10 ---*/
11
12 //CHECK#1
13 try {
14 $ERROR('#1.1: new RegExp("[a--z]") throw SyntaxError. Actual: ' + (new RegExp("[a--z]")));
15 } catch (e) {
16 if ((e instanceof SyntaxError) !== true) {
17 $ERROR('#1.2: new RegExp("[a--z]") throw SyntaxError. Actual: ' + (e));
18 }
19 }