Bug 1892041 - Part 2: Update test262. r=spidermonkey-reviewers,dminor
[gecko.git] / js / src / tests / test262 / built-ins / RegExp / S15.10.1_A1_T3.js
bloba4d8955adb96113e329738895aa65fb2b33e6091
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: RegExp syntax errors must be caught when matcher(s) compiles
6 es5id: 15.10.1_A1_T3
7 description: Tested RegExp is "a++"
8 ---*/
10 try {
11     throw new Test262Error('#1.1: new RegExp("a++") throw SyntaxError. Actual: ' + (new RegExp("a++")));
12 } catch (e) {
13   assert.sameValue(
14     e instanceof SyntaxError,
15     true,
16     'The result of evaluating (e instanceof SyntaxError) is expected to be true'
17   );
20 // TODO: Convert to assert.throws() format.
22 reportCompare(0, 0);