summaryrefslogtreecommitdiff
path: root/external/contributions/Google/sputnik_conformance_modified/15_Native/15.10_RegExp_Objects/15.10.7_Properties_of_RegExp_Instances/15.10.7.1_source/S15.10.7.1_A8.js
diff options
context:
space:
mode:
Diffstat (limited to 'external/contributions/Google/sputnik_conformance_modified/15_Native/15.10_RegExp_Objects/15.10.7_Properties_of_RegExp_Instances/15.10.7.1_source/S15.10.7.1_A8.js')
-rw-r--r--external/contributions/Google/sputnik_conformance_modified/15_Native/15.10_RegExp_Objects/15.10.7_Properties_of_RegExp_Instances/15.10.7.1_source/S15.10.7.1_A8.js32
1 files changed, 32 insertions, 0 deletions
diff --git a/external/contributions/Google/sputnik_conformance_modified/15_Native/15.10_RegExp_Objects/15.10.7_Properties_of_RegExp_Instances/15.10.7.1_source/S15.10.7.1_A8.js b/external/contributions/Google/sputnik_conformance_modified/15_Native/15.10_RegExp_Objects/15.10.7_Properties_of_RegExp_Instances/15.10.7.1_source/S15.10.7.1_A8.js
new file mode 100644
index 000000000..65fec9790
--- /dev/null
+++ b/external/contributions/Google/sputnik_conformance_modified/15_Native/15.10_RegExp_Objects/15.10.7_Properties_of_RegExp_Instances/15.10.7.1_source/S15.10.7.1_A8.js
@@ -0,0 +1,32 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+* @name: S15.10.7.1_A8;
+* @section: 15.10.7.1;
+* @assertion: The RegExp instance source property has the attribute DontEnum;
+* @description: Checking if enumerating the source property of RegExp instance fails;
+*/
+
+__re = new RegExp("[1-2]","i");
+
+//CHECK#0
+if (__re.hasOwnProperty('source') !== true) {
+ $FAIL('#0: __re = new RegExp("[1-2]","i"); __re.hasOwnProperty(\'source\') === true');
+}
+
+ //CHECK#1
+if (__re.propertyIsEnumerable('source') !== false) {
+ $ERROR('#1: __re = new RegExp("[1-2]","i"); __re.propertyIsEnumerable(\'source\') === false');
+}
+
+ //CHECK#2
+count = 0
+for (p in __re){
+ if (p==="source") count++
+}
+
+if (count !== 0) {
+ $ERROR('#2: count = 0; __re = new RegExp("[1-2]","i"); for (p in __re){ if (p==="source") count++; } count === 0. Actual: ' + (count));
+}
+