summaryrefslogtreecommitdiff
path: root/external/contributions/Google/sputnik_conformance_modified/15_Native/15.10_RegExp_Objects/15.10.4_The_RegExp_Constructor/S15.10.4.1_A8_T6.js
diff options
context:
space:
mode:
Diffstat (limited to 'external/contributions/Google/sputnik_conformance_modified/15_Native/15.10_RegExp_Objects/15.10.4_The_RegExp_Constructor/S15.10.4.1_A8_T6.js')
-rw-r--r--external/contributions/Google/sputnik_conformance_modified/15_Native/15.10_RegExp_Objects/15.10.4_The_RegExp_Constructor/S15.10.4.1_A8_T6.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/external/contributions/Google/sputnik_conformance_modified/15_Native/15.10_RegExp_Objects/15.10.4_The_RegExp_Constructor/S15.10.4.1_A8_T6.js b/external/contributions/Google/sputnik_conformance_modified/15_Native/15.10_RegExp_Objects/15.10.4_The_RegExp_Constructor/S15.10.4.1_A8_T6.js
new file mode 100644
index 000000000..183689f8d
--- /dev/null
+++ b/external/contributions/Google/sputnik_conformance_modified/15_Native/15.10_RegExp_Objects/15.10.4_The_RegExp_Constructor/S15.10.4.1_A8_T6.js
@@ -0,0 +1,19 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+* @name: S15.10.4.1_A8_T6;
+* @section: 15.10.4.1;
+* @assertion: let P be ToString(pattern) and let F be ToString(flags);
+* @description: Pattern is {toString:function(){throw "intostr";} } and flags is "i";
+*/
+
+//CHECK#1
+try {
+ $ERROR('#1.1: new RegExp({toString:function(){throw "intostr";}}, "i") throw "intostr". Actual: ' + (new RegExp({toString:function(){throw "intostr";}}, "i")));
+} catch (e) {
+ if (e !== "intostr" ) {
+ $ERROR('#1.2: new RegExp({toString:function(){throw "intostr";}}, "i") throw "intostr". Actual: ' + (e));
+ }
+}
+