ridljar: Any_Test & UnoRuntime_Test (JUnit)
Modify exception test in Any_Test. Replace assertTrue with AsserSame & AssertNotSame for equality operator in UnoRuntime_Test. $ make JunitTest_ridljar_uno Change-Id: I42a8380e7c4aed79af976165224c2af25c50fbce Reviewed-on: https://gerrit.libreoffice.org/11673 Reviewed-by: David Ostrovsky <david@ostrovsky.org> Tested-by: David Ostrovsky <david@ostrovsky.org>
This commit is contained in:
parent
cfd1310bef
commit
ffbdd80506
@ -18,18 +18,22 @@
|
||||
|
||||
package com.sun.star.uno;
|
||||
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import org.junit.Test;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
public final class Any_Test {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(Any_Test.class.getName());
|
||||
|
||||
@Test public void testAnyAny() {
|
||||
boolean caught = false;
|
||||
try {
|
||||
new Any(Type.ANY, null);
|
||||
fail("IllegalArgumentException expected");
|
||||
} catch (IllegalArgumentException e) {
|
||||
caught = true;
|
||||
logger.log(Level.FINE, "IllegalArgumentException caught");
|
||||
}
|
||||
assertTrue(caught);
|
||||
}
|
||||
|
||||
@Test public void testComplete() {
|
||||
|
@ -111,9 +111,9 @@ public final class UnoRuntime_Test {
|
||||
Object v1 = t1.context.getValueByName("");
|
||||
Object v2 = t2.context.getValueByName("");
|
||||
assertFalse(t1.context == t2.context);
|
||||
assertTrue(v1 == t1);
|
||||
assertTrue(v2 == t2);
|
||||
assertFalse(v1 == v2);
|
||||
assertSame(v1, t1);
|
||||
assertSame(v2, t2);
|
||||
assertNotSame(v1, v2);
|
||||
}
|
||||
|
||||
private interface Ifc extends XInterface {}
|
||||
|
Loading…
x
Reference in New Issue
Block a user