Kaydet (Commit) ffbdd805 authored tarafından Robert Antoni Buj i Gelonch's avatar Robert Antoni Buj i Gelonch Kaydeden (comit) David Ostrovsky

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/11673Reviewed-by: 's avatarDavid Ostrovsky <david@ostrovsky.org>
Tested-by: 's avatarDavid Ostrovsky <david@ostrovsky.org>
üst cfd1310b
......@@ -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 {}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment