]> git.saurik.com Git - apple/javascriptcore.git/blobdiff - API/tests/testapi.js
JavaScriptCore-7601.1.46.3.tar.gz
[apple/javascriptcore.git] / API / tests / testapi.js
index f9cc7b411a37d00a022eb8d8dcbf3c518bbfd922..88d3701c21e05866a7a20a1aef22cb0fb283c4f6 100644 (file)
@@ -74,6 +74,20 @@ function globalStaticFunction()
 
 shouldBe("globalStaticValue", 3);
 shouldBe("globalStaticFunction()", 4);
+shouldBe("this.globalStaticFunction()", 4);
+
+function globalStaticFunction2() {
+    return 10;
+}
+shouldBe("globalStaticFunction2();", 10);
+this.globalStaticFunction2 = function() { return 20; }
+shouldBe("globalStaticFunction2();", 20);
+shouldBe("this.globalStaticFunction2();", 20);
+
+function iAmNotAStaticFunction() { return 10; }
+shouldBe("iAmNotAStaticFunction();", 10);
+this.iAmNotAStaticFunction = function() { return 20; }
+shouldBe("iAmNotAStaticFunction();", 20);
 
 shouldBe("typeof MyObject", "function"); // our object implements 'call'
 MyObject.cantFind = 1;