Bug 1892041 - Part 2: Update test262. r=spidermonkey-reviewers,dminor
[gecko.git] / js / src / tests / test262 / built-ins / RegExp / S15.10.4.1_A9_T3.js
blob847ae1ab1bb5c677ebf690679e56cbf4c8ce0c5b
1 // Copyright 2009 the Sputnik authors.  All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
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 ---*/
12 try {
13     throw new Test262Error('#1.1: new RegExp("[a--z]") throw SyntaxError. Actual: ' + (new RegExp("[a--z]")));
14 } catch (e) {
15   assert.sameValue(
16     e instanceof SyntaxError,
17     true,
18     'The result of evaluating (e instanceof SyntaxError) is expected to be true'
19   );
22 // TODO: Convert to assert.throws() format.
24 reportCompare(0, 0);