diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2003-08-13 16:23:54 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2003-08-13 16:23:54 +0000 |
commit | ccbb709320b578ff60a1daf31a58cfe7545f449a (patch) | |
tree | 40f27bd92d4207ecb3f782df14a28169e3513d70 /ridljar/test | |
parent | 94c9e51adde45055612446c5e9b346c687790ad9 (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.java | 22 |
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 08d9f8047..3043851cf 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)); + } } |