diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | 90825e2392b2d70e43c7a25b8a3752299a933894 (patch) | |
tree | e33aa27f02b74604afbfd0ea4f1cfca8833d882a /dcopjava/tests/test.java | |
download | tdebindings-90825e2392b2d70e43c7a25b8a3752299a933894.tar.gz tdebindings-90825e2392b2d70e43c7a25b8a3752299a933894.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebindings@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'dcopjava/tests/test.java')
-rw-r--r-- | dcopjava/tests/test.java | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/dcopjava/tests/test.java b/dcopjava/tests/test.java new file mode 100644 index 00000000..72a40b95 --- /dev/null +++ b/dcopjava/tests/test.java @@ -0,0 +1,78 @@ +import org.kde.DCOP.*; + + +class test +{ + + public static void main(String[] argv) + { + test_stub test = new test_stub("test-server", "test"); + + System.out.println("Calling server without args:"); + test.noArg(); + System.out.println(""); + + System.out.println("Calling server asynchronously without args:"); + test.asyncNoArg(); + System.out.println(""); + + System.out.println("Calling server with one argument: bool=true:"); + test.oneArg(true); + System.out.println(""); + + System.out.println("Calling server with one argument: bool=false:"); + test.oneArg(false); + System.out.println(""); + + System.out.println("Calling server: returnFalse"); + boolean ret = test.returnFalse(); + System.out.print("Returned: "); + if (ret) + System.out.println("True"); + else + System.out.println("False"); + System.out.println(); + + System.out.println("Calling server: returnTrue"); + ret = test.returnTrue(); + System.out.print("Returned: "); + if (ret) + System.out.println("True"); + else + System.out.println("False"); + System.out.println(); + + System.out.println("Calling server: short"); + System.out.println(test.shortArg((short)(51))); + + System.out.println("Calling server: int"); + System.out.println(test.intArg(512)); + + System.out.println("Calling server: long"); + System.out.println(test.longArg(999999)); + + System.out.println("Calling server: float"); + System.out.println(test.floatArg(5.1212f)); + + System.out.println("Calling server: double"); + System.out.println(test.doubleArg(0.001122)); + + System.out.println("Calling server: String"); + System.out.println(test.stringArg("Hallo Server")); + + String[] in = { "alpha", "beta", "gamma", "delta" }; + System.out.println("Calling server: String[]"); + String[] out = test.stringListArg(in); + for (int i=0; i<out.length; ++i) + System.out.println(out[i]); + + System.out.println("Calling server: CString"); + System.out.println(test.cstringArg("Hallo Server")); + + DCOPRef rin = new DCOPRef("app", "obj", "typ"); + System.out.println("Calling server: DCOPRef"); + DCOPRef rout = test.DCOPRefArg(rin); + System.out.println("Reference: " + rout.app() + ", " + + rout.object() + ", " + rout.type()); + } +} |