]> git.saurik.com Git - apple/javascriptcore.git/blobdiff - tests/stress/has-custom-properties.js
JavaScriptCore-7601.1.46.3.tar.gz
[apple/javascriptcore.git] / tests / stress / has-custom-properties.js
diff --git a/tests/stress/has-custom-properties.js b/tests/stress/has-custom-properties.js
new file mode 100644 (file)
index 0000000..55775ba
--- /dev/null
@@ -0,0 +1,13 @@
+(function() {
+    for (var i = 0; i < 10000; ++i) {
+        var o = {};
+        
+        if (hasCustomProperties(o))
+            throw "Error: object shouldn't have custom properties yet.";
+        
+        o.f = 42;
+        
+        if (!hasCustomProperties(o))
+            throw "Error: object should have custom properties already.";
+    }
+})();