]> git.saurik.com Git - apple/javascriptcore.git/blame - bindings/testM.js
JavaScriptCore-466.1.6.tar.gz
[apple/javascriptcore.git] / bindings / testM.js
CommitLineData
b37bf2e1
A
1myInterface.logMessage ("Starting test");
2
3myInterface.logMessage ("Testing properties:");
4
5myInterface.jsobject = new Function ("arg1","arg2","return arg1 + arg2;");
6myInterface.logMessage ("myInterface.jsobject =" + myInterface.jsobject);
7
8var functionBody = 'return arg1*arg2;'
9
10myInterface.setJSObject_(new Function ("arg1","arg2",functionBody));
11myInterface.logMessage ("myInterface.jsobject =" + myInterface.jsobject);
12myInterface.callJSObject__(5,6);
13myInterface.callJSObject__(8,9);
14
15myInterface.logMessage ("myInterface.setInt_(666) = " + myInterface.setInt_(666));
16myInterface.logMessage ("myInterface.getInt() = " + myInterface.getInt());
17myInterface.logMessage ("myInterface.getString().foo() = " + myInterface.getString().foo());
18myInterface.logMessage ("myInterface.myInt = " + myInterface.myInt);
19myInterface.logMessage ("setting myInterface.myInt = 777");
20myInterface.myInt = 777;
21myInterface.logMessage ("myInterface.myInt = " + myInterface.myInt);
22myInterface.logMessage ("myInterface.getMySecondInterface().doubleValue = " + myInterface.getMySecondInterface().doubleValue);
23myInterface.logMessage ("myInterface.getMySecondInterface() = " + myInterface.getMySecondInterface());
24
25myInterface.logMessageWithPrefix ("msg", "prefix");
26
27var strings = [ "one", "two", "three" ];
28
29myInterface.logMessages (strings);