]> git.saurik.com Git - apple/javascriptcore.git/blobdiff - tests/stress/static-getter-in-names.js
JavaScriptCore-7601.1.46.3.tar.gz
[apple/javascriptcore.git] / tests / stress / static-getter-in-names.js
diff --git a/tests/stress/static-getter-in-names.js b/tests/stress/static-getter-in-names.js
new file mode 100644 (file)
index 0000000..852a2e5
--- /dev/null
@@ -0,0 +1,7 @@
+function shouldBe(actual, expected) {
+    if (actual !== expected)
+        throw new Error('bad value: ' + actual);
+}
+
+shouldBe(JSON.stringify(Object.getOwnPropertyNames(RegExp.prototype).sort()), '["compile","constructor","exec","flags","global","ignoreCase","lastIndex","multiline","source","test","toString"]');
+shouldBe(JSON.stringify(Object.getOwnPropertyNames(/Cocoa/).sort()), '["lastIndex"]');