| 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 instance has no [[Construct]] internal method |
| 6 |
es5id: 15.10.7_A2_T1 |
| 7 |
description: Checking if creating new RegExp instance fails |
| 8 |
---*/ |
| 9 |
|
| 10 |
//CHECK#1 |
| 11 |
try { |
| 12 |
$ERROR('#1.1: new /z/() throw TypeError. Actual: ' + (new /z/())); |
| 13 |
} catch (e) { |
| 14 |
if ((e instanceof TypeError) !== true) { |
| 15 |
$ERROR('#1.2: new /z/() throw TypeError. Actual: ' + (e)); |
| 16 |
} |
| 17 |
} |