diff options
Diffstat (limited to 'jurt/test/com/sun/star/lib/uno')
19 files changed, 127 insertions, 162 deletions
diff --git a/jurt/test/com/sun/star/lib/uno/bridges/java_remote/BridgedObject_Test.java b/jurt/test/com/sun/star/lib/uno/bridges/java_remote/BridgedObject_Test.java index 5327993fa65b..f56ab6679635 100644 --- a/jurt/test/com/sun/star/lib/uno/bridges/java_remote/BridgedObject_Test.java +++ b/jurt/test/com/sun/star/lib/uno/bridges/java_remote/BridgedObject_Test.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/jurt/test/com/sun/star/lib/uno/bridges/java_remote/ProxyFactory_Test.java b/jurt/test/com/sun/star/lib/uno/bridges/java_remote/ProxyFactory_Test.java index 8d0fa09a657a..a83131c0baa3 100644 --- a/jurt/test/com/sun/star/lib/uno/bridges/java_remote/ProxyFactory_Test.java +++ b/jurt/test/com/sun/star/lib/uno/bridges/java_remote/ProxyFactory_Test.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/jurt/test/com/sun/star/lib/uno/bridges/java_remote/java_remote_bridge_Test.java b/jurt/test/com/sun/star/lib/uno/bridges/java_remote/java_remote_bridge_Test.java index 42187fa2277c..040cf7063c15 100644 --- a/jurt/test/com/sun/star/lib/uno/bridges/java_remote/java_remote_bridge_Test.java +++ b/jurt/test/com/sun/star/lib/uno/bridges/java_remote/java_remote_bridge_Test.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/jurt/test/com/sun/star/lib/uno/environments/java/java_environment_Test.java b/jurt/test/com/sun/star/lib/uno/environments/java/java_environment_Test.java index 162c1636c720..80896445e3e4 100644 --- a/jurt/test/com/sun/star/lib/uno/environments/java/java_environment_Test.java +++ b/jurt/test/com/sun/star/lib/uno/environments/java/java_environment_Test.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -42,7 +42,7 @@ public final class java_environment_Test extends ComplexTestCase { public void test() { java_environment env = new java_environment(null); - + Object obj = new Integer(3); String[] oid = new String[1]; diff --git a/jurt/test/com/sun/star/lib/uno/environments/remote/JavaThreadPoolFactory_Test.java b/jurt/test/com/sun/star/lib/uno/environments/remote/JavaThreadPoolFactory_Test.java index 8dc1a767b5fa..1434caed3c58 100644 --- a/jurt/test/com/sun/star/lib/uno/environments/remote/JavaThreadPoolFactory_Test.java +++ b/jurt/test/com/sun/star/lib/uno/environments/remote/JavaThreadPoolFactory_Test.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/jurt/test/com/sun/star/lib/uno/environments/remote/JobQueue_Test.java b/jurt/test/com/sun/star/lib/uno/environments/remote/JobQueue_Test.java index 5e83098b8ecd..83829cd955e1 100644 --- a/jurt/test/com/sun/star/lib/uno/environments/remote/JobQueue_Test.java +++ b/jurt/test/com/sun/star/lib/uno/environments/remote/JobQueue_Test.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/jurt/test/com/sun/star/lib/uno/environments/remote/TestIWorkAt.java b/jurt/test/com/sun/star/lib/uno/environments/remote/TestIWorkAt.java index 1c616a84541b..c4946208ffec 100644 --- a/jurt/test/com/sun/star/lib/uno/environments/remote/TestIWorkAt.java +++ b/jurt/test/com/sun/star/lib/uno/environments/remote/TestIWorkAt.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -35,12 +35,12 @@ import com.sun.star.uno.XInterface; public interface TestIWorkAt extends XInterface { void syncCall() throws Throwable ; void asyncCall() throws Throwable ; - + void increment() throws Throwable; - + void notifyme(); - public static final TypeInfo UNOTYPEINFO[] = { + public static final TypeInfo UNOTYPEINFO[] = { new MethodTypeInfo("increment", 0, 0), new MethodTypeInfo("notifyme", 1, 0), new MethodTypeInfo("syncCall", 2, 0), diff --git a/jurt/test/com/sun/star/lib/uno/environments/remote/TestMessage.java b/jurt/test/com/sun/star/lib/uno/environments/remote/TestMessage.java index f47048e423ed..c4bc556960d7 100644 --- a/jurt/test/com/sun/star/lib/uno/environments/remote/TestMessage.java +++ b/jurt/test/com/sun/star/lib/uno/environments/remote/TestMessage.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -40,7 +40,7 @@ class TestMessage implements IMessage { Object _result; String _operation; Object _params[]; - + TestMessage(boolean synchron, ITypeDescription iTypeDescription, String oid, ThreadId threadId, Object result, String operation, Object params[]) { _synchron = synchron; _iTypeDescription = iTypeDescription; @@ -50,39 +50,39 @@ class TestMessage implements IMessage { _operation = operation; _params = params; } - + public String getOperation() { return _operation; } - + public ThreadId getThreadId() { return _threadId; } - + public ITypeDescription getInterface() { return _iTypeDescription; } - + public boolean isSynchron() { return _synchron; } - + public boolean mustReply() { return _synchron; } - + public boolean isException() { return false; } - + public String getOid() { return _oid; } - + public Object getData(Object params[][]) { params[0] = _params; return _result; -// return new Integer(_requestId); +// return new Integer(_requestId); } } diff --git a/jurt/test/com/sun/star/lib/uno/environments/remote/TestReceiver.java b/jurt/test/com/sun/star/lib/uno/environments/remote/TestReceiver.java index 32ba5ba7473b..0a42d4f2db41 100644 --- a/jurt/test/com/sun/star/lib/uno/environments/remote/TestReceiver.java +++ b/jurt/test/com/sun/star/lib/uno/environments/remote/TestReceiver.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/jurt/test/com/sun/star/lib/uno/environments/remote/TestWorkAt.java b/jurt/test/com/sun/star/lib/uno/environments/remote/TestWorkAt.java index 322d7573c697..c45b020dafce 100644 --- a/jurt/test/com/sun/star/lib/uno/environments/remote/TestWorkAt.java +++ b/jurt/test/com/sun/star/lib/uno/environments/remote/TestWorkAt.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -37,10 +37,10 @@ class TestWorkAt implements TestIWorkAt { int _counter; - + int _sync_counter; int _async_counter; - + Thread _sync_thread; Thread _async_thread; @@ -49,48 +49,48 @@ class TestWorkAt implements TestIWorkAt { public void syncCall() throws Throwable { ++ _sync_counter; - - if(_async_counter != MESSAGES) + + if(_async_counter != MESSAGES) _passedAync = false; - + if(_sync_thread == null) _sync_thread = Thread.currentThread(); -// if(_sync_thread != Thread.currentThread()) -// _passedAync = false; +// if(_sync_thread != Thread.currentThread()) +// _passedAync = false; if(DEBUG) System.err.println("syncCall:" + _sync_counter + " " + _passedAync + " " + Thread.currentThread()); } - + public void asyncCall() throws Throwable { -// Thread.sleep(50); - +// Thread.sleep(50); + ++ _async_counter; if(_async_thread == null) _async_thread = Thread.currentThread(); -// if(_async_thread != Thread.currentThread()) -// _passedAync = false; +// if(_async_thread != Thread.currentThread()) +// _passedAync = false; if(DEBUG) System.err.println("asyncCall:" + _async_counter + " " + Thread.currentThread()); } - + public synchronized void increment() throws Throwable { if(DEBUG) System.err.println("increment - " + Thread.currentThread()); - + ++ _counter; notifyAll(); } - + public synchronized void notifyme() { if(DEBUG) System.err.println("\t\t\tnotifying me" + Thread.currentThread()); - + notifyAll(); _notified = true; } - + public boolean passedAsyncTest() { return _passedAync && (_sync_counter == MESSAGES); } diff --git a/jurt/test/com/sun/star/lib/uno/environments/remote/ThreadId_Test.java b/jurt/test/com/sun/star/lib/uno/environments/remote/ThreadId_Test.java index d9154ce6b0ef..b3ff1c75789a 100644 --- a/jurt/test/com/sun/star/lib/uno/environments/remote/ThreadId_Test.java +++ b/jurt/test/com/sun/star/lib/uno/environments/remote/ThreadId_Test.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/jurt/test/com/sun/star/lib/uno/environments/remote/ThreadPool_Test.java b/jurt/test/com/sun/star/lib/uno/environments/remote/ThreadPool_Test.java index bed90acfbbcb..45c05e72d0f8 100644 --- a/jurt/test/com/sun/star/lib/uno/environments/remote/ThreadPool_Test.java +++ b/jurt/test/com/sun/star/lib/uno/environments/remote/ThreadPool_Test.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/jurt/test/com/sun/star/lib/uno/protocols/urp/Cache_Test.java b/jurt/test/com/sun/star/lib/uno/protocols/urp/Cache_Test.java index 2deb525adeac..650b65f0e544 100644 --- a/jurt/test/com/sun/star/lib/uno/protocols/urp/Cache_Test.java +++ b/jurt/test/com/sun/star/lib/uno/protocols/urp/Cache_Test.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -27,114 +27,80 @@ package com.sun.star.lib.uno.protocols.urp; -import org.junit.Test; -import static org.junit.Assert.*; +import complexlib.ComplexTestCase; + +public final class Cache_Test extends ComplexTestCase { + public String[] getTestMethodNames() { + return new String[] { "test0", "test1", "test2", "test3" }; + } -public final class Cache_Test { - @Test public void test0() { + public void test0() { Cache c = new Cache(0); boolean[] f = new boolean[1]; int i; i = c.add(f, "a"); - assertTrue(i == Cache.NOT_CACHED && !f[0]); + assure("1", i == Cache.NOT_CACHED && !f[0]); i = c.add(f, "a"); - assertTrue(i == Cache.NOT_CACHED && !f[0]); + assure("2", i == Cache.NOT_CACHED && !f[0]); i = c.add(f, "b"); - assertTrue(i == Cache.NOT_CACHED && !f[0]); + assure("3", i == Cache.NOT_CACHED && !f[0]); i = c.add(f, "a"); - assertTrue(i == Cache.NOT_CACHED && !f[0]); + assure("4", i == Cache.NOT_CACHED && !f[0]); } - @Test public void test1() { + public void test1() { Cache c = new Cache(1); boolean[] f = new boolean[1]; int i; i = c.add(f, "a"); - assertTrue(i == 0 && !f[0]); + assure("1", i == 0 && !f[0]); i = c.add(f, "a"); - assertTrue(i == 0 && f[0]); + assure("2", i == 0 && f[0]); i = c.add(f, "b"); - assertTrue(i == 0 && !f[0]); + assure("3", i == 0 && !f[0]); i = c.add(f, "b"); - assertTrue(i == 0 && f[0]); + assure("4", i == 0 && f[0]); i = c.add(f, "a"); - assertTrue(i == 0 && !f[0]); + assure("5", i == 0 && !f[0]); } - @Test public void test2() { + public void test2() { Cache c = new Cache(2); boolean[] f = new boolean[1]; int i; i = c.add(f, "a"); - assertTrue(i == 0 && !f[0]); + assure("1", i == 0 && !f[0]); i = c.add(f, "a"); - assertTrue(i == 0 && f[0]); + assure("2", i == 0 && f[0]); i = c.add(f, "b"); - assertTrue(i == 1 && !f[0]); + assure("3", i == 1 && !f[0]); i = c.add(f, "b"); - assertTrue(i == 1 && f[0]); + assure("4", i == 1 && f[0]); i = c.add(f, "a"); - assertTrue(i == 0 && f[0]); + assure("5", i == 0 && f[0]); i = c.add(f, "c"); - assertTrue(i == 1 && !f[0]); + assure("6", i == 1 && !f[0]); i = c.add(f, "b"); - assertTrue(i == 0 && !f[0]); + assure("7", i == 0 && !f[0]); } - @Test public void test3() { + public void test3() { Cache c = new Cache(3); boolean[] f = new boolean[1]; int i; i = c.add(f, "a"); - assertTrue(i == 0 && !f[0]); + assure("1", i == 0 && !f[0]); i = c.add(f, "a"); - assertTrue(i == 0 && f[0]); + assure("3", i == 0 && f[0]); i = c.add(f, "b"); - assertTrue(i == 1 && !f[0]); + assure("5", i == 1 && !f[0]); i = c.add(f, "a"); - assertTrue(i == 0 && f[0]); + assure("3", i == 0 && f[0]); i = c.add(f, "c"); - assertTrue(i == 2 && !f[0]); + assure("7", i == 2 && !f[0]); i = c.add(f, "d"); - assertTrue(i == 1 && !f[0]); + assure("9", i == 1 && !f[0]); i = c.add(f, "d"); - assertTrue(i == 1 && f[0]); - } - - @Test public void testNothingLostFromLruList() { - // Regardless in what order arbitrary values from 0, ..., 3 are inserted - // into a size-4 cache, afterwards adding -1, ..., -4 must return each - // possible index in the range from 0, ..., 3 exactly once (so their sum - // must be 6); this code systematically tests all such arbitrary ways up - // to length 8 (the code arguably violates recommendations for writing - // good tests, but actually helped track down an error in the Cache - // implementation): - int[] a = new int[8]; - for (int i = 0; i < a.length; ++i) { - for (int j = 0; j < i; ++j) { - a[j] = 0; - } - for (;;) { - Cache c = new Cache(4); - for (int k = 0; k < i; ++k) { - c.add(new boolean[1], a[k]); - } - assertEquals( - 6, - (c.add(new boolean[1], -1) + c.add(new boolean[1], -2) + - c.add(new boolean[1], -3) + c.add(new boolean[1], -4))); - int j = i - 1; - while (j >= 0 && a[j] == 3) { - --j; - } - if (j < 0) { - break; - } - ++a[j]; - for (int k = j + 1; k < i; ++k) { - a[k] = 0; - } - } - } + assure("11", i == 1 && f[0]); } } diff --git a/jurt/test/com/sun/star/lib/uno/protocols/urp/Marshaling_Test.java b/jurt/test/com/sun/star/lib/uno/protocols/urp/Marshaling_Test.java index 2621006faf95..20bc5bca3df0 100644 --- a/jurt/test/com/sun/star/lib/uno/protocols/urp/Marshaling_Test.java +++ b/jurt/test/com/sun/star/lib/uno/protocols/urp/Marshaling_Test.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -32,14 +32,21 @@ import com.sun.star.uno.IBridge; import com.sun.star.uno.Type; import com.sun.star.uno.TypeClass; import com.sun.star.uno.XInterface; +import complexlib.ComplexTestCase; import java.lang.reflect.Array; import java.lang.reflect.Field; import java.lang.reflect.Modifier; -import org.junit.Test; -import static org.junit.Assert.*; -public final class Marshaling_Test { - @Test public void test() throws Exception { +public final class Marshaling_Test extends ComplexTestCase { + public String getTestObjectName() { + return getClass().getName(); + } + + public String[] getTestMethodNames() { + return new String[] { "test" }; + } + + public void test() throws Exception { short cacheSize = (short)256; TestBridge testBridge = new TestBridge(); Marshal marshal = new Marshal(testBridge, cacheSize); @@ -232,7 +239,7 @@ public final class Marshaling_Test { if(op1 instanceof Any) op1 = ((Any)op1).getObject(); - assertTrue(compareObjects(op1, op2)); + assure("", compareObjects(op1, op2)); } } diff --git a/jurt/test/com/sun/star/lib/uno/protocols/urp/Protocol_Test.java b/jurt/test/com/sun/star/lib/uno/protocols/urp/Protocol_Test.java index 6a74710625e9..d9da63b5a7fd 100644 --- a/jurt/test/com/sun/star/lib/uno/protocols/urp/Protocol_Test.java +++ b/jurt/test/com/sun/star/lib/uno/protocols/urp/Protocol_Test.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -34,17 +34,20 @@ import com.sun.star.uno.Any; import com.sun.star.uno.IBridge; import com.sun.star.uno.Type; import com.sun.star.uno.XInterface; +import complexlib.ComplexTestCase; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.io.PipedInputStream; import java.io.PipedOutputStream; import java.util.LinkedList; -import org.junit.Test; -import static org.junit.Assert.*; -public final class Protocol_Test { - @Test public void test() throws Exception { +public final class Protocol_Test extends ComplexTestCase { + public String[] getTestMethodNames() { + return new String[] { "test" }; + } + + public void test() throws Exception { IBridge iBridge = new TestBridge(); PipedInputStream inA = new PipedInputStream(); PipedOutputStream outA = new PipedOutputStream(inA); @@ -90,7 +93,7 @@ public final class Protocol_Test { new Object[] { "hallo" }); Message iMessage = iReceiver.readMessage(); Object[] t_params = iMessage.getArguments(); - assertEquals("hallo", (String)t_params[0]); + assure("", "hallo".equals((String)t_params[0])); // send a reply iReceiver.writeReply(false, new ThreadId(new byte[] { 0, 1 }), null); @@ -115,7 +118,7 @@ public final class Protocol_Test { iReceiver.writeReply(false, new ThreadId(new byte[] { 0, 1 }), null); iSender.readMessage(); - assertEquals("testString", ((String [])params[0])[0]); + assure("", "testString".equals(((String [])params[0])[0])); } public void testCallWithInOutParameter( @@ -130,7 +133,7 @@ public final class Protocol_Test { Object[] t_params = iMessage.getArguments(); - assertEquals("inString", ((String [])t_params[0])[0]); + assure("", "inString".equals(((String [])t_params[0])[0])); // provide reply ((String [])t_params[0])[0] = "outString"; @@ -139,7 +142,7 @@ public final class Protocol_Test { iReceiver.writeReply(false, new ThreadId(new byte[] { 0, 1 }), null); iSender.readMessage(); - assertEquals("outString", ((String [])params[0])[0]); + assure("", "outString".equals(((String [])params[0])[0])); } public void testCallWithResult( @@ -158,7 +161,7 @@ public final class Protocol_Test { Message iMessage = iSender.readMessage(); Object result = iMessage.getResult(); - assertEquals("resultString", result); + assure("", "resultString".equals(result)); } public void testCallWhichRaisesException( @@ -178,7 +181,7 @@ public final class Protocol_Test { Object result = iMessage.getResult(); - assertTrue(result instanceof com.sun.star.uno.RuntimeException); + assure("", result instanceof com.sun.star.uno.RuntimeException); } public void testCallWithIn_Out_InOut_Paramters_and_result( @@ -193,9 +196,9 @@ public final class Protocol_Test { Object[] t_params = iMessage.getArguments(); - assertEquals("hallo", (String)t_params[0]); + assure("", "hallo".equals((String)t_params[0])); - assertEquals("inOutString", ((String [])t_params[2])[0]); + assure("", "inOutString".equals(((String [])t_params[2])[0])); ((String [])t_params[1])[0] = "outString"; ((String [])t_params[2])[0] = "inOutString_res"; @@ -206,11 +209,11 @@ public final class Protocol_Test { iMessage = iSender.readMessage(); Object result = iMessage.getResult(); - assertEquals("outString", ((String [])params[1])[0]); + assure("", "outString".equals(((String [])params[1])[0])); - assertEquals("inOutString_res", ((String [])params[2])[0]); + assure("", "inOutString_res".equals(((String [])params[2])[0])); - assertEquals("resultString", result); + assure("", "resultString".equals(result)); } public void testCallWhichReturnsAny( @@ -226,11 +229,9 @@ public final class Protocol_Test { false, new ThreadId(new byte[] { 0, 1 }), Any.VOID); Message iMessage = iSender.readMessage(); Object result = iMessage.getResult(); - assertTrue( - result instanceof Any && - ((TypeDescription.getTypeDescription(((Any) result).getType()). - getZClass()) == - void.class)); + assure("", result instanceof Any + && (TypeDescription.getTypeDescription(((Any) result).getType()). + getZClass() == void.class)); // send an ordinary request iSender.writeRequest( @@ -243,7 +244,7 @@ public final class Protocol_Test { new Any(XInterface.class, null)); iMessage = iSender.readMessage(); result = iMessage.getResult(); - assertNull(result); + assure("", result == null); // send an ordinary request iSender.writeRequest( @@ -255,7 +256,7 @@ public final class Protocol_Test { false, new ThreadId(new byte[] { 0, 1 }), new Integer(501)); iMessage = iSender.readMessage(); result = iMessage.getResult(); - assertEquals(501, result); + assure("", result.equals(new Integer(501))); } private static final class Endpoint { diff --git a/jurt/test/com/sun/star/lib/uno/protocols/urp/TestBridge.java b/jurt/test/com/sun/star/lib/uno/protocols/urp/TestBridge.java index 34f864ae3085..ab84a983fe45 100644 --- a/jurt/test/com/sun/star/lib/uno/protocols/urp/TestBridge.java +++ b/jurt/test/com/sun/star/lib/uno/protocols/urp/TestBridge.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -40,9 +40,9 @@ class TestBridge implements IBridge { static public final boolean DEBUG = false; Hashtable _hashtable = new Hashtable(); - + IEnvironment _source ;//= new com.sun.star.lib.uno.environments.java.java_environment(null); - + class MyEnv implements IEnvironment { public Object getContext() { @@ -75,7 +75,7 @@ class TestBridge implements IBridge { public void list() { } } - + TestBridge() { _source = new MyEnv(); } @@ -92,24 +92,24 @@ class TestBridge implements IBridge { public Object mapInterfaceFrom(Object object, Type type) { String oid = (String)object; - + return _hashtable.get(oid); } - + public IEnvironment getSourceEnvironment() { return _source; } - + public IEnvironment getTargetEnvironment() { return null; } - + public void acquire() {} public void release() {} - + public void reset() throws IOException {} - + public void dispose() throws InterruptedException, IOException {} } diff --git a/jurt/test/com/sun/star/lib/uno/protocols/urp/TestObject.java b/jurt/test/com/sun/star/lib/uno/protocols/urp/TestObject.java index f6be37207765..c2ff8a58d4c7 100644 --- a/jurt/test/com/sun/star/lib/uno/protocols/urp/TestObject.java +++ b/jurt/test/com/sun/star/lib/uno/protocols/urp/TestObject.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/jurt/test/com/sun/star/lib/uno/protocols/urp/interfaces.idl b/jurt/test/com/sun/star/lib/uno/protocols/urp/interfaces.idl index 1b267c434a0f..b1aba4cf7224 100644 --- a/jurt/test/com/sun/star/lib/uno/protocols/urp/interfaces.idl +++ b/jurt/test/com/sun/star/lib/uno/protocols/urp/interfaces.idl @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -103,7 +103,7 @@ module protocols { module urp { string MethodWithIn_Out_InOut_Paramters_and_result([in] string text, [out] string outtext, [inout] string inouttext) raises( com::sun::star::uno::Exception ); }; - struct TestInterfaceStruct + struct TestInterfaceStruct { com::sun::star::uno::XInterface hallo; diff --git a/jurt/test/com/sun/star/lib/uno/protocols/urp/makefile.mk b/jurt/test/com/sun/star/lib/uno/protocols/urp/makefile.mk index 8403b2bd71ed..c6e66558b65d 100644 --- a/jurt/test/com/sun/star/lib/uno/protocols/urp/makefile.mk +++ b/jurt/test/com/sun/star/lib/uno/protocols/urp/makefile.mk @@ -24,16 +24,10 @@ # for a copy of the LGPLv3 License. # #************************************************************************* - -.IF "$(OOO_SUBSEQUENT_TESTS)" == "" -nothing .PHONY: -.ELSE - PRJ := ..$/..$/..$/..$/..$/..$/..$/.. PRJNAME := jurt TARGET := test_com_sun_star_lib_uno_protocols_urp -.IF "$(OOO_JUNIT_JAR)" != "" PACKAGE := com$/sun$/star$/lib$/uno$/protocols$/urp JAVATESTFILES := \ Cache_Test.java \ @@ -44,8 +38,5 @@ JAVAFILES := \ TestObject.java JARFILES := ridl.jar IDLTESTFILES := interfaces.idl -.END .INCLUDE: javaunittest.mk - -.END |