| 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: let P be ToString(pattern) and let F be ToString(flags) |
| 6 |
es5id: 15.10.4.1_A8_T8 |
| 7 |
description: > |
| 8 |
Pattern is {toString:function(){throw "intostr";} } and flags is |
| 9 |
"error" |
| 10 |
---*/ |
| 11 |
|
| 12 |
//CHECK#1 |
| 13 |
try { |
| 14 |
$ERROR('#1.1: new RegExp({toString:function(){throw "intostr";}}, "error") throw "intostr". Actual: ' + (new RegExp({toString:function(){throw "intostr";}}, "error"))); |
| 15 |
} catch (e) { |
| 16 |
if (e !== "intostr" ) { |
| 17 |
$ERROR('#1.2: new RegExp({toString:function(){throw "intostr";}}, "error") throw "intostr". Actual: ' + (e)); |
| 18 |
} |
| 19 |
} |