diff options
author | Matthew Johnson <mjj29@matthew.ath.cx> | 2008-01-29 23:59:42 +0000 |
---|---|---|
committer | Matthew Johnson <mjj29@matthew.ath.cx> | 2008-01-29 23:59:42 +0000 |
commit | 2e06bd7b4d49bbbe618aa58c0ddf616704c01bfc (patch) | |
tree | 001369d9dc41756dc2004dde7431a0e8554e2686 /org | |
parent | b0418194a346aa4c43181b91bfd0d05226d613cb (diff) |
aoeu
Diffstat (limited to 'org')
-rw-r--r-- | org/freedesktop/dbus/test/profile.java | 2 | ||||
-rw-r--r-- | org/freedesktop/dbus/test/test.java | 19 |
2 files changed, 14 insertions, 7 deletions
diff --git a/org/freedesktop/dbus/test/profile.java b/org/freedesktop/dbus/test/profile.java index 56af3f8..ef8b031 100644 --- a/org/freedesktop/dbus/test/profile.java +++ b/org/freedesktop/dbus/test/profile.java @@ -108,7 +108,7 @@ public class profile { if (0==args.length) { System.out.println("You must specify a profile type."); - System.out.println("Syntax: profile <pings|arrays|introspect|maps|bytes|lists|structs|signals|rate>"); + System.out.println("Syntax: profile <pings|arrays|introspect|maps|bytes|lists|structs|signals>"); System.exit(1); } DBusConnection conn = DBusConnection.getConnection(DBusConnection.SESSION); diff --git a/org/freedesktop/dbus/test/test.java b/org/freedesktop/dbus/test/test.java index 6dae9f7..64a062f 100644 --- a/org/freedesktop/dbus/test/test.java +++ b/org/freedesktop/dbus/test/test.java @@ -19,6 +19,8 @@ import java.util.List; import java.util.Map; import java.util.Vector; +import java.text.Collator; + import org.freedesktop.dbus.CallbackHandler; import org.freedesktop.dbus.DBusAsyncReply; import org.freedesktop.dbus.DBusCallInfo; @@ -166,7 +168,7 @@ class testclass implements TestRemoteInterface, TestRemoteInterface2, TestSignal } public String getName() { - return test.NAMESTRING; + return "This Is A UTF-8 Name: س !!"; } public boolean check() { @@ -385,7 +387,10 @@ class callbackhandler implements CallbackHandler<String> public void handle(String r) { System.out.println("Handling callback: "+r); - if (!test.NAMESTRING.equals(r)) + Collator col = Collator.getInstance(); + col.setDecomposition(Collator.FULL_DECOMPOSITION); + col.setStrength(Collator.PRIMARY); + if (0 != col.compare("This Is A UTF-8 Name: ﺱ !!", r)) test.fail("call with callback, wrong return value"); test.done4 = true; } @@ -396,7 +401,6 @@ class callbackhandler implements CallbackHandler<String> */ public class test { - public static final String NAMESTRING = "This Is A UTF-8 Name: س !!"; public static boolean done1 = false; public static boolean done2 = false; public static boolean done3 = false; @@ -502,7 +506,10 @@ public class test /** Call the remote object and get a response. */ String rname = tri.getName(); System.out.println("Got Remote Name: "+rname); - if (!NAMESTRING.equals(rname)) + Collator col = Collator.getInstance(); + col.setDecomposition(Collator.FULL_DECOMPOSITION); + col.setStrength(Collator.PRIMARY); + if (0 != col.compare("This Is A UTF-8 Name: ﺱ !!", rname)) fail("getName return value incorrect"); System.out.println("sending it to sleep"); tri.waitawhile(); @@ -615,7 +622,7 @@ public class test System.out.print("Calling the other introspect method: "); String intro2 = tri2.Introspect(); System.out.println(intro2); - if (!"Not XML".equals(intro2)) + if (0 != col.compare("Not XML", intro2)) fail("Introspect return value incorrect"); /** Call the remote object and get a response. */ @@ -687,7 +694,7 @@ public class test System.out.print("testing recursion..."); - if (!NAMESTRING.equals(tri2.recursionTest())) fail("recursion test failed"); + if (0 != col.compare("This Is A UTF-8 Name: ﺱ !!",tri2.recursionTest())) fail("recursion test failed"); System.out.println("done"); |