1 // Copyright 2009 the Sputnik authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
6 If pattern is an object R whose [[Class]] property is "RegExp" and flags is defined, then
7 call the RegExp constructor (15.10.4.1), passing it the pattern and flags arguments and return the object constructed by that constructor
10 Checking if using dafined variable "x = 1" as flags leads to
11 throwing the correct exception
17 throw new Test262Error('#1.1: var x = 1; RegExp(/[a-b]?/, x) throw SyntaxError. Actual: ' + (RegExp(/[a-b]?/, x)));
20 e instanceof SyntaxError,
22 'The result of evaluating (e instanceof SyntaxError) is expected to be true'
26 // TODO: Convert to assert.throws() format.