INTEGRATION: CWS sb10 (1.3.8); FILE MERGED

2003/10/31 08:36:12 sb 1.3.8.3: #112870# Ensure that getZClass always returns a normalized class (e.g., boolean.class, not Boolean.class).
2003/10/30 09:52:38 sb 1.3.8.2: RESYNC: (1.3-1.4); FILE MERGED
2003/10/30 09:20:06 sb 1.3.8.1: #112870# Removed restrictions imposed by old TypeDescription implementation.
This commit is contained in:
Jens-Heiner Rechtien 2004-02-03 12:26:46 +00:00
parent 5cff7c0d4b
commit 9dd014eddb

View file

@ -2,9 +2,9 @@
* *
* $RCSfile: Type_Test.java,v $ * $RCSfile: Type_Test.java,v $
* *
* $Revision: 1.4 $ * $Revision: 1.5 $
* *
* last change: $Author: vg $ $Date: 2003-10-09 10:16:52 $ * last change: $Author: hr $ $Date: 2004-02-03 13:26:46 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@ -74,12 +74,13 @@ public final class Type_Test extends ComplexTestCase {
assure("BYTE", new Type("byte").getZClass() == byte.class); assure("BYTE", new Type("byte").getZClass() == byte.class);
assure("SHORT", new Type("short").getZClass() == short.class); assure("SHORT", new Type("short").getZClass() == short.class);
assure("UNSIGNED SHORT", assure("UNSIGNED SHORT",
new Type("unsigned short").getZClass() == null); new Type("unsigned short").getZClass() == short.class);
assure("LONG", new Type("long").getZClass() == int.class); assure("LONG", new Type("long").getZClass() == int.class);
assure("UNSIGNED LONG", new Type("unsigned long").getZClass() == null); assure("UNSIGNED LONG",
new Type("unsigned long").getZClass() == int.class);
assure("HYPER", new Type("hyper").getZClass() == long.class); assure("HYPER", new Type("hyper").getZClass() == long.class);
assure("UNSIGNED HYPER", assure("UNSIGNED HYPER",
new Type("unsigned hyper").getZClass() == null); new Type("unsigned hyper").getZClass() == long.class);
assure("FLOAT", new Type("float").getZClass() == float.class); assure("FLOAT", new Type("float").getZClass() == float.class);
assure("DOUBLE", new Type("double").getZClass() == double.class); assure("DOUBLE", new Type("double").getZClass() == double.class);
assure("CHAR", new Type("char").getZClass() == char.class); assure("CHAR", new Type("char").getZClass() == char.class);
@ -118,6 +119,11 @@ public final class Type_Test extends ComplexTestCase {
new Type("com.sun.star.uno.XComponentContext", new Type("com.sun.star.uno.XComponentContext",
TypeClass.INTERFACE).getZClass() TypeClass.INTERFACE).getZClass()
== XComponentContext.class); == XComponentContext.class);
assure(new Type(boolean.class).getZClass() == boolean.class);
assure(new Type(Boolean.class).getZClass() == boolean.class);
assure(new Type(boolean[].class).getZClass() == boolean[].class);
assure(new Type(Boolean[].class).getZClass() == boolean[].class);
} }
public void testIsSupertypeOf() { public void testIsSupertypeOf() {