summaryrefslogtreecommitdiff
path: root/ridljar/test
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2003-08-13 16:23:54 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2003-08-13 16:23:54 +0000
commit5a83c131c9ef4188662c08fbd3c059cea18c6c53 (patch)
treea854b016c5546803ffaa18ba69ef8772c38498ef /ridljar/test
parent8e0f12bf63387b4bfc8cfe4c252d2d752aad7b60 (diff)
INTEGRATION: CWS sb7 (1.2.16); FILE MERGED
2003/08/12 09:42:15 sb 1.2.16.1: #i16264# Added Type.isSupertypeOf.
Diffstat (limited to 'ridljar/test')
-rw-r--r--ridljar/test/com/sun/star/uno/Type_Test.java22
1 files changed, 15 insertions, 7 deletions
diff --git a/ridljar/test/com/sun/star/uno/Type_Test.java b/ridljar/test/com/sun/star/uno/Type_Test.java
index 08d9f8047672..3043851cfc62 100644
--- a/ridljar/test/com/sun/star/uno/Type_Test.java
+++ b/ridljar/test/com/sun/star/uno/Type_Test.java
@@ -2,9 +2,9 @@
*
* $RCSfile: Type_Test.java,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: vg $ $Date: 2003-05-22 09:34:14 $
+ * last change: $Author: hr $ $Date: 2003-08-13 17:23:54 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -64,12 +64,8 @@ package com.sun.star.uno;
import complexlib.ComplexTestCase;
public final class Type_Test extends ComplexTestCase {
- public String getTestObjectName() {
- return getClass().getName();
- }
-
public String[] getTestMethodNames() {
- return new String[] { "testZClass" };
+ return new String[] { "testZClass", "testIsSupertypeOf" };
}
public void testZClass() {
@@ -123,4 +119,16 @@ public final class Type_Test extends ComplexTestCase {
TypeClass.INTERFACE).getZClass()
== XComponentContext.class);
}
+
+ public void testIsSupertypeOf() {
+ Type ifc = new Type(com.sun.star.uno.XInterface.class);
+ Type ctx = new Type(com.sun.star.uno.XComponentContext.class);
+ Type exc = new Type(com.sun.star.uno.RuntimeException.class);
+ assure("", !Type.ANY.isSupertypeOf(ifc));
+ assure("", !ifc.isSupertypeOf(Type.ANY));
+ assure("", ifc.isSupertypeOf(ctx));
+ assure("", !ctx.isSupertypeOf(ifc));
+ assure("", ctx.isSupertypeOf(ctx));
+ assure("", !ifc.isSupertypeOf(exc));
+ }
}