1*620ba73aSAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*620ba73aSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*620ba73aSAndrew Rist * or more contributor license agreements. See the NOTICE file 5*620ba73aSAndrew Rist * distributed with this work for additional information 6*620ba73aSAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*620ba73aSAndrew Rist * to you under the Apache License, Version 2.0 (the 8*620ba73aSAndrew Rist * "License"); you may not use this file except in compliance 9*620ba73aSAndrew Rist * with the License. You may obtain a copy of the License at 10*620ba73aSAndrew Rist * 11*620ba73aSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*620ba73aSAndrew Rist * 13*620ba73aSAndrew Rist * Unless required by applicable law or agreed to in writing, 14*620ba73aSAndrew Rist * software distributed under the License is distributed on an 15*620ba73aSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*620ba73aSAndrew Rist * KIND, either express or implied. See the License for the 17*620ba73aSAndrew Rist * specific language governing permissions and limitations 18*620ba73aSAndrew Rist * under the License. 19*620ba73aSAndrew Rist * 20*620ba73aSAndrew Rist *************************************************************/ 21*620ba73aSAndrew Rist 22*620ba73aSAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir package test.java_uno.anytest; 25cdf0e10cSrcweir 26cdf0e10cSrcweir import com.sun.star.uno.Any; 27cdf0e10cSrcweir import com.sun.star.uno.Enum; 28cdf0e10cSrcweir import com.sun.star.uno.Type; 29cdf0e10cSrcweir import com.sun.star.uno.TypeClass; 30cdf0e10cSrcweir import com.sun.star.uno.XInterface; 31cdf0e10cSrcweir import java.lang.reflect.Array; 32cdf0e10cSrcweir 33cdf0e10cSrcweir final class TestAny { test(XTransport transport, boolean createTypes)34cdf0e10cSrcweir public static boolean test(XTransport transport, boolean createTypes) { 35cdf0e10cSrcweir boolean success = true; 36cdf0e10cSrcweir 37cdf0e10cSrcweir // Sanity check for com.sun.star.uno.Type: 38cdf0e10cSrcweir success &= testType(void.class, TypeClass.VOID, "void"); 39cdf0e10cSrcweir success &= testType(boolean.class, TypeClass.BOOLEAN, "boolean"); 40cdf0e10cSrcweir success &= testType(byte.class, TypeClass.BYTE, "byte"); 41cdf0e10cSrcweir success &= testType(short.class, TypeClass.SHORT, "short"); 42cdf0e10cSrcweir success &= testType(int.class, TypeClass.LONG, "long"); 43cdf0e10cSrcweir success &= testType(long.class, TypeClass.HYPER, "hyper"); 44cdf0e10cSrcweir success &= testType(float.class, TypeClass.FLOAT, "float"); 45cdf0e10cSrcweir success &= testType(double.class, TypeClass.DOUBLE, "double"); 46cdf0e10cSrcweir success &= testType(char.class, TypeClass.CHAR, "char"); 47cdf0e10cSrcweir success &= testType(String.class, TypeClass.STRING, "string"); 48cdf0e10cSrcweir success &= testType(Type.class, TypeClass.TYPE, "type"); 49cdf0e10cSrcweir success &= testType(Any.class, TypeClass.ANY, "any"); 50cdf0e10cSrcweir success &= testType(boolean[].class, TypeClass.SEQUENCE, "[]boolean"); 51cdf0e10cSrcweir success &= testType(byte[].class, TypeClass.SEQUENCE, "[]byte"); 52cdf0e10cSrcweir success &= testType(short[].class, TypeClass.SEQUENCE, "[]short"); 53cdf0e10cSrcweir success &= testType(int[].class, TypeClass.SEQUENCE, "[]long"); 54cdf0e10cSrcweir success &= testType(long[].class, TypeClass.SEQUENCE, "[]hyper"); 55cdf0e10cSrcweir success &= testType(float[].class, TypeClass.SEQUENCE, "[]float"); 56cdf0e10cSrcweir success &= testType(double[].class, TypeClass.SEQUENCE, "[]double"); 57cdf0e10cSrcweir success &= testType(char[].class, TypeClass.SEQUENCE, "[]char"); 58cdf0e10cSrcweir success &= testType(String[].class, TypeClass.SEQUENCE, "[]string"); 59cdf0e10cSrcweir success &= testType(Type[].class, TypeClass.SEQUENCE, "[]type"); 60cdf0e10cSrcweir success &= testType(Any[].class, TypeClass.SEQUENCE, "[]any"); 61cdf0e10cSrcweir success &= testType(Enum1[].class, TypeClass.SEQUENCE, 62cdf0e10cSrcweir "[]" + Enum1.class.getName()); 63cdf0e10cSrcweir success &= testType(BaseStruct[].class, TypeClass.SEQUENCE, 64cdf0e10cSrcweir "[]" + BaseStruct.class.getName()); 65cdf0e10cSrcweir success &= testType(DerivedStruct[].class, TypeClass.SEQUENCE, 66cdf0e10cSrcweir "[]" + DerivedStruct.class.getName()); 67cdf0e10cSrcweir success &= testType(XInterface[].class, TypeClass.SEQUENCE, 68cdf0e10cSrcweir "[]" + XInterface.class.getName()); 69cdf0e10cSrcweir success &= testType(BaseInterface[].class, TypeClass.SEQUENCE, 70cdf0e10cSrcweir "[]" + BaseInterface.class.getName()); 71cdf0e10cSrcweir success &= testType(DerivedInterface[].class, TypeClass.SEQUENCE, 72cdf0e10cSrcweir "[]" + DerivedInterface.class.getName()); 73cdf0e10cSrcweir success &= testType(boolean[][].class, TypeClass.SEQUENCE, 74cdf0e10cSrcweir "[][]boolean"); 75cdf0e10cSrcweir success &= testType(byte[][].class, TypeClass.SEQUENCE, "[][]byte"); 76cdf0e10cSrcweir success &= testType(short[][].class, TypeClass.SEQUENCE, "[][]short"); 77cdf0e10cSrcweir success &= testType(int[][].class, TypeClass.SEQUENCE, "[][]long"); 78cdf0e10cSrcweir success &= testType(long[][].class, TypeClass.SEQUENCE, "[][]hyper"); 79cdf0e10cSrcweir success &= testType(float[][].class, TypeClass.SEQUENCE, "[][]float"); 80cdf0e10cSrcweir success &= testType(double[][].class, TypeClass.SEQUENCE, "[][]double"); 81cdf0e10cSrcweir success &= testType(char[][].class, TypeClass.SEQUENCE, "[][]char"); 82cdf0e10cSrcweir success &= testType(String[][].class, TypeClass.SEQUENCE, "[][]string"); 83cdf0e10cSrcweir success &= testType(Type[][].class, TypeClass.SEQUENCE, "[][]type"); 84cdf0e10cSrcweir success &= testType(Any[][].class, TypeClass.SEQUENCE, "[][]any"); 85cdf0e10cSrcweir success &= testType(Enum1[][].class, TypeClass.SEQUENCE, 86cdf0e10cSrcweir "[][]" + Enum1.class.getName()); 87cdf0e10cSrcweir success &= testType(BaseStruct[][].class, TypeClass.SEQUENCE, 88cdf0e10cSrcweir "[][]" + BaseStruct.class.getName()); 89cdf0e10cSrcweir success &= testType(DerivedStruct[][].class, TypeClass.SEQUENCE, 90cdf0e10cSrcweir "[][]" + DerivedStruct.class.getName()); 91cdf0e10cSrcweir success &= testType(XInterface[][].class, TypeClass.SEQUENCE, 92cdf0e10cSrcweir "[][]" + XInterface.class.getName()); 93cdf0e10cSrcweir success &= testType(BaseInterface[][].class, TypeClass.SEQUENCE, 94cdf0e10cSrcweir "[][]" + BaseInterface.class.getName()); 95cdf0e10cSrcweir success &= testType(DerivedInterface[][].class, TypeClass.SEQUENCE, 96cdf0e10cSrcweir "[][]" + DerivedInterface.class.getName()); 97cdf0e10cSrcweir success &= testType(Enum1.class, TypeClass.ENUM, Enum1.class.getName()); 98cdf0e10cSrcweir success &= testType(BaseStruct.class, TypeClass.STRUCT, 99cdf0e10cSrcweir BaseStruct.class.getName()); 100cdf0e10cSrcweir success &= testType(DerivedStruct.class, TypeClass.STRUCT, 101cdf0e10cSrcweir DerivedStruct.class.getName()); 102cdf0e10cSrcweir success &= testType(com.sun.star.uno.Exception.class, 103cdf0e10cSrcweir TypeClass.EXCEPTION, 104cdf0e10cSrcweir com.sun.star.uno.Exception.class.getName()); 105cdf0e10cSrcweir success &= testType(com.sun.star.uno.RuntimeException.class, 106cdf0e10cSrcweir TypeClass.EXCEPTION, 107cdf0e10cSrcweir com.sun.star.uno.RuntimeException.class.getName()); 108cdf0e10cSrcweir success &= testType(XInterface.class, TypeClass.INTERFACE, 109cdf0e10cSrcweir XInterface.class.getName()); 110cdf0e10cSrcweir success &= testType(BaseInterface.class, TypeClass.INTERFACE, 111cdf0e10cSrcweir BaseInterface.class.getName()); 112cdf0e10cSrcweir success &= testType(DerivedInterface.class, TypeClass.INTERFACE, 113cdf0e10cSrcweir DerivedInterface.class.getName()); 114cdf0e10cSrcweir 115cdf0e10cSrcweir // VOID: 116cdf0e10cSrcweir success &= testMapAny(transport, Any.VOID, new CompareBoxed()); 117cdf0e10cSrcweir 118cdf0e10cSrcweir // BOOLEAN: 119cdf0e10cSrcweir success &= testMapAny(transport, Boolean.FALSE, new CompareBoxed()); 120cdf0e10cSrcweir success &= testMapAny(transport, Boolean.TRUE, new CompareBoxed()); 121cdf0e10cSrcweir success &= testMapAny(transport, 122cdf0e10cSrcweir new Any(Type.BOOLEAN, Boolean.FALSE), 123cdf0e10cSrcweir new CompareUnboxed()); 124cdf0e10cSrcweir success &= testMapAny(transport, 125cdf0e10cSrcweir new Any(Type.BOOLEAN, Boolean.TRUE), 126cdf0e10cSrcweir new CompareUnboxed()); 127cdf0e10cSrcweir 128cdf0e10cSrcweir // BYTE: 129cdf0e10cSrcweir success &= testMapAny(transport, new Byte((byte) -128), 130cdf0e10cSrcweir new CompareBoxed()); 131cdf0e10cSrcweir success &= testMapAny(transport, new Byte((byte) 0), 132cdf0e10cSrcweir new CompareBoxed()); 133cdf0e10cSrcweir success &= testMapAny(transport, new Byte((byte) 127), 134cdf0e10cSrcweir new CompareBoxed()); 135cdf0e10cSrcweir success &= testMapAny(transport, 136cdf0e10cSrcweir new Any(Type.BYTE, new Byte((byte) -128)), 137cdf0e10cSrcweir new CompareUnboxed()); 138cdf0e10cSrcweir success &= testMapAny(transport, 139cdf0e10cSrcweir new Any(Type.BYTE, new Byte((byte) 0)), 140cdf0e10cSrcweir new CompareUnboxed()); 141cdf0e10cSrcweir success &= testMapAny(transport, 142cdf0e10cSrcweir new Any(Type.BYTE, new Byte((byte) 127)), 143cdf0e10cSrcweir new CompareUnboxed()); 144cdf0e10cSrcweir 145cdf0e10cSrcweir // SHORT: 146cdf0e10cSrcweir success &= testMapAny(transport, new Short((short) -32768), 147cdf0e10cSrcweir new CompareBoxed()); 148cdf0e10cSrcweir success &= testMapAny(transport, new Short((short) 0), 149cdf0e10cSrcweir new CompareBoxed()); 150cdf0e10cSrcweir success &= testMapAny(transport, new Short((short) 32767), 151cdf0e10cSrcweir new CompareBoxed()); 152cdf0e10cSrcweir success &= testMapAny(transport, 153cdf0e10cSrcweir new Any(Type.SHORT, 154cdf0e10cSrcweir new Short((short) -32768)), 155cdf0e10cSrcweir new CompareUnboxed()); 156cdf0e10cSrcweir success &= testMapAny(transport, 157cdf0e10cSrcweir new Any(Type.SHORT, new Short((short) 0)), 158cdf0e10cSrcweir new CompareUnboxed()); 159cdf0e10cSrcweir success &= testMapAny(transport, 160cdf0e10cSrcweir new Any(Type.SHORT, new Short((short) 32767)), 161cdf0e10cSrcweir new CompareUnboxed()); 162cdf0e10cSrcweir 163cdf0e10cSrcweir // UNSIGNED SHORT: 164cdf0e10cSrcweir success &= testMapAny(transport, 165cdf0e10cSrcweir new Any(Type.UNSIGNED_SHORT, 166cdf0e10cSrcweir new Short((short) 0)), 167cdf0e10cSrcweir new CompareBoxed()); 168cdf0e10cSrcweir success &= testMapAny(transport, 169cdf0e10cSrcweir new Any(Type.UNSIGNED_SHORT, 170cdf0e10cSrcweir new Short((short) -32768)), 171cdf0e10cSrcweir new CompareBoxed()); 172cdf0e10cSrcweir 173cdf0e10cSrcweir // LONG: 174cdf0e10cSrcweir success &= testMapAny(transport, new Integer(-2147483648), 175cdf0e10cSrcweir new CompareBoxed()); 176cdf0e10cSrcweir success &= testMapAny(transport, new Integer(0), 177cdf0e10cSrcweir new CompareBoxed()); 178cdf0e10cSrcweir success &= testMapAny(transport, new Integer(2147483647), 179cdf0e10cSrcweir new CompareBoxed()); 180cdf0e10cSrcweir success &= testMapAny(transport, 181cdf0e10cSrcweir new Any(Type.LONG, new Integer(-2147483648)), 182cdf0e10cSrcweir new CompareUnboxed()); 183cdf0e10cSrcweir success &= testMapAny(transport, 184cdf0e10cSrcweir new Any(Type.LONG, new Integer(0)), 185cdf0e10cSrcweir new CompareUnboxed()); 186cdf0e10cSrcweir success &= testMapAny(transport, 187cdf0e10cSrcweir new Any(Type.LONG, new Integer(2147483647)), 188cdf0e10cSrcweir new CompareUnboxed()); 189cdf0e10cSrcweir 190cdf0e10cSrcweir // UNSIGNED LONG: 191cdf0e10cSrcweir success &= testMapAny(transport, 192cdf0e10cSrcweir new Any(Type.UNSIGNED_LONG, new Integer(0)), 193cdf0e10cSrcweir new CompareBoxed()); 194cdf0e10cSrcweir success &= testMapAny(transport, 195cdf0e10cSrcweir new Any(Type.UNSIGNED_LONG, 196cdf0e10cSrcweir new Integer(-2147483648)), 197cdf0e10cSrcweir new CompareBoxed()); 198cdf0e10cSrcweir 199cdf0e10cSrcweir // HYPER: 200cdf0e10cSrcweir success &= testMapAny(transport, new Long(-9223372036854775808L), 201cdf0e10cSrcweir new CompareBoxed()); 202cdf0e10cSrcweir success &= testMapAny(transport, new Long(0L), new CompareBoxed()); 203cdf0e10cSrcweir success &= testMapAny(transport, new Long(9223372036854775807L), 204cdf0e10cSrcweir new CompareBoxed()); 205cdf0e10cSrcweir success &= testMapAny(transport, 206cdf0e10cSrcweir new Any(Type.HYPER, 207cdf0e10cSrcweir new Long(-9223372036854775808L)), 208cdf0e10cSrcweir new CompareUnboxed()); 209cdf0e10cSrcweir success &= testMapAny(transport, new Any(Type.HYPER, new Long(0L)), 210cdf0e10cSrcweir new CompareUnboxed()); 211cdf0e10cSrcweir success &= testMapAny(transport, 212cdf0e10cSrcweir new Any(Type.HYPER, 213cdf0e10cSrcweir new Long(9223372036854775807L)), 214cdf0e10cSrcweir new CompareUnboxed()); 215cdf0e10cSrcweir 216cdf0e10cSrcweir // UNSIGNED HYPER: 217cdf0e10cSrcweir success &= testMapAny(transport, 218cdf0e10cSrcweir new Any(Type.UNSIGNED_HYPER, new Long(0L)), 219cdf0e10cSrcweir new CompareBoxed()); 220cdf0e10cSrcweir success &= testMapAny(transport, 221cdf0e10cSrcweir new Any(Type.UNSIGNED_HYPER, 222cdf0e10cSrcweir new Long(-9223372036854775808L)), 223cdf0e10cSrcweir new CompareBoxed()); 224cdf0e10cSrcweir 225cdf0e10cSrcweir // FLOAT: 226cdf0e10cSrcweir success &= testMapAny(transport, new Float(Float.NEGATIVE_INFINITY), 227cdf0e10cSrcweir new CompareBoxed()); 228cdf0e10cSrcweir success &= testMapAny(transport, new Float(Float.MIN_VALUE), 229cdf0e10cSrcweir new CompareBoxed()); 230cdf0e10cSrcweir success &= testMapAny(transport, new Float(-0.0f), 231cdf0e10cSrcweir new CompareBoxed()); 232cdf0e10cSrcweir success &= testMapAny(transport, new Float(0.0f), 233cdf0e10cSrcweir new CompareBoxed()); 234cdf0e10cSrcweir success &= testMapAny(transport, new Float(Float.MAX_VALUE), 235cdf0e10cSrcweir new CompareBoxed()); 236cdf0e10cSrcweir success &= testMapAny(transport, new Float(Float.POSITIVE_INFINITY), 237cdf0e10cSrcweir new CompareBoxed()); 238cdf0e10cSrcweir success &= testMapAny(transport, new Float(Float.NaN), 239cdf0e10cSrcweir new CompareBoxed()); 240cdf0e10cSrcweir success &= testMapAny(transport, 241cdf0e10cSrcweir new Any(Type.FLOAT, 242cdf0e10cSrcweir new Float(Float.NEGATIVE_INFINITY)), 243cdf0e10cSrcweir new CompareUnboxed()); 244cdf0e10cSrcweir success &= testMapAny(transport, 245cdf0e10cSrcweir new Any(Type.FLOAT, 246cdf0e10cSrcweir new Float(Float.MIN_VALUE)), 247cdf0e10cSrcweir new CompareUnboxed()); 248cdf0e10cSrcweir success &= testMapAny(transport, 249cdf0e10cSrcweir new Any(Type.FLOAT, new Float(-0.0f)), 250cdf0e10cSrcweir new CompareUnboxed()); 251cdf0e10cSrcweir success &= testMapAny(transport, 252cdf0e10cSrcweir new Any(Type.FLOAT, new Float(0.0f)), 253cdf0e10cSrcweir new CompareUnboxed()); 254cdf0e10cSrcweir success &= testMapAny(transport, 255cdf0e10cSrcweir new Any(Type.FLOAT, 256cdf0e10cSrcweir new Float(Float.MAX_VALUE)), 257cdf0e10cSrcweir new CompareUnboxed()); 258cdf0e10cSrcweir success &= testMapAny(transport, 259cdf0e10cSrcweir new Any(Type.FLOAT, 260cdf0e10cSrcweir new Float(Float.POSITIVE_INFINITY)), 261cdf0e10cSrcweir new CompareUnboxed()); 262cdf0e10cSrcweir success &= testMapAny(transport, 263cdf0e10cSrcweir new Any(Type.FLOAT, new Float(Float.NaN)), 264cdf0e10cSrcweir new CompareUnboxed()); 265cdf0e10cSrcweir 266cdf0e10cSrcweir // DOUBLE: 267cdf0e10cSrcweir success &= testMapAny(transport, 268cdf0e10cSrcweir new Double(Double.NEGATIVE_INFINITY), 269cdf0e10cSrcweir new CompareBoxed()); 270cdf0e10cSrcweir success &= testMapAny(transport, new Double(Double.MIN_VALUE), 271cdf0e10cSrcweir new CompareBoxed()); 272cdf0e10cSrcweir success &= testMapAny(transport, new Double(-0.0f), 273cdf0e10cSrcweir new CompareBoxed()); 274cdf0e10cSrcweir success &= testMapAny(transport, new Double(0.0f), 275cdf0e10cSrcweir new CompareBoxed()); 276cdf0e10cSrcweir success &= testMapAny(transport, new Double(Double.MAX_VALUE), 277cdf0e10cSrcweir new CompareBoxed()); 278cdf0e10cSrcweir success &= testMapAny(transport, 279cdf0e10cSrcweir new Double(Double.POSITIVE_INFINITY), 280cdf0e10cSrcweir new CompareBoxed()); 281cdf0e10cSrcweir success &= testMapAny(transport, new Double(Double.NaN), 282cdf0e10cSrcweir new CompareBoxed()); 283cdf0e10cSrcweir success &= testMapAny(transport, 284cdf0e10cSrcweir new Any(Type.DOUBLE, 285cdf0e10cSrcweir new Double(Double.NEGATIVE_INFINITY)), 286cdf0e10cSrcweir new CompareUnboxed()); 287cdf0e10cSrcweir success &= testMapAny(transport, 288cdf0e10cSrcweir new Any(Type.DOUBLE, 289cdf0e10cSrcweir new Double(Double.MIN_VALUE)), 290cdf0e10cSrcweir new CompareUnboxed()); 291cdf0e10cSrcweir success &= testMapAny(transport, 292cdf0e10cSrcweir new Any(Type.DOUBLE, new Double(-0.0)), 293cdf0e10cSrcweir new CompareUnboxed()); 294cdf0e10cSrcweir success &= testMapAny(transport, 295cdf0e10cSrcweir new Any(Type.DOUBLE, new Double(0.0)), 296cdf0e10cSrcweir new CompareUnboxed()); 297cdf0e10cSrcweir success &= testMapAny(transport, 298cdf0e10cSrcweir new Any(Type.DOUBLE, 299cdf0e10cSrcweir new Double(Double.MAX_VALUE)), 300cdf0e10cSrcweir new CompareUnboxed()); 301cdf0e10cSrcweir success &= testMapAny(transport, 302cdf0e10cSrcweir new Any(Type.DOUBLE, 303cdf0e10cSrcweir new Double(Double.POSITIVE_INFINITY)), 304cdf0e10cSrcweir new CompareUnboxed()); 305cdf0e10cSrcweir success &= testMapAny(transport, 306cdf0e10cSrcweir new Any(Type.DOUBLE, new Double(Double.NaN)), 307cdf0e10cSrcweir new CompareUnboxed()); 308cdf0e10cSrcweir 309cdf0e10cSrcweir // CHAR: 310cdf0e10cSrcweir success &= testMapAny(transport, new Character('\u0000'), 311cdf0e10cSrcweir new CompareBoxed()); 312cdf0e10cSrcweir success &= testMapAny(transport, new Character('\uDBFF'), 313cdf0e10cSrcweir new CompareBoxed()); 314cdf0e10cSrcweir success &= testMapAny(transport, new Character('\uFFFD'), 315cdf0e10cSrcweir new CompareBoxed()); 316cdf0e10cSrcweir success &= testMapAny(transport, 317cdf0e10cSrcweir new Any(Type.CHAR, new Character('\u0000')), 318cdf0e10cSrcweir new CompareUnboxed()); 319cdf0e10cSrcweir success &= testMapAny(transport, 320cdf0e10cSrcweir new Any(Type.CHAR, new Character('\uDBFF')), 321cdf0e10cSrcweir new CompareUnboxed()); 322cdf0e10cSrcweir success &= testMapAny(transport, 323cdf0e10cSrcweir new Any(Type.CHAR, new Character('\uFFFD')), 324cdf0e10cSrcweir new CompareUnboxed()); 325cdf0e10cSrcweir 326cdf0e10cSrcweir // STRING: 327cdf0e10cSrcweir success &= testMapAny(transport, "", new CompareBoxed()); 328cdf0e10cSrcweir success &= testMapAny(transport, "\uD800\uDC00", 329cdf0e10cSrcweir new CompareBoxed()); 330cdf0e10cSrcweir success &= testMapAny(transport, "Test", new CompareBoxed()); 331cdf0e10cSrcweir success &= testMapAny(transport, new Any(Type.STRING, ""), 332cdf0e10cSrcweir new CompareUnboxed()); 333cdf0e10cSrcweir success &= testMapAny(transport, 334cdf0e10cSrcweir new Any(Type.STRING, "\uD800\uDC00"), 335cdf0e10cSrcweir new CompareUnboxed()); 336cdf0e10cSrcweir success &= testMapAny(transport, new Any(Type.STRING, "Test"), 337cdf0e10cSrcweir new CompareUnboxed()); 338cdf0e10cSrcweir 339cdf0e10cSrcweir // TYPE: 340cdf0e10cSrcweir success &= testMapAny(transport, Type.VOID, new CompareBoxed()); 341cdf0e10cSrcweir success &= testMapAny(transport, Type.BOOLEAN, new CompareBoxed()); 342cdf0e10cSrcweir success &= testMapAny(transport, Type.BYTE, new CompareBoxed()); 343cdf0e10cSrcweir success &= testMapAny(transport, Type.SHORT, new CompareBoxed()); 344cdf0e10cSrcweir success &= testMapAny(transport, Type.UNSIGNED_SHORT, 345cdf0e10cSrcweir new CompareBoxed()); 346cdf0e10cSrcweir success &= testMapAny(transport, Type.LONG, new CompareBoxed()); 347cdf0e10cSrcweir success &= testMapAny(transport, Type.UNSIGNED_LONG, 348cdf0e10cSrcweir new CompareBoxed()); 349cdf0e10cSrcweir success &= testMapAny(transport, Type.HYPER, new CompareBoxed()); 350cdf0e10cSrcweir success &= testMapAny(transport, Type.UNSIGNED_HYPER, 351cdf0e10cSrcweir new CompareBoxed()); 352cdf0e10cSrcweir success &= testMapAny(transport, Type.FLOAT, new CompareBoxed()); 353cdf0e10cSrcweir success &= testMapAny(transport, Type.DOUBLE, new CompareBoxed()); 354cdf0e10cSrcweir success &= testMapAny(transport, Type.CHAR, new CompareBoxed()); 355cdf0e10cSrcweir success &= testMapAny(transport, Type.STRING, new CompareBoxed()); 356cdf0e10cSrcweir success &= testMapAny(transport, Type.TYPE, new CompareBoxed()); 357cdf0e10cSrcweir success &= testMapAny(transport, Type.ANY, new CompareBoxed()); 358cdf0e10cSrcweir success &= testMapAny(transport, 359cdf0e10cSrcweir new Type("[]boolean", TypeClass.SEQUENCE), 360cdf0e10cSrcweir new CompareBoxed()); 361cdf0e10cSrcweir success &= testMapAny(transport, 362cdf0e10cSrcweir new Type("[]byte", TypeClass.SEQUENCE), 363cdf0e10cSrcweir new CompareBoxed()); 364cdf0e10cSrcweir success &= testMapAny(transport, 365cdf0e10cSrcweir new Type("[]short", TypeClass.SEQUENCE), 366cdf0e10cSrcweir new CompareBoxed()); 367cdf0e10cSrcweir success &= testMapAny(transport, 368cdf0e10cSrcweir new Type("[]unsigned short", 369cdf0e10cSrcweir TypeClass.SEQUENCE), 370cdf0e10cSrcweir new CompareBoxed()); 371cdf0e10cSrcweir success &= testMapAny(transport, 372cdf0e10cSrcweir new Type("[]long", TypeClass.SEQUENCE), 373cdf0e10cSrcweir new CompareBoxed()); 374cdf0e10cSrcweir success &= testMapAny(transport, 375cdf0e10cSrcweir new Type("[]unsigned long", 376cdf0e10cSrcweir TypeClass.SEQUENCE), 377cdf0e10cSrcweir new CompareBoxed()); 378cdf0e10cSrcweir success &= testMapAny(transport, 379cdf0e10cSrcweir new Type("[]hyper", TypeClass.SEQUENCE), 380cdf0e10cSrcweir new CompareBoxed()); 381cdf0e10cSrcweir success &= testMapAny(transport, 382cdf0e10cSrcweir new Type("[]unsigned hyper", 383cdf0e10cSrcweir TypeClass.SEQUENCE), 384cdf0e10cSrcweir new CompareBoxed()); 385cdf0e10cSrcweir success &= testMapAny(transport, 386cdf0e10cSrcweir new Type("[]float", TypeClass.SEQUENCE), 387cdf0e10cSrcweir new CompareBoxed()); 388cdf0e10cSrcweir success &= testMapAny(transport, 389cdf0e10cSrcweir new Type("[]double", TypeClass.SEQUENCE), 390cdf0e10cSrcweir new CompareBoxed()); 391cdf0e10cSrcweir success &= testMapAny(transport, 392cdf0e10cSrcweir new Type("[]char", TypeClass.SEQUENCE), 393cdf0e10cSrcweir new CompareBoxed()); 394cdf0e10cSrcweir success &= testMapAny(transport, 395cdf0e10cSrcweir new Type("[]string", TypeClass.SEQUENCE), 396cdf0e10cSrcweir new CompareBoxed()); 397cdf0e10cSrcweir success &= testMapAny(transport, 398cdf0e10cSrcweir new Type("[]type", TypeClass.SEQUENCE), 399cdf0e10cSrcweir new CompareBoxed()); 400cdf0e10cSrcweir success &= testMapAny(transport, 401cdf0e10cSrcweir new Type("[]any", TypeClass.SEQUENCE), 402cdf0e10cSrcweir new CompareBoxed()); 403cdf0e10cSrcweir if (createTypes) { 404cdf0e10cSrcweir success &= testMapAny(transport, 405cdf0e10cSrcweir new Type("[]" + Enum1.class.getName(), 406cdf0e10cSrcweir TypeClass.SEQUENCE), 407cdf0e10cSrcweir new CompareBoxed()); 408cdf0e10cSrcweir success &= testMapAny(transport, 409cdf0e10cSrcweir new Type("[]" + BaseStruct.class.getName(), 410cdf0e10cSrcweir TypeClass.SEQUENCE), 411cdf0e10cSrcweir new CompareBoxed()); 412cdf0e10cSrcweir success &= testMapAny(transport, 413cdf0e10cSrcweir new Type("[]" + DerivedStruct.class.getName(), 414cdf0e10cSrcweir TypeClass.SEQUENCE), 415cdf0e10cSrcweir new CompareBoxed()); 416cdf0e10cSrcweir } 417cdf0e10cSrcweir success &= testMapAny(transport, 418cdf0e10cSrcweir new Type("[]" + XInterface.class.getName(), 419cdf0e10cSrcweir TypeClass.SEQUENCE), 420cdf0e10cSrcweir new CompareBoxed()); 421cdf0e10cSrcweir success &= testMapAny(transport, 422cdf0e10cSrcweir new Type("[]" + BaseInterface.class.getName(), 423cdf0e10cSrcweir TypeClass.SEQUENCE), 424cdf0e10cSrcweir new CompareBoxed()); 425cdf0e10cSrcweir success &= testMapAny(transport, 426cdf0e10cSrcweir new Type("[]" 427cdf0e10cSrcweir + DerivedInterface.class.getName(), 428cdf0e10cSrcweir TypeClass.SEQUENCE), 429cdf0e10cSrcweir new CompareBoxed()); 430cdf0e10cSrcweir success &= testMapAny(transport, 431cdf0e10cSrcweir new Type("[][]boolean", TypeClass.SEQUENCE), 432cdf0e10cSrcweir new CompareBoxed()); 433cdf0e10cSrcweir success &= testMapAny(transport, 434cdf0e10cSrcweir new Type("[][]byte", TypeClass.SEQUENCE), 435cdf0e10cSrcweir new CompareBoxed()); 436cdf0e10cSrcweir success &= testMapAny(transport, 437cdf0e10cSrcweir new Type("[][]short", TypeClass.SEQUENCE), 438cdf0e10cSrcweir new CompareBoxed()); 439cdf0e10cSrcweir success &= testMapAny(transport, 440cdf0e10cSrcweir new Type("[][]unsigned short", 441cdf0e10cSrcweir TypeClass.SEQUENCE), 442cdf0e10cSrcweir new CompareBoxed()); 443cdf0e10cSrcweir success &= testMapAny(transport, 444cdf0e10cSrcweir new Type("[][]long", TypeClass.SEQUENCE), 445cdf0e10cSrcweir new CompareBoxed()); 446cdf0e10cSrcweir success &= testMapAny(transport, 447cdf0e10cSrcweir new Type("[][]unsigned long", 448cdf0e10cSrcweir TypeClass.SEQUENCE), 449cdf0e10cSrcweir new CompareBoxed()); 450cdf0e10cSrcweir success &= testMapAny(transport, 451cdf0e10cSrcweir new Type("[][]hyper", TypeClass.SEQUENCE), 452cdf0e10cSrcweir new CompareBoxed()); 453cdf0e10cSrcweir success &= testMapAny(transport, 454cdf0e10cSrcweir new Type("[][]unsigned hyper", 455cdf0e10cSrcweir TypeClass.SEQUENCE), 456cdf0e10cSrcweir new CompareBoxed()); 457cdf0e10cSrcweir success &= testMapAny(transport, 458cdf0e10cSrcweir new Type("[][]float", TypeClass.SEQUENCE), 459cdf0e10cSrcweir new CompareBoxed()); 460cdf0e10cSrcweir success &= testMapAny(transport, 461cdf0e10cSrcweir new Type("[][]double", TypeClass.SEQUENCE), 462cdf0e10cSrcweir new CompareBoxed()); 463cdf0e10cSrcweir success &= testMapAny(transport, 464cdf0e10cSrcweir new Type("[][]char", TypeClass.SEQUENCE), 465cdf0e10cSrcweir new CompareBoxed()); 466cdf0e10cSrcweir success &= testMapAny(transport, 467cdf0e10cSrcweir new Type("[][]string", TypeClass.SEQUENCE), 468cdf0e10cSrcweir new CompareBoxed()); 469cdf0e10cSrcweir success &= testMapAny(transport, 470cdf0e10cSrcweir new Type("[][]type", TypeClass.SEQUENCE), 471cdf0e10cSrcweir new CompareBoxed()); 472cdf0e10cSrcweir success &= testMapAny(transport, 473cdf0e10cSrcweir new Type("[][]any", TypeClass.SEQUENCE), 474cdf0e10cSrcweir new CompareBoxed()); 475cdf0e10cSrcweir if (createTypes) { 476cdf0e10cSrcweir success &= testMapAny(transport, 477cdf0e10cSrcweir new Type("[][]" + Enum1.class.getName(), 478cdf0e10cSrcweir TypeClass.SEQUENCE), 479cdf0e10cSrcweir new CompareBoxed()); 480cdf0e10cSrcweir success &= testMapAny(transport, 481cdf0e10cSrcweir new Type("[][]" + BaseStruct.class.getName(), 482cdf0e10cSrcweir TypeClass.SEQUENCE), 483cdf0e10cSrcweir new CompareBoxed()); 484cdf0e10cSrcweir success &= testMapAny(transport, 485cdf0e10cSrcweir new Type("[][]" 486cdf0e10cSrcweir + DerivedStruct.class.getName(), 487cdf0e10cSrcweir TypeClass.SEQUENCE), 488cdf0e10cSrcweir new CompareBoxed()); 489cdf0e10cSrcweir } 490cdf0e10cSrcweir success &= testMapAny(transport, 491cdf0e10cSrcweir new Type("[][]" + XInterface.class.getName(), 492cdf0e10cSrcweir TypeClass.SEQUENCE), 493cdf0e10cSrcweir new CompareBoxed()); 494cdf0e10cSrcweir success &= testMapAny(transport, 495cdf0e10cSrcweir new Type("[][]" 496cdf0e10cSrcweir + BaseInterface.class.getName(), 497cdf0e10cSrcweir TypeClass.SEQUENCE), 498cdf0e10cSrcweir new CompareBoxed()); 499cdf0e10cSrcweir success &= testMapAny(transport, 500cdf0e10cSrcweir new Type("[][]" 501cdf0e10cSrcweir + DerivedInterface.class.getName(), 502cdf0e10cSrcweir TypeClass.SEQUENCE), 503cdf0e10cSrcweir new CompareBoxed()); 504cdf0e10cSrcweir if (createTypes) { 505cdf0e10cSrcweir success &= testMapAny(transport, new Type(Enum1.class.getName(), 506cdf0e10cSrcweir TypeClass.ENUM), 507cdf0e10cSrcweir new CompareBoxed()); 508cdf0e10cSrcweir success &= testMapAny(transport, 509cdf0e10cSrcweir new Type(BaseStruct.class.getName(), 510cdf0e10cSrcweir TypeClass.STRUCT), 511cdf0e10cSrcweir new CompareBoxed()); 512cdf0e10cSrcweir success &= testMapAny(transport, 513cdf0e10cSrcweir new Type(DerivedStruct.class.getName(), 514cdf0e10cSrcweir TypeClass.STRUCT), 515cdf0e10cSrcweir new CompareBoxed()); 516cdf0e10cSrcweir } 517cdf0e10cSrcweir success &= testMapAny(transport, 518cdf0e10cSrcweir new Type( 519cdf0e10cSrcweir com.sun.star.uno.Exception.class. 520cdf0e10cSrcweir getName(), 521cdf0e10cSrcweir TypeClass.EXCEPTION), 522cdf0e10cSrcweir new CompareBoxed()); 523cdf0e10cSrcweir if (createTypes) { 524cdf0e10cSrcweir success &= testMapAny(transport, 525cdf0e10cSrcweir new Type(BaseException.class.getName(), 526cdf0e10cSrcweir TypeClass.EXCEPTION), 527cdf0e10cSrcweir new CompareBoxed()); 528cdf0e10cSrcweir success &= testMapAny(transport, 529cdf0e10cSrcweir new Type(DerivedException.class.getName(), 530cdf0e10cSrcweir TypeClass.EXCEPTION), 531cdf0e10cSrcweir new CompareBoxed()); 532cdf0e10cSrcweir } 533cdf0e10cSrcweir success &= testMapAny(transport, 534cdf0e10cSrcweir new Type( 535cdf0e10cSrcweir com.sun.star.uno.RuntimeException.class. 536cdf0e10cSrcweir getName(), 537cdf0e10cSrcweir TypeClass.EXCEPTION), 538cdf0e10cSrcweir new CompareBoxed()); 539cdf0e10cSrcweir if (createTypes) { 540cdf0e10cSrcweir success &= testMapAny(transport, 541cdf0e10cSrcweir new Type( 542cdf0e10cSrcweir BaseRuntimeException.class.getName(), 543cdf0e10cSrcweir TypeClass.EXCEPTION), 544cdf0e10cSrcweir new CompareBoxed()); 545cdf0e10cSrcweir success &= testMapAny(transport, 546cdf0e10cSrcweir new Type( 547cdf0e10cSrcweir DerivedRuntimeException.class. 548cdf0e10cSrcweir getName(), 549cdf0e10cSrcweir TypeClass.EXCEPTION), 550cdf0e10cSrcweir new CompareBoxed()); 551cdf0e10cSrcweir } 552cdf0e10cSrcweir success &= testMapAny(transport, 553cdf0e10cSrcweir new Type(XInterface.class.getName(), 554cdf0e10cSrcweir TypeClass.INTERFACE), 555cdf0e10cSrcweir new CompareBoxed()); 556cdf0e10cSrcweir success &= testMapAny(transport, 557cdf0e10cSrcweir new Type(BaseInterface.class.getName(), 558cdf0e10cSrcweir TypeClass.INTERFACE), 559cdf0e10cSrcweir new CompareBoxed()); 560cdf0e10cSrcweir success &= testMapAny(transport, 561cdf0e10cSrcweir new Type(DerivedInterface.class.getName(), 562cdf0e10cSrcweir TypeClass.INTERFACE), 563cdf0e10cSrcweir new CompareBoxed()); 564cdf0e10cSrcweir success &= testMapAny(transport, new Any(Type.TYPE, Type.VOID), 565cdf0e10cSrcweir new CompareUnboxed()); 566cdf0e10cSrcweir success &= testMapAny(transport, new Any(Type.TYPE, Type.BOOLEAN), 567cdf0e10cSrcweir new CompareUnboxed()); 568cdf0e10cSrcweir success &= testMapAny(transport, new Any(Type.TYPE, Type.BYTE), 569cdf0e10cSrcweir new CompareUnboxed()); 570cdf0e10cSrcweir success &= testMapAny(transport, new Any(Type.TYPE, Type.SHORT), 571cdf0e10cSrcweir new CompareUnboxed()); 572cdf0e10cSrcweir success &= testMapAny(transport, 573cdf0e10cSrcweir new Any(Type.TYPE, Type.UNSIGNED_SHORT), 574cdf0e10cSrcweir new CompareUnboxed()); 575cdf0e10cSrcweir success &= testMapAny(transport, new Any(Type.TYPE, Type.LONG), 576cdf0e10cSrcweir new CompareUnboxed()); 577cdf0e10cSrcweir success &= testMapAny(transport, 578cdf0e10cSrcweir new Any(Type.TYPE, Type.UNSIGNED_LONG), 579cdf0e10cSrcweir new CompareUnboxed()); 580cdf0e10cSrcweir success &= testMapAny(transport, new Any(Type.TYPE, Type.HYPER), 581cdf0e10cSrcweir new CompareUnboxed()); 582cdf0e10cSrcweir success &= testMapAny(transport, 583cdf0e10cSrcweir new Any(Type.TYPE, Type.UNSIGNED_HYPER), 584cdf0e10cSrcweir new CompareUnboxed()); 585cdf0e10cSrcweir success &= testMapAny(transport, new Any(Type.TYPE, Type.FLOAT), 586cdf0e10cSrcweir new CompareUnboxed()); 587cdf0e10cSrcweir success &= testMapAny(transport, new Any(Type.TYPE, Type.DOUBLE), 588cdf0e10cSrcweir new CompareUnboxed()); 589cdf0e10cSrcweir success &= testMapAny(transport, new Any(Type.TYPE, Type.CHAR), 590cdf0e10cSrcweir new CompareUnboxed()); 591cdf0e10cSrcweir success &= testMapAny(transport, new Any(Type.TYPE, Type.STRING), 592cdf0e10cSrcweir new CompareUnboxed()); 593cdf0e10cSrcweir success &= testMapAny(transport, new Any(Type.TYPE, Type.TYPE), 594cdf0e10cSrcweir new CompareUnboxed()); 595cdf0e10cSrcweir success &= testMapAny(transport, new Any(Type.TYPE, Type.ANY), 596cdf0e10cSrcweir new CompareUnboxed()); 597cdf0e10cSrcweir success &= testMapAny(transport, 598cdf0e10cSrcweir new Any(Type.TYPE, 599cdf0e10cSrcweir new Type("[]boolean", 600cdf0e10cSrcweir TypeClass.SEQUENCE)), 601cdf0e10cSrcweir new CompareUnboxed()); 602cdf0e10cSrcweir success &= testMapAny(transport, 603cdf0e10cSrcweir new Any(Type.TYPE, 604cdf0e10cSrcweir new Type("[]byte", 605cdf0e10cSrcweir TypeClass.SEQUENCE)), 606cdf0e10cSrcweir new CompareUnboxed()); 607cdf0e10cSrcweir success &= testMapAny(transport, 608cdf0e10cSrcweir new Any(Type.TYPE, 609cdf0e10cSrcweir new Type("[]short", 610cdf0e10cSrcweir TypeClass.SEQUENCE)), 611cdf0e10cSrcweir new CompareUnboxed()); 612cdf0e10cSrcweir success &= testMapAny(transport, 613cdf0e10cSrcweir new Any(Type.TYPE, 614cdf0e10cSrcweir new Type("[]unsigned short", 615cdf0e10cSrcweir TypeClass.SEQUENCE)), 616cdf0e10cSrcweir new CompareUnboxed()); 617cdf0e10cSrcweir success &= testMapAny(transport, 618cdf0e10cSrcweir new Any(Type.TYPE, 619cdf0e10cSrcweir new Type("[]long", 620cdf0e10cSrcweir TypeClass.SEQUENCE)), 621cdf0e10cSrcweir new CompareUnboxed()); 622cdf0e10cSrcweir success &= testMapAny(transport, 623cdf0e10cSrcweir new Any(Type.TYPE, 624cdf0e10cSrcweir new Type("[]unsigned long", 625cdf0e10cSrcweir TypeClass.SEQUENCE)), 626cdf0e10cSrcweir new CompareUnboxed()); 627cdf0e10cSrcweir success &= testMapAny(transport, 628cdf0e10cSrcweir new Any(Type.TYPE, 629cdf0e10cSrcweir new Type("[]hyper", 630cdf0e10cSrcweir TypeClass.SEQUENCE)), 631cdf0e10cSrcweir new CompareUnboxed()); 632cdf0e10cSrcweir success &= testMapAny(transport, 633cdf0e10cSrcweir new Any(Type.TYPE, 634cdf0e10cSrcweir new Type("[]unsigned hyper", 635cdf0e10cSrcweir TypeClass.SEQUENCE)), 636cdf0e10cSrcweir new CompareUnboxed()); 637cdf0e10cSrcweir success &= testMapAny(transport, 638cdf0e10cSrcweir new Any(Type.TYPE, 639cdf0e10cSrcweir new Type("[]float", 640cdf0e10cSrcweir TypeClass.SEQUENCE)), 641cdf0e10cSrcweir new CompareUnboxed()); 642cdf0e10cSrcweir success &= testMapAny(transport, 643cdf0e10cSrcweir new Any(Type.TYPE, 644cdf0e10cSrcweir new Type("[]double", 645cdf0e10cSrcweir TypeClass.SEQUENCE)), 646cdf0e10cSrcweir new CompareUnboxed()); 647cdf0e10cSrcweir success &= testMapAny(transport, 648cdf0e10cSrcweir new Any(Type.TYPE, 649cdf0e10cSrcweir new Type("[]char", 650cdf0e10cSrcweir TypeClass.SEQUENCE)), 651cdf0e10cSrcweir new CompareUnboxed()); 652cdf0e10cSrcweir success &= testMapAny(transport, 653cdf0e10cSrcweir new Any(Type.TYPE, 654cdf0e10cSrcweir new Type("[]string", 655cdf0e10cSrcweir TypeClass.SEQUENCE)), 656cdf0e10cSrcweir new CompareUnboxed()); 657cdf0e10cSrcweir success &= testMapAny(transport, 658cdf0e10cSrcweir new Any(Type.TYPE, 659cdf0e10cSrcweir new Type("[]type", 660cdf0e10cSrcweir TypeClass.SEQUENCE)), 661cdf0e10cSrcweir new CompareUnboxed()); 662cdf0e10cSrcweir success &= testMapAny(transport, 663cdf0e10cSrcweir new Any(Type.TYPE, 664cdf0e10cSrcweir new Type("[]any", 665cdf0e10cSrcweir TypeClass.SEQUENCE)), 666cdf0e10cSrcweir new CompareUnboxed()); 667cdf0e10cSrcweir if (createTypes) { 668cdf0e10cSrcweir success &= testMapAny(transport, 669cdf0e10cSrcweir new Any(Type.TYPE, 670cdf0e10cSrcweir new Type("[]" + Enum1.class.getName(), 671cdf0e10cSrcweir TypeClass.SEQUENCE)), 672cdf0e10cSrcweir new CompareUnboxed()); 673cdf0e10cSrcweir success &= testMapAny(transport, 674cdf0e10cSrcweir new Any(Type.TYPE, 675cdf0e10cSrcweir new Type("[]" 676cdf0e10cSrcweir + BaseStruct.class.getName(), 677cdf0e10cSrcweir TypeClass.SEQUENCE)), 678cdf0e10cSrcweir new CompareUnboxed()); 679cdf0e10cSrcweir success &= testMapAny(transport, 680cdf0e10cSrcweir new Any(Type.TYPE, 681cdf0e10cSrcweir new Type( 682cdf0e10cSrcweir "[]" 683cdf0e10cSrcweir + DerivedStruct.class.getName(), 684cdf0e10cSrcweir TypeClass.SEQUENCE)), 685cdf0e10cSrcweir new CompareUnboxed()); 686cdf0e10cSrcweir } 687cdf0e10cSrcweir success &= testMapAny(transport, 688cdf0e10cSrcweir new Any(Type.TYPE, 689cdf0e10cSrcweir new Type("[]" 690cdf0e10cSrcweir + XInterface.class.getName(), 691cdf0e10cSrcweir TypeClass.SEQUENCE)), 692cdf0e10cSrcweir new CompareUnboxed()); 693cdf0e10cSrcweir success &= testMapAny(transport, 694cdf0e10cSrcweir new Any(Type.TYPE, 695cdf0e10cSrcweir new Type( 696cdf0e10cSrcweir "[]" 697cdf0e10cSrcweir + BaseInterface.class.getName(), 698cdf0e10cSrcweir TypeClass.SEQUENCE)), 699cdf0e10cSrcweir new CompareUnboxed()); 700cdf0e10cSrcweir success &= testMapAny(transport, 701cdf0e10cSrcweir new Any( 702cdf0e10cSrcweir Type.TYPE, 703cdf0e10cSrcweir new Type( 704cdf0e10cSrcweir "[]" 705cdf0e10cSrcweir + DerivedInterface.class.getName(), 706cdf0e10cSrcweir TypeClass.SEQUENCE)), 707cdf0e10cSrcweir new CompareUnboxed()); 708cdf0e10cSrcweir success &= testMapAny(transport, 709cdf0e10cSrcweir new Any(Type.TYPE, 710cdf0e10cSrcweir new Type("[][]boolean", 711cdf0e10cSrcweir TypeClass.SEQUENCE)), 712cdf0e10cSrcweir new CompareUnboxed()); 713cdf0e10cSrcweir success &= testMapAny(transport, 714cdf0e10cSrcweir new Any(Type.TYPE, 715cdf0e10cSrcweir new Type("[][]byte", 716cdf0e10cSrcweir TypeClass.SEQUENCE)), 717cdf0e10cSrcweir new CompareUnboxed()); 718cdf0e10cSrcweir success &= testMapAny(transport, 719cdf0e10cSrcweir new Any(Type.TYPE, 720cdf0e10cSrcweir new Type("[][]short", 721cdf0e10cSrcweir TypeClass.SEQUENCE)), 722cdf0e10cSrcweir new CompareUnboxed()); 723cdf0e10cSrcweir success &= testMapAny(transport, 724cdf0e10cSrcweir new Any(Type.TYPE, 725cdf0e10cSrcweir new Type("[][]unsigned short", 726cdf0e10cSrcweir TypeClass.SEQUENCE)), 727cdf0e10cSrcweir new CompareUnboxed()); 728cdf0e10cSrcweir success &= testMapAny(transport, 729cdf0e10cSrcweir new Any(Type.TYPE, 730cdf0e10cSrcweir new Type("[][]long", 731cdf0e10cSrcweir TypeClass.SEQUENCE)), 732cdf0e10cSrcweir new CompareUnboxed()); 733cdf0e10cSrcweir success &= testMapAny(transport, 734cdf0e10cSrcweir new Any(Type.TYPE, 735cdf0e10cSrcweir new Type("[][]unsigned long", 736cdf0e10cSrcweir TypeClass.SEQUENCE)), 737cdf0e10cSrcweir new CompareUnboxed()); 738cdf0e10cSrcweir success &= testMapAny(transport, 739cdf0e10cSrcweir new Any(Type.TYPE, 740cdf0e10cSrcweir new Type("[][]hyper", 741cdf0e10cSrcweir TypeClass.SEQUENCE)), 742cdf0e10cSrcweir new CompareUnboxed()); 743cdf0e10cSrcweir success &= testMapAny(transport, 744cdf0e10cSrcweir new Any(Type.TYPE, 745cdf0e10cSrcweir new Type("[][]unsigned hyper", 746cdf0e10cSrcweir TypeClass.SEQUENCE)), 747cdf0e10cSrcweir new CompareUnboxed()); 748cdf0e10cSrcweir success &= testMapAny(transport, 749cdf0e10cSrcweir new Any(Type.TYPE, 750cdf0e10cSrcweir new Type("[][]float", 751cdf0e10cSrcweir TypeClass.SEQUENCE)), 752cdf0e10cSrcweir new CompareUnboxed()); 753cdf0e10cSrcweir success &= testMapAny(transport, 754cdf0e10cSrcweir new Any(Type.TYPE, 755cdf0e10cSrcweir new Type("[][]double", 756cdf0e10cSrcweir TypeClass.SEQUENCE)), 757cdf0e10cSrcweir new CompareUnboxed()); 758cdf0e10cSrcweir success &= testMapAny(transport, 759cdf0e10cSrcweir new Any(Type.TYPE, 760cdf0e10cSrcweir new Type("[][]char", 761cdf0e10cSrcweir TypeClass.SEQUENCE)), 762cdf0e10cSrcweir new CompareUnboxed()); 763cdf0e10cSrcweir success &= testMapAny(transport, 764cdf0e10cSrcweir new Any(Type.TYPE, 765cdf0e10cSrcweir new Type("[][]string", 766cdf0e10cSrcweir TypeClass.SEQUENCE)), 767cdf0e10cSrcweir new CompareUnboxed()); 768cdf0e10cSrcweir success &= testMapAny(transport, 769cdf0e10cSrcweir new Any(Type.TYPE, 770cdf0e10cSrcweir new Type("[][]type", 771cdf0e10cSrcweir TypeClass.SEQUENCE)), 772cdf0e10cSrcweir new CompareUnboxed()); 773cdf0e10cSrcweir success &= testMapAny(transport, 774cdf0e10cSrcweir new Any(Type.TYPE, 775cdf0e10cSrcweir new Type("[][]any", 776cdf0e10cSrcweir TypeClass.SEQUENCE)), 777cdf0e10cSrcweir new CompareUnboxed()); 778cdf0e10cSrcweir if (createTypes) { 779cdf0e10cSrcweir success &= testMapAny(transport, 780cdf0e10cSrcweir new Any(Type.TYPE, 781cdf0e10cSrcweir new Type("[][]" 782cdf0e10cSrcweir + Enum1.class.getName(), 783cdf0e10cSrcweir TypeClass.SEQUENCE)), 784cdf0e10cSrcweir new CompareUnboxed()); 785cdf0e10cSrcweir success &= testMapAny(transport, 786cdf0e10cSrcweir new Any(Type.TYPE, 787cdf0e10cSrcweir new Type("[][]" 788cdf0e10cSrcweir + BaseStruct.class.getName(), 789cdf0e10cSrcweir TypeClass.SEQUENCE)), 790cdf0e10cSrcweir new CompareUnboxed()); 791cdf0e10cSrcweir success &= testMapAny(transport, 792cdf0e10cSrcweir new Any(Type.TYPE, 793cdf0e10cSrcweir new Type( 794cdf0e10cSrcweir "[][]" 795cdf0e10cSrcweir + DerivedStruct.class.getName(), 796cdf0e10cSrcweir TypeClass.SEQUENCE)), 797cdf0e10cSrcweir new CompareUnboxed()); 798cdf0e10cSrcweir } 799cdf0e10cSrcweir success &= testMapAny(transport, 800cdf0e10cSrcweir new Any(Type.TYPE, 801cdf0e10cSrcweir new Type("[][]" 802cdf0e10cSrcweir + XInterface.class.getName(), 803cdf0e10cSrcweir TypeClass.SEQUENCE)), 804cdf0e10cSrcweir new CompareUnboxed()); 805cdf0e10cSrcweir success &= testMapAny(transport, 806cdf0e10cSrcweir new Any(Type.TYPE, 807cdf0e10cSrcweir new Type( 808cdf0e10cSrcweir "[][]" 809cdf0e10cSrcweir + BaseInterface.class.getName(), 810cdf0e10cSrcweir TypeClass.SEQUENCE)), 811cdf0e10cSrcweir new CompareUnboxed()); 812cdf0e10cSrcweir success &= testMapAny(transport, 813cdf0e10cSrcweir new Any( 814cdf0e10cSrcweir Type.TYPE, 815cdf0e10cSrcweir new Type( 816cdf0e10cSrcweir "[][]" 817cdf0e10cSrcweir + DerivedInterface.class.getName(), 818cdf0e10cSrcweir TypeClass.SEQUENCE)), 819cdf0e10cSrcweir new CompareUnboxed()); 820cdf0e10cSrcweir if (createTypes) { 821cdf0e10cSrcweir success &= testMapAny(transport, 822cdf0e10cSrcweir new Any(Type.TYPE, 823cdf0e10cSrcweir new Type(Enum1.class.getName(), 824cdf0e10cSrcweir TypeClass.ENUM)), 825cdf0e10cSrcweir new CompareUnboxed()); 826cdf0e10cSrcweir success &= testMapAny(transport, 827cdf0e10cSrcweir new Any(Type.TYPE, 828cdf0e10cSrcweir new Type(BaseStruct.class.getName(), 829cdf0e10cSrcweir TypeClass.STRUCT)), 830cdf0e10cSrcweir new CompareUnboxed()); 831cdf0e10cSrcweir success &= testMapAny(transport, 832cdf0e10cSrcweir new Any(Type.TYPE, 833cdf0e10cSrcweir new Type( 834cdf0e10cSrcweir DerivedStruct.class.getName(), 835cdf0e10cSrcweir TypeClass.STRUCT)), 836cdf0e10cSrcweir new CompareUnboxed()); 837cdf0e10cSrcweir } 838cdf0e10cSrcweir success &= testMapAny(transport, 839cdf0e10cSrcweir new Any( 840cdf0e10cSrcweir Type.TYPE, 841cdf0e10cSrcweir new Type( 842cdf0e10cSrcweir com.sun.star.uno.Exception.class. 843cdf0e10cSrcweir getName(), 844cdf0e10cSrcweir TypeClass.EXCEPTION)), 845cdf0e10cSrcweir new CompareUnboxed()); 846cdf0e10cSrcweir if (createTypes) { 847cdf0e10cSrcweir success &= testMapAny(transport, 848cdf0e10cSrcweir new Any(Type.TYPE, 849cdf0e10cSrcweir new Type( 850cdf0e10cSrcweir BaseException.class.getName(), 851cdf0e10cSrcweir TypeClass.EXCEPTION)), 852cdf0e10cSrcweir new CompareUnboxed()); 853cdf0e10cSrcweir success &= testMapAny(transport, 854cdf0e10cSrcweir new Any( 855cdf0e10cSrcweir Type.TYPE, 856cdf0e10cSrcweir new Type( 857cdf0e10cSrcweir DerivedException.class.getName(), 858cdf0e10cSrcweir TypeClass.EXCEPTION)), 859cdf0e10cSrcweir new CompareUnboxed()); 860cdf0e10cSrcweir } 861cdf0e10cSrcweir success &= testMapAny(transport, 862cdf0e10cSrcweir new Any( 863cdf0e10cSrcweir Type.TYPE, 864cdf0e10cSrcweir new Type( 865cdf0e10cSrcweir com.sun.star.uno.RuntimeException. 866cdf0e10cSrcweir class.getName(), 867cdf0e10cSrcweir TypeClass.EXCEPTION)), 868cdf0e10cSrcweir new CompareUnboxed()); 869cdf0e10cSrcweir if (createTypes) { 870cdf0e10cSrcweir success &= testMapAny(transport, 871cdf0e10cSrcweir new Any( 872cdf0e10cSrcweir Type.TYPE, 873cdf0e10cSrcweir new Type( 874cdf0e10cSrcweir BaseRuntimeException.class. 875cdf0e10cSrcweir getName(), 876cdf0e10cSrcweir TypeClass.EXCEPTION)), 877cdf0e10cSrcweir new CompareUnboxed()); 878cdf0e10cSrcweir success &= testMapAny(transport, 879cdf0e10cSrcweir new Any( 880cdf0e10cSrcweir Type.TYPE, 881cdf0e10cSrcweir new Type( 882cdf0e10cSrcweir DerivedRuntimeException.class. 883cdf0e10cSrcweir getName(), 884cdf0e10cSrcweir TypeClass.EXCEPTION)), 885cdf0e10cSrcweir new CompareUnboxed()); 886cdf0e10cSrcweir } 887cdf0e10cSrcweir success &= testMapAny(transport, 888cdf0e10cSrcweir new Any(Type.TYPE, 889cdf0e10cSrcweir new Type(XInterface.class.getName(), 890cdf0e10cSrcweir TypeClass.INTERFACE)), 891cdf0e10cSrcweir new CompareUnboxed()); 892cdf0e10cSrcweir success &= testMapAny(transport, 893cdf0e10cSrcweir new Any(Type.TYPE, 894cdf0e10cSrcweir new Type( 895cdf0e10cSrcweir BaseInterface.class.getName(), 896cdf0e10cSrcweir TypeClass.INTERFACE)), 897cdf0e10cSrcweir new CompareUnboxed()); 898cdf0e10cSrcweir success &= testMapAny(transport, 899cdf0e10cSrcweir new Any(Type.TYPE, 900cdf0e10cSrcweir new Type( 901cdf0e10cSrcweir DerivedInterface.class.getName(), 902cdf0e10cSrcweir TypeClass.INTERFACE)), 903cdf0e10cSrcweir new CompareUnboxed()); 904cdf0e10cSrcweir 905cdf0e10cSrcweir // Sequence Types: 906cdf0e10cSrcweir success &= testMapAny(transport, new boolean[] {}, 907cdf0e10cSrcweir new CompareBoxed()); 908cdf0e10cSrcweir success &= testMapAny(transport, new boolean[] { false, true }, 909cdf0e10cSrcweir new CompareBoxed()); 910cdf0e10cSrcweir success &= testMapAny(transport, 911cdf0e10cSrcweir new Any(new Type(boolean[].class), 912cdf0e10cSrcweir new boolean[] {}), 913cdf0e10cSrcweir new CompareUnboxed()); 914cdf0e10cSrcweir success &= testMapAny(transport, 915cdf0e10cSrcweir new Any(new Type(boolean[].class), 916cdf0e10cSrcweir new boolean[] { false, true }), 917cdf0e10cSrcweir new CompareUnboxed()); 918cdf0e10cSrcweir success &= testMapAny(transport, new byte[] {}, 919cdf0e10cSrcweir new CompareBoxed()); 920cdf0e10cSrcweir success &= testMapAny(transport, new byte[] { -128, 0, 127 }, 921cdf0e10cSrcweir new CompareBoxed()); 922cdf0e10cSrcweir success &= testMapAny(transport, 923cdf0e10cSrcweir new Any(new Type(byte[].class), 924cdf0e10cSrcweir new byte[] {}), 925cdf0e10cSrcweir new CompareUnboxed()); 926cdf0e10cSrcweir success &= testMapAny(transport, 927cdf0e10cSrcweir new Any(new Type(byte[].class), 928cdf0e10cSrcweir new byte[] { -128, 0, 127 }), 929cdf0e10cSrcweir new CompareUnboxed()); 930cdf0e10cSrcweir success &= testMapAny(transport, new short[] {}, 931cdf0e10cSrcweir new CompareBoxed()); 932cdf0e10cSrcweir success &= testMapAny(transport, new short[] { -32768, 0, 32767 }, 933cdf0e10cSrcweir new CompareBoxed()); 934cdf0e10cSrcweir success &= testMapAny(transport, 935cdf0e10cSrcweir new Any(new Type(short[].class), 936cdf0e10cSrcweir new short[] {}), 937cdf0e10cSrcweir new CompareUnboxed()); 938cdf0e10cSrcweir success &= testMapAny(transport, 939cdf0e10cSrcweir new Any(new Type(short[].class), 940cdf0e10cSrcweir new short[] { -32768, 0, 32767 }), 941cdf0e10cSrcweir new CompareUnboxed()); 942cdf0e10cSrcweir success &= testMapAny(transport, 943cdf0e10cSrcweir new Any(new Type("[]unsigned short", 944cdf0e10cSrcweir TypeClass.SEQUENCE), 945cdf0e10cSrcweir new short[] {}), 946cdf0e10cSrcweir new CompareBoxed()); 947cdf0e10cSrcweir success &= testMapAny(transport, 948cdf0e10cSrcweir new Any(new Type("[]unsigned short", 949cdf0e10cSrcweir TypeClass.SEQUENCE), 950cdf0e10cSrcweir new short[] { 0, -32768 }), 951cdf0e10cSrcweir new CompareBoxed()); 952cdf0e10cSrcweir success &= testMapAny(transport, new int[] {}, 953cdf0e10cSrcweir new CompareBoxed()); 954cdf0e10cSrcweir success &= testMapAny(transport, 955cdf0e10cSrcweir new int[] { -2147483648, 0, 2147483647 }, 956cdf0e10cSrcweir new CompareBoxed()); 957cdf0e10cSrcweir success &= testMapAny(transport, 958cdf0e10cSrcweir new Any(new Type(int[].class), 959cdf0e10cSrcweir new int[] {}), 960cdf0e10cSrcweir new CompareUnboxed()); 961cdf0e10cSrcweir success &= testMapAny(transport, 962cdf0e10cSrcweir new Any(new Type(int[].class), 963cdf0e10cSrcweir new int[] { -2147483648, 0, 964cdf0e10cSrcweir 2147483647 }), 965cdf0e10cSrcweir new CompareUnboxed()); 966cdf0e10cSrcweir success &= testMapAny(transport, 967cdf0e10cSrcweir new Any(new Type("[]unsigned long", 968cdf0e10cSrcweir TypeClass.SEQUENCE), 969cdf0e10cSrcweir new int[] {}), 970cdf0e10cSrcweir new CompareBoxed()); 971cdf0e10cSrcweir success &= testMapAny(transport, 972cdf0e10cSrcweir new Any(new Type("[]unsigned long", 973cdf0e10cSrcweir TypeClass.SEQUENCE), 974cdf0e10cSrcweir new int[] { 0, -2147483648 }), 975cdf0e10cSrcweir new CompareBoxed()); 976cdf0e10cSrcweir success &= testMapAny(transport, new long[] {}, 977cdf0e10cSrcweir new CompareBoxed()); 978cdf0e10cSrcweir success &= testMapAny(transport, 979cdf0e10cSrcweir new long[] { -9223372036854775808L, 0L, 980cdf0e10cSrcweir 9223372036854775807L }, 981cdf0e10cSrcweir new CompareBoxed()); 982cdf0e10cSrcweir success &= testMapAny(transport, 983cdf0e10cSrcweir new Any(new Type(long[].class), 984cdf0e10cSrcweir new long[] {}), 985cdf0e10cSrcweir new CompareUnboxed()); 986cdf0e10cSrcweir success &= testMapAny(transport, 987cdf0e10cSrcweir new Any(new Type(long[].class), 988cdf0e10cSrcweir new long[] { -9223372036854775808L, 989cdf0e10cSrcweir 0L, 990cdf0e10cSrcweir 9223372036854775807L }), 991cdf0e10cSrcweir new CompareUnboxed()); 992cdf0e10cSrcweir success &= testMapAny(transport, 993cdf0e10cSrcweir new Any(new Type("[]unsigned hyper", 994cdf0e10cSrcweir TypeClass.SEQUENCE), 995cdf0e10cSrcweir new long[] {}), 996cdf0e10cSrcweir new CompareBoxed()); 997cdf0e10cSrcweir success &= testMapAny(transport, 998cdf0e10cSrcweir new Any(new Type("[]unsigned hyper", 999cdf0e10cSrcweir TypeClass.SEQUENCE), 1000cdf0e10cSrcweir new long[] { 0L, 1001cdf0e10cSrcweir -9223372036854775808L }), 1002cdf0e10cSrcweir new CompareBoxed()); 1003cdf0e10cSrcweir success &= testMapAny(transport, new float[] {}, 1004cdf0e10cSrcweir new CompareBoxed()); 1005cdf0e10cSrcweir success &= testMapAny(transport, 1006cdf0e10cSrcweir new float[] { Float.NEGATIVE_INFINITY, 1007cdf0e10cSrcweir Float.MIN_VALUE, -0.0f, 0.0f, 1008cdf0e10cSrcweir Float.MAX_VALUE, 1009cdf0e10cSrcweir Float.POSITIVE_INFINITY, 1010cdf0e10cSrcweir Float.NaN }, 1011cdf0e10cSrcweir new CompareBoxed()); 1012cdf0e10cSrcweir success &= testMapAny(transport, 1013cdf0e10cSrcweir new Any(new Type(float[].class), 1014cdf0e10cSrcweir new float[] {}), 1015cdf0e10cSrcweir new CompareUnboxed()); 1016cdf0e10cSrcweir success &= testMapAny(transport, 1017cdf0e10cSrcweir new Any(new Type(float[].class), 1018cdf0e10cSrcweir new float[] { Float.NEGATIVE_INFINITY, 1019cdf0e10cSrcweir Float.MIN_VALUE, -0.0f, 1020cdf0e10cSrcweir 0.0f, Float.MAX_VALUE, 1021cdf0e10cSrcweir Float.POSITIVE_INFINITY, 1022cdf0e10cSrcweir Float.NaN }), 1023cdf0e10cSrcweir new CompareUnboxed()); 1024cdf0e10cSrcweir success &= testMapAny(transport, new double[] {}, 1025cdf0e10cSrcweir new CompareBoxed()); 1026cdf0e10cSrcweir success &= testMapAny(transport, 1027cdf0e10cSrcweir new double[] { Double.NEGATIVE_INFINITY, 1028cdf0e10cSrcweir Double.MIN_VALUE, -0.0, 0.0, 1029cdf0e10cSrcweir Double.MAX_VALUE, 1030cdf0e10cSrcweir Double.POSITIVE_INFINITY, 1031cdf0e10cSrcweir Double.NaN }, 1032cdf0e10cSrcweir new CompareBoxed()); 1033cdf0e10cSrcweir success &= testMapAny(transport, 1034cdf0e10cSrcweir new Any(new Type(double[].class), 1035cdf0e10cSrcweir new double[] {}), 1036cdf0e10cSrcweir new CompareUnboxed()); 1037cdf0e10cSrcweir success &= testMapAny(transport, 1038cdf0e10cSrcweir new Any(new Type(double[].class), 1039cdf0e10cSrcweir new double[] { 1040cdf0e10cSrcweir Double.NEGATIVE_INFINITY, 1041cdf0e10cSrcweir Double.MIN_VALUE, -0.0, 0.0, 1042cdf0e10cSrcweir Double.MAX_VALUE, 1043cdf0e10cSrcweir Double.POSITIVE_INFINITY, 1044cdf0e10cSrcweir Double.NaN }), 1045cdf0e10cSrcweir new CompareUnboxed()); 1046cdf0e10cSrcweir success &= testMapAny(transport, new char[] {}, 1047cdf0e10cSrcweir new CompareBoxed()); 1048cdf0e10cSrcweir success &= testMapAny(transport, 1049cdf0e10cSrcweir new char[] { '\u0000', '\uDBFF', '\uFFFD' }, 1050cdf0e10cSrcweir new CompareBoxed()); 1051cdf0e10cSrcweir success &= testMapAny(transport, 1052cdf0e10cSrcweir new Any(new Type(char[].class), 1053cdf0e10cSrcweir new char[] {}), 1054cdf0e10cSrcweir new CompareUnboxed()); 1055cdf0e10cSrcweir success &= testMapAny(transport, 1056cdf0e10cSrcweir new Any( 1057cdf0e10cSrcweir new Type(char[].class), 1058cdf0e10cSrcweir new char[] { '\u0000', '\uDBFF', 1059cdf0e10cSrcweir '\uFFFD' }), 1060cdf0e10cSrcweir new CompareUnboxed()); 1061cdf0e10cSrcweir success &= testMapAny(transport, new String[] {}, 1062cdf0e10cSrcweir new CompareBoxed()); 1063cdf0e10cSrcweir success &= testMapAny(transport, 1064cdf0e10cSrcweir new String[] { "", "\uD800\uDC00", "Test" }, 1065cdf0e10cSrcweir new CompareBoxed()); 1066cdf0e10cSrcweir success &= testMapAny(transport, 1067cdf0e10cSrcweir new Any(new Type(String[].class), 1068cdf0e10cSrcweir new String[] {}), 1069cdf0e10cSrcweir new CompareUnboxed()); 1070cdf0e10cSrcweir success &= testMapAny(transport, 1071cdf0e10cSrcweir new Any(new Type(String[].class), 1072cdf0e10cSrcweir new String[] { "", "\uD800\uDC00", 1073cdf0e10cSrcweir "Test" }), 1074cdf0e10cSrcweir new CompareUnboxed()); 1075cdf0e10cSrcweir success &= testMapAny(transport, new Type[] {}, new CompareBoxed()); 1076cdf0e10cSrcweir success &= testMapAny(transport, 1077cdf0e10cSrcweir new Type[] { 1078cdf0e10cSrcweir Type.VOID, 1079cdf0e10cSrcweir new Type(DerivedInterface.class.getName(), 1080cdf0e10cSrcweir TypeClass.INTERFACE) }, 1081cdf0e10cSrcweir new CompareBoxed()); 1082cdf0e10cSrcweir success &= testMapAny(transport, 1083cdf0e10cSrcweir new Any(new Type(Type[].class), 1084cdf0e10cSrcweir new Type[] {}), 1085cdf0e10cSrcweir new CompareUnboxed()); 1086cdf0e10cSrcweir success &= testMapAny(transport, 1087cdf0e10cSrcweir new Any( 1088cdf0e10cSrcweir new Type(Type[].class), 1089cdf0e10cSrcweir new Type[] { 1090cdf0e10cSrcweir Type.VOID, 1091cdf0e10cSrcweir new Type( 1092cdf0e10cSrcweir DerivedInterface.class.getName(), 1093cdf0e10cSrcweir TypeClass.INTERFACE) }), 1094cdf0e10cSrcweir new CompareUnboxed()); 1095cdf0e10cSrcweir success &= testMapAny(transport, new Object[] {}, 1096cdf0e10cSrcweir new CompareBoxed()); 1097cdf0e10cSrcweir success &= testMapAny(transport, 1098cdf0e10cSrcweir new Object[] { Any.VOID, Boolean.FALSE }, 1099cdf0e10cSrcweir new CompareBoxed()); 1100cdf0e10cSrcweir success &= testMapAny(transport, 1101cdf0e10cSrcweir new Object[] { 1102cdf0e10cSrcweir Boolean.FALSE, 1103cdf0e10cSrcweir new Any(Type.BOOLEAN, Boolean.TRUE) }, 1104cdf0e10cSrcweir new CompareBoxed(true)); 1105cdf0e10cSrcweir success &= testMapAny(transport, 1106cdf0e10cSrcweir new Any(new Type(Any[].class), 1107cdf0e10cSrcweir new Object[] {}), 1108cdf0e10cSrcweir new CompareUnboxed()); 1109cdf0e10cSrcweir success &= testMapAny(transport, 1110cdf0e10cSrcweir new Any(new Type(Any[].class), 1111cdf0e10cSrcweir new Object[] { Any.VOID, 1112cdf0e10cSrcweir Boolean.FALSE }), 1113cdf0e10cSrcweir new CompareUnboxed()); 1114cdf0e10cSrcweir success &= testMapAny(transport, 1115cdf0e10cSrcweir new Any(new Type(Any[].class), 1116cdf0e10cSrcweir new Object[] { 1117cdf0e10cSrcweir Boolean.FALSE, 1118cdf0e10cSrcweir new Any(Type.BOOLEAN, 1119cdf0e10cSrcweir Boolean.TRUE) }), 1120cdf0e10cSrcweir new CompareUnboxed(true)); 1121cdf0e10cSrcweir success &= testMapAny(transport, new Any[] {}, 1122cdf0e10cSrcweir new CompareSpecific(new Object[] {})); 1123cdf0e10cSrcweir success &= testMapAny(transport, 1124cdf0e10cSrcweir new Any[] { Any.VOID, 1125cdf0e10cSrcweir new Any(Type.BOOLEAN, 1126cdf0e10cSrcweir Boolean.TRUE) }, 1127cdf0e10cSrcweir new CompareSpecific( 1128cdf0e10cSrcweir new Object[] { Any.VOID, Boolean.TRUE })); 1129cdf0e10cSrcweir success &= testMapAny(transport, 1130cdf0e10cSrcweir new Any(new Type(Any[].class), new Any[] {}), 1131cdf0e10cSrcweir new CompareSpecific(new Object[] {})); 1132cdf0e10cSrcweir success &= testMapAny(transport, 1133cdf0e10cSrcweir new Any(new Type(Any[].class), 1134cdf0e10cSrcweir new Any[] { Any.VOID, 1135cdf0e10cSrcweir new Any(Type.BOOLEAN, 1136cdf0e10cSrcweir Boolean.TRUE) }), 1137cdf0e10cSrcweir new CompareSpecific( 1138cdf0e10cSrcweir new Object[] { Any.VOID, Boolean.TRUE })); 1139cdf0e10cSrcweir success &= testMapAny(transport, 1140cdf0e10cSrcweir new Any(new Type(Any[].class), 1141cdf0e10cSrcweir new Boolean[] {}), 1142cdf0e10cSrcweir new CompareSpecific(new Object[] {})); 1143cdf0e10cSrcweir success &= testMapAny(transport, 1144cdf0e10cSrcweir new Any(new Type(Any[].class), 1145cdf0e10cSrcweir new Boolean[] { Boolean.FALSE }), 1146cdf0e10cSrcweir new CompareSpecific( 1147cdf0e10cSrcweir new Object[] { Boolean.FALSE })); 1148cdf0e10cSrcweir if (createTypes) { 1149cdf0e10cSrcweir success &= testMapAny(transport, new Enum1[] {}, 1150cdf0e10cSrcweir new CompareBoxed()); 1151cdf0e10cSrcweir success &= testMapAny(transport, new Enum1[] { new Enum1(), 1152cdf0e10cSrcweir new Enum2() }, 1153cdf0e10cSrcweir new CompareSpecific( 1154cdf0e10cSrcweir new Enum1[] { new Enum1(), 1155cdf0e10cSrcweir new Enum1() })); 1156cdf0e10cSrcweir success &= testMapAny(transport, 1157cdf0e10cSrcweir new Any(new Type(Enum1[].class), 1158cdf0e10cSrcweir new Enum1[] {}), 1159cdf0e10cSrcweir new CompareUnboxed()); 1160cdf0e10cSrcweir success &= testMapAny(transport, 1161cdf0e10cSrcweir new Any(new Type(Enum1[].class), 1162cdf0e10cSrcweir new Enum1[] { new Enum1(), 1163cdf0e10cSrcweir new Enum2() }), 1164cdf0e10cSrcweir new CompareSpecific( 1165cdf0e10cSrcweir new Enum1[] { new Enum1(), 1166cdf0e10cSrcweir new Enum1() })); 1167cdf0e10cSrcweir success &= testMapAny(transport, 1168cdf0e10cSrcweir new Any(new Type(Enum1[].class), 1169cdf0e10cSrcweir new Enum2[] {}), 1170cdf0e10cSrcweir new CompareSpecific(new Enum1[] {})); 1171cdf0e10cSrcweir success &= testMapAny(transport, 1172cdf0e10cSrcweir new Any(new Type(Enum1[].class), 1173cdf0e10cSrcweir new Enum2[] { new Enum2() }), 1174cdf0e10cSrcweir new CompareSpecific( 1175cdf0e10cSrcweir new Enum1[] { new Enum1() })); 1176cdf0e10cSrcweir success &= testMapAny(transport, new BaseStruct[] {}, 1177cdf0e10cSrcweir new CompareBoxed()); 1178cdf0e10cSrcweir success &= testMapAny(transport, 1179cdf0e10cSrcweir new BaseStruct[] { new BaseStruct(), 1180cdf0e10cSrcweir new DerivedStruct() }, 1181cdf0e10cSrcweir new CompareSpecific( 1182cdf0e10cSrcweir new BaseStruct[] { new BaseStruct(), 1183cdf0e10cSrcweir new BaseStruct() })); 1184cdf0e10cSrcweir success &= testMapAny(transport, 1185cdf0e10cSrcweir new Any(new Type(BaseStruct[].class), 1186cdf0e10cSrcweir new BaseStruct[] {}), 1187cdf0e10cSrcweir new CompareUnboxed()); 1188cdf0e10cSrcweir success &= testMapAny(transport, 1189cdf0e10cSrcweir new Any(new Type(BaseStruct[].class), 1190cdf0e10cSrcweir new BaseStruct[] { 1191cdf0e10cSrcweir new BaseStruct(), 1192cdf0e10cSrcweir new DerivedStruct() }), 1193cdf0e10cSrcweir new CompareSpecific( 1194cdf0e10cSrcweir new BaseStruct[] { new BaseStruct(), 1195cdf0e10cSrcweir new BaseStruct() })); 1196cdf0e10cSrcweir success &= testMapAny(transport, 1197cdf0e10cSrcweir new Any(new Type(BaseStruct[].class), 1198cdf0e10cSrcweir new DerivedStruct[] {}), 1199cdf0e10cSrcweir new CompareSpecific(new BaseStruct[] {})); 1200cdf0e10cSrcweir success &= testMapAny(transport, 1201cdf0e10cSrcweir new Any(new Type(BaseStruct[].class), 1202cdf0e10cSrcweir new DerivedStruct[] { 1203cdf0e10cSrcweir new DerivedStruct() }), 1204cdf0e10cSrcweir new CompareSpecific( 1205cdf0e10cSrcweir new BaseStruct[] { new BaseStruct() })); 1206cdf0e10cSrcweir success &= testMapAny(transport, new DerivedStruct[] {}, 1207cdf0e10cSrcweir new CompareBoxed()); 1208cdf0e10cSrcweir success &= testMapAny(transport, 1209cdf0e10cSrcweir new DerivedStruct[] { new DerivedStruct() }, 1210cdf0e10cSrcweir new CompareBoxed()); 1211cdf0e10cSrcweir success &= testMapAny(transport, 1212cdf0e10cSrcweir new Any(new Type(DerivedStruct[].class), 1213cdf0e10cSrcweir new DerivedStruct[] {}), 1214cdf0e10cSrcweir new CompareUnboxed()); 1215cdf0e10cSrcweir success &= testMapAny(transport, 1216cdf0e10cSrcweir new Any(new Type(DerivedStruct[].class), 1217cdf0e10cSrcweir new DerivedStruct[] { 1218cdf0e10cSrcweir new DerivedStruct() }), 1219cdf0e10cSrcweir new CompareUnboxed()); 1220cdf0e10cSrcweir } 1221cdf0e10cSrcweir success &= testMapAny(transport, new XInterface[] {}, 1222cdf0e10cSrcweir new CompareBoxed()); 1223cdf0e10cSrcweir success &= testMapAny(transport, 1224cdf0e10cSrcweir new XInterface[] { 1225cdf0e10cSrcweir null, new XInterface() {}, 1226cdf0e10cSrcweir new BaseInterface() {}, 1227cdf0e10cSrcweir new DerivedInterface() {} }, 1228cdf0e10cSrcweir new CompareBoxed()); 1229cdf0e10cSrcweir success &= testMapAny(transport, 1230cdf0e10cSrcweir new Any(new Type(XInterface[].class), 1231cdf0e10cSrcweir new XInterface[] {}), 1232cdf0e10cSrcweir new CompareUnboxed()); 1233cdf0e10cSrcweir success &= testMapAny(transport, 1234cdf0e10cSrcweir new Any(new Type(XInterface[].class), 1235cdf0e10cSrcweir new XInterface[] { 1236cdf0e10cSrcweir null, new XInterface() {}, 1237cdf0e10cSrcweir new BaseInterface() {}, 1238cdf0e10cSrcweir new DerivedInterface() {} }), 1239cdf0e10cSrcweir new CompareUnboxed()); 1240cdf0e10cSrcweir success &= testMapAny(transport, 1241cdf0e10cSrcweir new Any(new Type(XInterface[].class), 1242cdf0e10cSrcweir new Object[] {}), 1243cdf0e10cSrcweir new CompareSpecific(new XInterface[] {})); 1244cdf0e10cSrcweir { 1245cdf0e10cSrcweir XInterface if1 = new XInterface() {}; 1246cdf0e10cSrcweir XInterface if2 = new BaseInterface() {}; 1247cdf0e10cSrcweir XInterface if3 = new DerivedInterface() {}; 1248cdf0e10cSrcweir success &= testMapAny(transport, 1249cdf0e10cSrcweir new Any(new Type(XInterface[].class), 1250cdf0e10cSrcweir new Object[] { null, if1, if2, 1251cdf0e10cSrcweir if3 }), 1252cdf0e10cSrcweir new CompareSpecific( 1253cdf0e10cSrcweir new XInterface[] { null, if1, if2, 1254cdf0e10cSrcweir if3 })); 1255cdf0e10cSrcweir } 1256cdf0e10cSrcweir success &= testMapAny(transport, 1257cdf0e10cSrcweir new Any(new Type(XInterface[].class), 1258cdf0e10cSrcweir new BaseInterface[] {}), 1259cdf0e10cSrcweir new CompareSpecific(new XInterface[] {})); 1260cdf0e10cSrcweir { 1261cdf0e10cSrcweir BaseInterface if1 = new BaseInterface() {}; 1262cdf0e10cSrcweir BaseInterface if2 = new DerivedInterface() {}; 1263cdf0e10cSrcweir success &= testMapAny(transport, 1264cdf0e10cSrcweir new Any(new Type(XInterface[].class), 1265cdf0e10cSrcweir new BaseInterface[] { null, if1, 1266cdf0e10cSrcweir if2 }), 1267cdf0e10cSrcweir new CompareSpecific( 1268cdf0e10cSrcweir new XInterface[] { null, if1, if2 })); 1269cdf0e10cSrcweir } 1270cdf0e10cSrcweir success &= testMapAny(transport, 1271cdf0e10cSrcweir new Any(new Type(XInterface[].class), 1272cdf0e10cSrcweir new DerivedInterface[] {}), 1273cdf0e10cSrcweir new CompareSpecific(new XInterface[] {})); 1274cdf0e10cSrcweir { 1275cdf0e10cSrcweir DerivedInterface if1 = new DerivedInterface() {}; 1276cdf0e10cSrcweir success &= testMapAny(transport, 1277cdf0e10cSrcweir new Any(new Type(XInterface[].class), 1278cdf0e10cSrcweir new DerivedInterface[] { null, 1279cdf0e10cSrcweir if1 }), 1280cdf0e10cSrcweir new CompareSpecific( 1281cdf0e10cSrcweir new XInterface[] { null, if1 })); 1282cdf0e10cSrcweir } 1283cdf0e10cSrcweir success &= testMapAny(transport, new BaseInterface[] {}, 1284cdf0e10cSrcweir new CompareBoxed()); 1285cdf0e10cSrcweir success &= testMapAny(transport, 1286cdf0e10cSrcweir new BaseInterface[] { 1287cdf0e10cSrcweir null, new BaseInterface() {}, 1288cdf0e10cSrcweir new DerivedInterface() {} }, 1289cdf0e10cSrcweir new CompareBoxed()); 1290cdf0e10cSrcweir success &= testMapAny(transport, 1291cdf0e10cSrcweir new Any(new Type(BaseInterface[].class), 1292cdf0e10cSrcweir new BaseInterface[] {}), 1293cdf0e10cSrcweir new CompareUnboxed()); 1294cdf0e10cSrcweir success &= testMapAny(transport, 1295cdf0e10cSrcweir new Any(new Type(BaseInterface[].class), 1296cdf0e10cSrcweir new BaseInterface[] { 1297cdf0e10cSrcweir null, new BaseInterface() {}, 1298cdf0e10cSrcweir new DerivedInterface() {} }), 1299cdf0e10cSrcweir new CompareUnboxed()); 1300cdf0e10cSrcweir success &= testMapAny(transport, 1301cdf0e10cSrcweir new Any(new Type(BaseInterface[].class), 1302cdf0e10cSrcweir new DerivedInterface[] {}), 1303cdf0e10cSrcweir new CompareSpecific(new BaseInterface[] {})); 1304cdf0e10cSrcweir { 1305cdf0e10cSrcweir DerivedInterface if1 = new DerivedInterface() {}; 1306cdf0e10cSrcweir success &= testMapAny(transport, 1307cdf0e10cSrcweir new Any(new Type(BaseInterface[].class), 1308cdf0e10cSrcweir new DerivedInterface[] { null, 1309cdf0e10cSrcweir if1 }), 1310cdf0e10cSrcweir new CompareSpecific( 1311cdf0e10cSrcweir new BaseInterface[] { null, if1 })); 1312cdf0e10cSrcweir } 1313cdf0e10cSrcweir success &= testMapAny(transport, new DerivedInterface[] {}, 1314cdf0e10cSrcweir new CompareBoxed()); 1315cdf0e10cSrcweir success &= testMapAny(transport, 1316cdf0e10cSrcweir new DerivedInterface[] { 1317cdf0e10cSrcweir null, new DerivedInterface() {} }, 1318cdf0e10cSrcweir new CompareBoxed()); 1319cdf0e10cSrcweir success &= testMapAny(transport, 1320cdf0e10cSrcweir new Any(new Type(DerivedInterface[].class), 1321cdf0e10cSrcweir new DerivedInterface[] {}), 1322cdf0e10cSrcweir new CompareUnboxed()); 1323cdf0e10cSrcweir success &= testMapAny(transport, 1324cdf0e10cSrcweir new Any(new Type(DerivedInterface[].class), 1325cdf0e10cSrcweir new DerivedInterface[] { 1326cdf0e10cSrcweir null, 1327cdf0e10cSrcweir new DerivedInterface() {} }), 1328cdf0e10cSrcweir new CompareUnboxed()); 1329cdf0e10cSrcweir success &= testMapAny(transport, 1330cdf0e10cSrcweir new boolean[][] { new boolean[] {} }, 1331cdf0e10cSrcweir new CompareBoxed()); 1332cdf0e10cSrcweir success &= testMapAny(transport, 1333cdf0e10cSrcweir new boolean[][] { 1334cdf0e10cSrcweir new boolean[] { false, true } }, 1335cdf0e10cSrcweir new CompareBoxed()); 1336cdf0e10cSrcweir success &= testMapAny(transport, 1337cdf0e10cSrcweir new Any(new Type(boolean[][].class), 1338cdf0e10cSrcweir new boolean[][] { new boolean[] {} }), 1339cdf0e10cSrcweir new CompareUnboxed()); 1340cdf0e10cSrcweir success &= testMapAny(transport, 1341cdf0e10cSrcweir new Any(new Type(boolean[][].class), 1342cdf0e10cSrcweir new boolean[][] { 1343cdf0e10cSrcweir new boolean[] { false, true } }), 1344cdf0e10cSrcweir new CompareUnboxed()); 1345cdf0e10cSrcweir success &= testMapAny(transport, new byte[][] { new byte[] {} }, 1346cdf0e10cSrcweir new CompareBoxed()); 1347cdf0e10cSrcweir success &= testMapAny(transport, 1348cdf0e10cSrcweir new byte[][] { new byte[] { -128, 0, 127 } }, 1349cdf0e10cSrcweir new CompareBoxed()); 1350cdf0e10cSrcweir success &= testMapAny(transport, 1351cdf0e10cSrcweir new Any(new Type(byte[][].class), 1352cdf0e10cSrcweir new byte[][] { new byte[] {} }), 1353cdf0e10cSrcweir new CompareUnboxed()); 1354cdf0e10cSrcweir success &= testMapAny(transport, 1355cdf0e10cSrcweir new Any(new Type(byte[][].class), 1356cdf0e10cSrcweir new byte[][] { 1357cdf0e10cSrcweir new byte[] { -128, 0, 127 } }), 1358cdf0e10cSrcweir new CompareUnboxed()); 1359cdf0e10cSrcweir success &= testMapAny(transport, new short[][] { new short[] {} }, 1360cdf0e10cSrcweir new CompareBoxed()); 1361cdf0e10cSrcweir success &= testMapAny(transport, 1362cdf0e10cSrcweir new short[][] { 1363cdf0e10cSrcweir new short[] { -32768, 0, 32767 } }, 1364cdf0e10cSrcweir new CompareBoxed()); 1365cdf0e10cSrcweir success &= testMapAny(transport, 1366cdf0e10cSrcweir new Any(new Type(short[][].class), 1367cdf0e10cSrcweir new short[][] { new short[] {} }), 1368cdf0e10cSrcweir new CompareUnboxed()); 1369cdf0e10cSrcweir success &= testMapAny(transport, 1370cdf0e10cSrcweir new Any(new Type(short[][].class), 1371cdf0e10cSrcweir new short[][] { 1372cdf0e10cSrcweir new short[] { -32768, 0, 1373cdf0e10cSrcweir 32767 } }), 1374cdf0e10cSrcweir new CompareUnboxed()); 1375cdf0e10cSrcweir success &= testMapAny(transport, 1376cdf0e10cSrcweir new Any(new Type("[][]unsigned short", 1377cdf0e10cSrcweir TypeClass.SEQUENCE), 1378cdf0e10cSrcweir new short[][] { new short[] {} }), 1379cdf0e10cSrcweir new CompareBoxed()); 1380cdf0e10cSrcweir success &= testMapAny(transport, 1381cdf0e10cSrcweir new Any(new Type("[][]unsigned short", 1382cdf0e10cSrcweir TypeClass.SEQUENCE), 1383cdf0e10cSrcweir new short[][] { 1384cdf0e10cSrcweir new short[] { 0, -32768 } }), 1385cdf0e10cSrcweir new CompareBoxed()); 1386cdf0e10cSrcweir success &= testMapAny(transport, new int[][] { new int[] {} }, 1387cdf0e10cSrcweir new CompareBoxed()); 1388cdf0e10cSrcweir success &= testMapAny(transport, 1389cdf0e10cSrcweir new int[][] { new int[] { -2147483648, 0, 1390cdf0e10cSrcweir 2147483647 } }, 1391cdf0e10cSrcweir new CompareBoxed()); 1392cdf0e10cSrcweir success &= testMapAny(transport, 1393cdf0e10cSrcweir new Any(new Type(int[][].class), 1394cdf0e10cSrcweir new int[][] { new int[] {} }), 1395cdf0e10cSrcweir new CompareUnboxed()); 1396cdf0e10cSrcweir success &= testMapAny(transport, 1397cdf0e10cSrcweir new Any(new Type(int[][].class), 1398cdf0e10cSrcweir new int[][] { 1399cdf0e10cSrcweir new int[] { -2147483648, 0, 1400cdf0e10cSrcweir 2147483647 } }), 1401cdf0e10cSrcweir new CompareUnboxed()); 1402cdf0e10cSrcweir success &= testMapAny(transport, 1403cdf0e10cSrcweir new Any(new Type("[][]unsigned long", 1404cdf0e10cSrcweir TypeClass.SEQUENCE), 1405cdf0e10cSrcweir new int[][] { new int[] {} }), 1406cdf0e10cSrcweir new CompareBoxed()); 1407cdf0e10cSrcweir success &= testMapAny(transport, 1408cdf0e10cSrcweir new Any(new Type("[][]unsigned long", 1409cdf0e10cSrcweir TypeClass.SEQUENCE), 1410cdf0e10cSrcweir new int[][] { 1411cdf0e10cSrcweir new int[] { 0, -2147483648 } }), 1412cdf0e10cSrcweir new CompareBoxed()); 1413cdf0e10cSrcweir success &= testMapAny(transport, new long[][] { new long[] {} }, 1414cdf0e10cSrcweir new CompareBoxed()); 1415cdf0e10cSrcweir success &= testMapAny(transport, 1416cdf0e10cSrcweir new long[][] { 1417cdf0e10cSrcweir new long[] { -9223372036854775808L, 0L, 1418cdf0e10cSrcweir 9223372036854775807L } }, 1419cdf0e10cSrcweir new CompareBoxed()); 1420cdf0e10cSrcweir success &= testMapAny(transport, 1421cdf0e10cSrcweir new Any(new Type(long[][].class), 1422cdf0e10cSrcweir new long[][] { new long[] {} }), 1423cdf0e10cSrcweir new CompareUnboxed()); 1424cdf0e10cSrcweir success &= testMapAny(transport, 1425cdf0e10cSrcweir new Any(new Type(long[][].class), 1426cdf0e10cSrcweir new long[][] { 1427cdf0e10cSrcweir new long[] { 1428cdf0e10cSrcweir -9223372036854775808L, 0L, 1429cdf0e10cSrcweir 9223372036854775807L } }), 1430cdf0e10cSrcweir new CompareUnboxed()); 1431cdf0e10cSrcweir success &= testMapAny(transport, 1432cdf0e10cSrcweir new Any(new Type("[][]unsigned hyper", 1433cdf0e10cSrcweir TypeClass.SEQUENCE), 1434cdf0e10cSrcweir new long[][] { new long[] {} }), 1435cdf0e10cSrcweir new CompareBoxed()); 1436cdf0e10cSrcweir success &= testMapAny(transport, 1437cdf0e10cSrcweir new Any(new Type("[][]unsigned hyper", 1438cdf0e10cSrcweir TypeClass.SEQUENCE), 1439cdf0e10cSrcweir new long[][] { 1440cdf0e10cSrcweir new long[] { 1441cdf0e10cSrcweir 0L, 1442cdf0e10cSrcweir -9223372036854775808L } }), 1443cdf0e10cSrcweir new CompareBoxed()); 1444cdf0e10cSrcweir success &= testMapAny(transport, new float[][] { new float[] {} }, 1445cdf0e10cSrcweir new CompareBoxed()); 1446cdf0e10cSrcweir success &= testMapAny(transport, 1447cdf0e10cSrcweir new float[][] { 1448cdf0e10cSrcweir new float[] { Float.NEGATIVE_INFINITY, 1449cdf0e10cSrcweir Float.MIN_VALUE, -0.0f, 1450cdf0e10cSrcweir 0.0f, Float.MAX_VALUE, 1451cdf0e10cSrcweir Float.POSITIVE_INFINITY, 1452cdf0e10cSrcweir Float.NaN } }, 1453cdf0e10cSrcweir new CompareBoxed()); 1454cdf0e10cSrcweir success &= testMapAny(transport, 1455cdf0e10cSrcweir new Any(new Type(float[][].class), 1456cdf0e10cSrcweir new float[][] { new float[] {} }), 1457cdf0e10cSrcweir new CompareUnboxed()); 1458cdf0e10cSrcweir success &= testMapAny(transport, 1459cdf0e10cSrcweir new Any(new Type(float[][].class), 1460cdf0e10cSrcweir new float[][] { 1461cdf0e10cSrcweir new float[] { 1462cdf0e10cSrcweir Float.NEGATIVE_INFINITY, 1463cdf0e10cSrcweir Float.MIN_VALUE, -0.0f, 0.0f, 1464cdf0e10cSrcweir Float.MAX_VALUE, 1465cdf0e10cSrcweir Float.POSITIVE_INFINITY, 1466cdf0e10cSrcweir Float.NaN } }), 1467cdf0e10cSrcweir new CompareUnboxed()); 1468cdf0e10cSrcweir success &= testMapAny(transport, new double[][] { new double[] {} }, 1469cdf0e10cSrcweir new CompareBoxed()); 1470cdf0e10cSrcweir success &= testMapAny(transport, 1471cdf0e10cSrcweir new double[][] { 1472cdf0e10cSrcweir new double[] { Double.NEGATIVE_INFINITY, 1473cdf0e10cSrcweir Double.MIN_VALUE, -0.0, 1474cdf0e10cSrcweir 0.0, Double.MAX_VALUE, 1475cdf0e10cSrcweir Double.POSITIVE_INFINITY, 1476cdf0e10cSrcweir Double.NaN } }, 1477cdf0e10cSrcweir new CompareBoxed()); 1478cdf0e10cSrcweir success &= testMapAny(transport, 1479cdf0e10cSrcweir new Any(new Type(double[][].class), 1480cdf0e10cSrcweir new double[][] { new double[] {} }), 1481cdf0e10cSrcweir new CompareUnboxed()); 1482cdf0e10cSrcweir success &= testMapAny(transport, 1483cdf0e10cSrcweir new Any(new Type(double[][].class), 1484cdf0e10cSrcweir new double[][] { 1485cdf0e10cSrcweir new double[] { 1486cdf0e10cSrcweir Double.NEGATIVE_INFINITY, 1487cdf0e10cSrcweir Double.MIN_VALUE, -0.0, 0.0, 1488cdf0e10cSrcweir Double.MAX_VALUE, 1489cdf0e10cSrcweir Double.POSITIVE_INFINITY, 1490cdf0e10cSrcweir Double.NaN } }), 1491cdf0e10cSrcweir new CompareUnboxed()); 1492cdf0e10cSrcweir success &= testMapAny(transport, new char[][] { new char[] {} }, 1493cdf0e10cSrcweir new CompareBoxed()); 1494cdf0e10cSrcweir success &= testMapAny(transport, 1495cdf0e10cSrcweir new char[][] { 1496cdf0e10cSrcweir new char[] { '\u0000', '\uDBFF', 1497cdf0e10cSrcweir '\uFFFD' } }, 1498cdf0e10cSrcweir new CompareBoxed()); 1499cdf0e10cSrcweir success &= testMapAny(transport, 1500cdf0e10cSrcweir new Any(new Type(char[][].class), 1501cdf0e10cSrcweir new char[][] { new char[] {} }), 1502cdf0e10cSrcweir new CompareUnboxed()); 1503cdf0e10cSrcweir success &= testMapAny(transport, 1504cdf0e10cSrcweir new Any( 1505cdf0e10cSrcweir new Type(char[][].class), 1506cdf0e10cSrcweir new char[][] { 1507cdf0e10cSrcweir new char[] { '\u0000', '\uDBFF', 1508cdf0e10cSrcweir '\uFFFD' } }), 1509cdf0e10cSrcweir new CompareUnboxed()); 1510cdf0e10cSrcweir success &= testMapAny(transport, new String[][] { new String[] {} }, 1511cdf0e10cSrcweir new CompareBoxed()); 1512cdf0e10cSrcweir success &= testMapAny(transport, 1513cdf0e10cSrcweir new String[][] { 1514cdf0e10cSrcweir new String[] { "", "\uD800\uDC00", 1515cdf0e10cSrcweir "Test" } }, 1516cdf0e10cSrcweir new CompareBoxed()); 1517cdf0e10cSrcweir success &= testMapAny(transport, 1518cdf0e10cSrcweir new Any(new Type(String[][].class), 1519cdf0e10cSrcweir new String[][] { new String[] {} }), 1520cdf0e10cSrcweir new CompareUnboxed()); 1521cdf0e10cSrcweir success &= testMapAny(transport, 1522cdf0e10cSrcweir new Any(new Type(String[][].class), 1523cdf0e10cSrcweir new String[][] { 1524cdf0e10cSrcweir new String[] { "", "\uD800\uDC00", 1525cdf0e10cSrcweir "Test" } }), 1526cdf0e10cSrcweir new CompareUnboxed()); 1527cdf0e10cSrcweir success &= testMapAny(transport, new Type[][] { new Type[] {} }, 1528cdf0e10cSrcweir new CompareBoxed()); 1529cdf0e10cSrcweir success &= testMapAny(transport, 1530cdf0e10cSrcweir new Type[][] { 1531cdf0e10cSrcweir new Type[] { 1532cdf0e10cSrcweir Type.VOID, 1533cdf0e10cSrcweir new Type( 1534cdf0e10cSrcweir DerivedInterface.class.getName(), 1535cdf0e10cSrcweir TypeClass.INTERFACE) } }, 1536cdf0e10cSrcweir new CompareBoxed()); 1537cdf0e10cSrcweir success &= testMapAny(transport, 1538cdf0e10cSrcweir new Any(new Type(Type[][].class), 1539cdf0e10cSrcweir new Type[][] { new Type[] {} }), 1540cdf0e10cSrcweir new CompareUnboxed()); 1541cdf0e10cSrcweir success &= testMapAny(transport, 1542cdf0e10cSrcweir new Any( 1543cdf0e10cSrcweir new Type(Type[][].class), 1544cdf0e10cSrcweir new Type[][] { 1545cdf0e10cSrcweir new Type[] { 1546cdf0e10cSrcweir Type.VOID, 1547cdf0e10cSrcweir new Type( 1548cdf0e10cSrcweir DerivedInterface.class. 1549cdf0e10cSrcweir getName(), 1550cdf0e10cSrcweir TypeClass.INTERFACE) } }), 1551cdf0e10cSrcweir new CompareUnboxed()); 1552cdf0e10cSrcweir success &= testMapAny(transport, new Object[][] { new Object[] {} }, 1553cdf0e10cSrcweir new CompareBoxed()); 1554cdf0e10cSrcweir success &= testMapAny(transport, 1555cdf0e10cSrcweir new Object[][] { 1556cdf0e10cSrcweir new Object[] { Any.VOID, 1557cdf0e10cSrcweir Boolean.FALSE } }, 1558cdf0e10cSrcweir new CompareBoxed()); 1559cdf0e10cSrcweir success &= testMapAny(transport, 1560cdf0e10cSrcweir new Object[][] { 1561cdf0e10cSrcweir new Object[] { 1562cdf0e10cSrcweir Boolean.FALSE, 1563cdf0e10cSrcweir new Any(Type.BOOLEAN, 1564cdf0e10cSrcweir Boolean.TRUE) } }, 1565cdf0e10cSrcweir new CompareBoxed(true)); 1566cdf0e10cSrcweir success &= testMapAny(transport, 1567cdf0e10cSrcweir new Any(new Type(Any[][].class), 1568cdf0e10cSrcweir new Object[][] { new Object[] {} }), 1569cdf0e10cSrcweir new CompareUnboxed()); 1570cdf0e10cSrcweir success &= testMapAny(transport, 1571cdf0e10cSrcweir new Any(new Type(Any[][].class), 1572cdf0e10cSrcweir new Object[][] { 1573cdf0e10cSrcweir new Object[] { Any.VOID, 1574cdf0e10cSrcweir Boolean.FALSE } }), 1575cdf0e10cSrcweir new CompareUnboxed()); 1576cdf0e10cSrcweir success &= testMapAny(transport, 1577cdf0e10cSrcweir new Any(new Type(Any[][].class), 1578cdf0e10cSrcweir new Object[][] { 1579cdf0e10cSrcweir new Object[] { 1580cdf0e10cSrcweir Boolean.FALSE, 1581cdf0e10cSrcweir new Any(Type.BOOLEAN, 1582cdf0e10cSrcweir Boolean.TRUE) } }), 1583cdf0e10cSrcweir new CompareUnboxed(true)); 1584cdf0e10cSrcweir success &= testMapAny(transport, new Any[][] { new Any[] {} }, 1585cdf0e10cSrcweir new CompareSpecific( 1586cdf0e10cSrcweir new Object[][] { new Object[] {} })); 1587cdf0e10cSrcweir success &= testMapAny(transport, 1588cdf0e10cSrcweir new Any[][] { 1589cdf0e10cSrcweir new Any[] { Any.VOID, 1590cdf0e10cSrcweir new Any(Type.BOOLEAN, 1591cdf0e10cSrcweir Boolean.TRUE) } }, 1592cdf0e10cSrcweir new CompareSpecific( 1593cdf0e10cSrcweir new Object[][] { 1594cdf0e10cSrcweir new Object[] { Any.VOID, 1595cdf0e10cSrcweir Boolean.TRUE } })); 1596cdf0e10cSrcweir success &= testMapAny(transport, 1597cdf0e10cSrcweir new Any(new Type(Any[][].class), 1598cdf0e10cSrcweir new Any[][] { new Any[] {} }), 1599cdf0e10cSrcweir new CompareSpecific( 1600cdf0e10cSrcweir new Object[][] { new Object[] {} })); 1601cdf0e10cSrcweir success &= testMapAny(transport, 1602cdf0e10cSrcweir new Any(new Type(Any[][].class), 1603cdf0e10cSrcweir new Any[][] { 1604cdf0e10cSrcweir new Any[] { 1605cdf0e10cSrcweir Any.VOID, 1606cdf0e10cSrcweir new Any(Type.BOOLEAN, 1607cdf0e10cSrcweir Boolean.TRUE) } }), 1608cdf0e10cSrcweir new CompareSpecific( 1609cdf0e10cSrcweir new Object[][] { 1610cdf0e10cSrcweir new Object[] { Any.VOID, 1611cdf0e10cSrcweir Boolean.TRUE } })); 1612cdf0e10cSrcweir success &= testMapAny(transport, 1613cdf0e10cSrcweir new Any(new Type(Any[][].class), 1614cdf0e10cSrcweir new Boolean[][] { new Boolean[] {} }), 1615cdf0e10cSrcweir new CompareSpecific( 1616cdf0e10cSrcweir new Object[][] { new Object[] {} })); 1617cdf0e10cSrcweir success &= testMapAny(transport, 1618cdf0e10cSrcweir new Any(new Type(Any[][].class), 1619cdf0e10cSrcweir new Boolean[][] { 1620cdf0e10cSrcweir new Boolean[] { 1621cdf0e10cSrcweir Boolean.FALSE } }), 1622cdf0e10cSrcweir new CompareSpecific( 1623cdf0e10cSrcweir new Object[][] { 1624cdf0e10cSrcweir new Object[] { Boolean.FALSE } })); 1625cdf0e10cSrcweir if (createTypes) { 1626cdf0e10cSrcweir success &= testMapAny(transport, new Enum1[][] { new Enum1[] {} }, 1627cdf0e10cSrcweir new CompareBoxed()); 1628cdf0e10cSrcweir success &= testMapAny(transport, 1629cdf0e10cSrcweir new Enum1[][] { 1630cdf0e10cSrcweir new Enum1[] { new Enum1(), 1631cdf0e10cSrcweir new Enum2() } }, 1632cdf0e10cSrcweir new CompareSpecific( 1633cdf0e10cSrcweir new Enum1[][] { 1634cdf0e10cSrcweir new Enum1[] { new Enum1(), 1635cdf0e10cSrcweir new Enum1() } })); 1636cdf0e10cSrcweir success &= testMapAny(transport, 1637cdf0e10cSrcweir new Any(new Type(Enum1[][].class), 1638cdf0e10cSrcweir new Enum1[][] { new Enum1[] {} }), 1639cdf0e10cSrcweir new CompareUnboxed()); 1640cdf0e10cSrcweir success &= testMapAny(transport, 1641cdf0e10cSrcweir new Any(new Type(Enum1[][].class), 1642cdf0e10cSrcweir new Enum1[][] { 1643cdf0e10cSrcweir new Enum1[] { new Enum1(), 1644cdf0e10cSrcweir new Enum2() } }), 1645cdf0e10cSrcweir new CompareSpecific( 1646cdf0e10cSrcweir new Enum1[][] { 1647cdf0e10cSrcweir new Enum1[] { new Enum1(), 1648cdf0e10cSrcweir new Enum1() } })); 1649cdf0e10cSrcweir success &= testMapAny(transport, 1650cdf0e10cSrcweir new Any(new Type(Enum1[][].class), 1651cdf0e10cSrcweir new Enum2[][] { new Enum2[] {} }), 1652cdf0e10cSrcweir new CompareSpecific( 1653cdf0e10cSrcweir new Enum1[][] { new Enum1[] {} })); 1654cdf0e10cSrcweir success &= testMapAny(transport, 1655cdf0e10cSrcweir new Any(new Type(Enum1[][].class), 1656cdf0e10cSrcweir new Enum2[][] { 1657cdf0e10cSrcweir new Enum2[] { new Enum2() } }), 1658cdf0e10cSrcweir new CompareSpecific( 1659cdf0e10cSrcweir new Enum1[][] { 1660cdf0e10cSrcweir new Enum1[] { new Enum1() } })); 1661cdf0e10cSrcweir success &= testMapAny(transport, 1662cdf0e10cSrcweir new BaseStruct[][] { new BaseStruct[] {} }, 1663cdf0e10cSrcweir new CompareBoxed()); 1664cdf0e10cSrcweir success &= testMapAny(transport, 1665cdf0e10cSrcweir new BaseStruct[][] { 1666cdf0e10cSrcweir new BaseStruct[] { 1667cdf0e10cSrcweir new BaseStruct(), 1668cdf0e10cSrcweir new DerivedStruct() } }, 1669cdf0e10cSrcweir new CompareSpecific( 1670cdf0e10cSrcweir new BaseStruct[][] { 1671cdf0e10cSrcweir new BaseStruct[] { 1672cdf0e10cSrcweir new BaseStruct(), 1673cdf0e10cSrcweir new BaseStruct() } })); 1674cdf0e10cSrcweir success &= testMapAny(transport, 1675cdf0e10cSrcweir new Any(new Type(BaseStruct[][].class), 1676cdf0e10cSrcweir new BaseStruct[][] { 1677cdf0e10cSrcweir new BaseStruct[] {} }), 1678cdf0e10cSrcweir new CompareUnboxed()); 1679cdf0e10cSrcweir success &= testMapAny(transport, 1680cdf0e10cSrcweir new Any(new Type(BaseStruct[][].class), 1681cdf0e10cSrcweir new BaseStruct[][] { 1682cdf0e10cSrcweir new BaseStruct[] { 1683cdf0e10cSrcweir new BaseStruct(), 1684cdf0e10cSrcweir new DerivedStruct() } }), 1685cdf0e10cSrcweir new CompareSpecific( 1686cdf0e10cSrcweir new BaseStruct[][] { 1687cdf0e10cSrcweir new BaseStruct[] { 1688cdf0e10cSrcweir new BaseStruct(), 1689cdf0e10cSrcweir new BaseStruct() } })); 1690cdf0e10cSrcweir success &= testMapAny(transport, 1691cdf0e10cSrcweir new Any(new Type(BaseStruct[][].class), 1692cdf0e10cSrcweir new DerivedStruct[][] { 1693cdf0e10cSrcweir new DerivedStruct[] {} }), 1694cdf0e10cSrcweir new CompareSpecific( 1695cdf0e10cSrcweir new BaseStruct[][] { 1696cdf0e10cSrcweir new BaseStruct[] {} })); 1697cdf0e10cSrcweir success &= testMapAny(transport, 1698cdf0e10cSrcweir new Any(new Type(BaseStruct[][].class), 1699cdf0e10cSrcweir new DerivedStruct[][] { 1700cdf0e10cSrcweir new DerivedStruct[] { 1701cdf0e10cSrcweir new DerivedStruct() } }), 1702cdf0e10cSrcweir new CompareSpecific( 1703cdf0e10cSrcweir new BaseStruct[][] { 1704cdf0e10cSrcweir new BaseStruct[] { 1705cdf0e10cSrcweir new BaseStruct() } })); 1706cdf0e10cSrcweir success &= testMapAny(transport, 1707cdf0e10cSrcweir new DerivedStruct[][] { 1708cdf0e10cSrcweir new DerivedStruct[] {} }, 1709cdf0e10cSrcweir new CompareBoxed()); 1710cdf0e10cSrcweir success &= testMapAny(transport, 1711cdf0e10cSrcweir new DerivedStruct[][] { 1712cdf0e10cSrcweir new DerivedStruct[] { 1713cdf0e10cSrcweir new DerivedStruct() } }, 1714cdf0e10cSrcweir new CompareBoxed()); 1715cdf0e10cSrcweir success &= testMapAny(transport, 1716cdf0e10cSrcweir new Any(new Type(DerivedStruct[][].class), 1717cdf0e10cSrcweir new DerivedStruct[][] { 1718cdf0e10cSrcweir new DerivedStruct[] {} }), 1719cdf0e10cSrcweir new CompareUnboxed()); 1720cdf0e10cSrcweir success &= testMapAny(transport, 1721cdf0e10cSrcweir new Any(new Type(DerivedStruct[][].class), 1722cdf0e10cSrcweir new DerivedStruct[][] { 1723cdf0e10cSrcweir new DerivedStruct[] { 1724cdf0e10cSrcweir new DerivedStruct() } }), 1725cdf0e10cSrcweir new CompareUnboxed()); 1726cdf0e10cSrcweir } 1727cdf0e10cSrcweir success &= testMapAny(transport, 1728cdf0e10cSrcweir new XInterface[][] { new XInterface[] {} }, 1729cdf0e10cSrcweir new CompareBoxed()); 1730cdf0e10cSrcweir success &= testMapAny(transport, 1731cdf0e10cSrcweir new XInterface[][] { 1732cdf0e10cSrcweir new XInterface[] { 1733cdf0e10cSrcweir null, new XInterface() {}, 1734cdf0e10cSrcweir new BaseInterface() {}, 1735cdf0e10cSrcweir new DerivedInterface() {} } }, 1736cdf0e10cSrcweir new CompareBoxed()); 1737cdf0e10cSrcweir success &= testMapAny(transport, 1738cdf0e10cSrcweir new Any(new Type(XInterface[][].class), 1739cdf0e10cSrcweir new XInterface[][] { 1740cdf0e10cSrcweir new XInterface[] {} }), 1741cdf0e10cSrcweir new CompareUnboxed()); 1742cdf0e10cSrcweir success &= testMapAny(transport, 1743cdf0e10cSrcweir new Any( 1744cdf0e10cSrcweir new Type(XInterface[][].class), 1745cdf0e10cSrcweir new XInterface[][] { 1746cdf0e10cSrcweir new XInterface[] { 1747cdf0e10cSrcweir null, new XInterface() {}, 1748cdf0e10cSrcweir new BaseInterface() {}, 1749cdf0e10cSrcweir new DerivedInterface() {} } }), 1750cdf0e10cSrcweir new CompareUnboxed()); 1751cdf0e10cSrcweir success &= testMapAny(transport, 1752cdf0e10cSrcweir new Any(new Type(XInterface[][].class), 1753cdf0e10cSrcweir new Object[][] { new Object[] {} }), 1754cdf0e10cSrcweir new CompareSpecific( 1755cdf0e10cSrcweir new XInterface[][] { 1756cdf0e10cSrcweir new XInterface[] {} })); 1757cdf0e10cSrcweir { 1758cdf0e10cSrcweir XInterface if1 = new XInterface() {}; 1759cdf0e10cSrcweir XInterface if2 = new BaseInterface() {}; 1760cdf0e10cSrcweir XInterface if3 = new DerivedInterface() {}; 1761cdf0e10cSrcweir success &= testMapAny(transport, 1762cdf0e10cSrcweir new Any(new Type(XInterface[][].class), 1763cdf0e10cSrcweir new Object[][] { 1764cdf0e10cSrcweir new Object[] { null, if1, if2, 1765cdf0e10cSrcweir if3 } }), 1766cdf0e10cSrcweir new CompareSpecific( 1767cdf0e10cSrcweir new XInterface[][] { 1768cdf0e10cSrcweir new XInterface[] { null, if1, if2, 1769cdf0e10cSrcweir if3 } })); 1770cdf0e10cSrcweir } 1771cdf0e10cSrcweir success &= testMapAny(transport, 1772cdf0e10cSrcweir new Any(new Type(XInterface[][].class), 1773cdf0e10cSrcweir new BaseInterface[][] { 1774cdf0e10cSrcweir new BaseInterface[] {} }), 1775cdf0e10cSrcweir new CompareSpecific( 1776cdf0e10cSrcweir new XInterface[][] { 1777cdf0e10cSrcweir new XInterface[] {} })); 1778cdf0e10cSrcweir { 1779cdf0e10cSrcweir BaseInterface if1 = new BaseInterface() {}; 1780cdf0e10cSrcweir BaseInterface if2 = new DerivedInterface() {}; 1781cdf0e10cSrcweir success &= testMapAny(transport, 1782cdf0e10cSrcweir new Any(new Type(XInterface[][].class), 1783cdf0e10cSrcweir new BaseInterface[][] { 1784cdf0e10cSrcweir new BaseInterface[] { 1785cdf0e10cSrcweir null, if1, if2 } }), 1786cdf0e10cSrcweir new CompareSpecific( 1787cdf0e10cSrcweir new XInterface[][] { 1788cdf0e10cSrcweir new XInterface[] { 1789cdf0e10cSrcweir null, if1, if2 } })); 1790cdf0e10cSrcweir } 1791cdf0e10cSrcweir success &= testMapAny(transport, 1792cdf0e10cSrcweir new Any(new Type(XInterface[][].class), 1793cdf0e10cSrcweir new DerivedInterface[][] { 1794cdf0e10cSrcweir new DerivedInterface[] {} }), 1795cdf0e10cSrcweir new CompareSpecific( 1796cdf0e10cSrcweir new XInterface[][] { 1797cdf0e10cSrcweir new XInterface[] {} })); 1798cdf0e10cSrcweir { 1799cdf0e10cSrcweir DerivedInterface if1 = new DerivedInterface() {}; 1800cdf0e10cSrcweir success &= testMapAny(transport, 1801cdf0e10cSrcweir new Any(new Type(XInterface[][].class), 1802cdf0e10cSrcweir new DerivedInterface[][] { 1803cdf0e10cSrcweir new DerivedInterface[] { 1804cdf0e10cSrcweir null, if1 } }), 1805cdf0e10cSrcweir new CompareSpecific( 1806cdf0e10cSrcweir new XInterface[][] { 1807cdf0e10cSrcweir new XInterface[] { 1808cdf0e10cSrcweir null, if1 } })); 1809cdf0e10cSrcweir } 1810cdf0e10cSrcweir success &= testMapAny(transport, 1811cdf0e10cSrcweir new BaseInterface[][] { 1812cdf0e10cSrcweir new BaseInterface[] {} }, 1813cdf0e10cSrcweir new CompareBoxed()); 1814cdf0e10cSrcweir success &= testMapAny(transport, 1815cdf0e10cSrcweir new BaseInterface[][] { 1816cdf0e10cSrcweir new BaseInterface[] { 1817cdf0e10cSrcweir null, new BaseInterface() {}, 1818cdf0e10cSrcweir new DerivedInterface() {} } }, 1819cdf0e10cSrcweir new CompareBoxed()); 1820cdf0e10cSrcweir success &= testMapAny(transport, 1821cdf0e10cSrcweir new Any(new Type(BaseInterface[][].class), 1822cdf0e10cSrcweir new BaseInterface[][] { 1823cdf0e10cSrcweir new BaseInterface[] {} }), 1824cdf0e10cSrcweir new CompareUnboxed()); 1825cdf0e10cSrcweir success &= testMapAny(transport, 1826cdf0e10cSrcweir new Any( 1827cdf0e10cSrcweir new Type(BaseInterface[][].class), 1828cdf0e10cSrcweir new BaseInterface[][] { 1829cdf0e10cSrcweir new BaseInterface[] { 1830cdf0e10cSrcweir null, new BaseInterface() {}, 1831cdf0e10cSrcweir new DerivedInterface() {} } }), 1832cdf0e10cSrcweir new CompareUnboxed()); 1833cdf0e10cSrcweir success &= testMapAny(transport, 1834cdf0e10cSrcweir new Any(new Type(BaseInterface[][].class), 1835cdf0e10cSrcweir new DerivedInterface[][] { 1836cdf0e10cSrcweir new DerivedInterface[] {} }), 1837cdf0e10cSrcweir new CompareSpecific( 1838cdf0e10cSrcweir new BaseInterface[][] { 1839cdf0e10cSrcweir new BaseInterface[] {} })); 1840cdf0e10cSrcweir { 1841cdf0e10cSrcweir DerivedInterface if1 = new DerivedInterface() {}; 1842cdf0e10cSrcweir success &= testMapAny(transport, 1843cdf0e10cSrcweir new Any(new Type(BaseInterface[][].class), 1844cdf0e10cSrcweir new DerivedInterface[][] { 1845cdf0e10cSrcweir new DerivedInterface[] { 1846cdf0e10cSrcweir null, if1 } }), 1847cdf0e10cSrcweir new CompareSpecific( 1848cdf0e10cSrcweir new BaseInterface[][] { 1849cdf0e10cSrcweir new BaseInterface[] { 1850cdf0e10cSrcweir null, if1 } })); 1851cdf0e10cSrcweir } 1852cdf0e10cSrcweir success &= testMapAny(transport, 1853cdf0e10cSrcweir new DerivedInterface[][] { 1854cdf0e10cSrcweir new DerivedInterface[] {} }, 1855cdf0e10cSrcweir new CompareBoxed()); 1856cdf0e10cSrcweir success &= testMapAny(transport, 1857cdf0e10cSrcweir new DerivedInterface[][] { 1858cdf0e10cSrcweir new DerivedInterface[] { 1859cdf0e10cSrcweir null, new DerivedInterface() {} } }, 1860cdf0e10cSrcweir new CompareBoxed()); 1861cdf0e10cSrcweir success &= testMapAny(transport, 1862cdf0e10cSrcweir new Any(new Type(DerivedInterface[][].class), 1863cdf0e10cSrcweir new DerivedInterface[][] { 1864cdf0e10cSrcweir new DerivedInterface[] {} }), 1865cdf0e10cSrcweir new CompareUnboxed()); 1866cdf0e10cSrcweir success &= testMapAny(transport, 1867cdf0e10cSrcweir new Any( 1868cdf0e10cSrcweir new Type(DerivedInterface[][].class), 1869cdf0e10cSrcweir new DerivedInterface[][] { 1870cdf0e10cSrcweir new DerivedInterface[] { 1871cdf0e10cSrcweir null, 1872cdf0e10cSrcweir new DerivedInterface() {} } }), 1873cdf0e10cSrcweir new CompareUnboxed()); 1874cdf0e10cSrcweir 1875cdf0e10cSrcweir // Enum Types: 1876cdf0e10cSrcweir if (createTypes) { 1877cdf0e10cSrcweir success &= testMapAny(transport, new Enum1(), new CompareBoxed()); 1878cdf0e10cSrcweir success &= testMapAny(transport, new Any(new Type(Enum1.class), 1879cdf0e10cSrcweir new Enum1()), 1880cdf0e10cSrcweir new CompareUnboxed()); 1881cdf0e10cSrcweir success &= testMapAny(transport, new Any(new Type(Enum1.class), 1882cdf0e10cSrcweir new Enum2()), 1883cdf0e10cSrcweir new CompareSpecific(new Enum1())); 1884cdf0e10cSrcweir } 1885cdf0e10cSrcweir 1886cdf0e10cSrcweir // Struct Types: 1887cdf0e10cSrcweir if (createTypes) { 1888cdf0e10cSrcweir success &= testMapAny(transport, new BaseStruct(), 1889cdf0e10cSrcweir new CompareBoxed()); 1890cdf0e10cSrcweir success &= testMapAny(transport, 1891cdf0e10cSrcweir new Any(new Type(BaseStruct.class), 1892cdf0e10cSrcweir new BaseStruct()), 1893cdf0e10cSrcweir new CompareUnboxed()); 1894cdf0e10cSrcweir success &= testMapAny(transport, 1895cdf0e10cSrcweir new Any(new Type(BaseStruct.class), 1896cdf0e10cSrcweir new DerivedStruct()), 1897cdf0e10cSrcweir new CompareSpecific(new BaseStruct())); 1898cdf0e10cSrcweir success &= testMapAny(transport, new DerivedStruct(), 1899cdf0e10cSrcweir new CompareBoxed()); 1900cdf0e10cSrcweir success &= testMapAny(transport, 1901cdf0e10cSrcweir new Any(new Type(DerivedStruct.class), 1902cdf0e10cSrcweir new DerivedStruct()), 1903cdf0e10cSrcweir new CompareUnboxed()); 1904cdf0e10cSrcweir } 1905cdf0e10cSrcweir 1906cdf0e10cSrcweir // Exception Types: 1907cdf0e10cSrcweir success &= testMapAny(transport, new com.sun.star.uno.Exception(), 1908cdf0e10cSrcweir new CompareClass( 1909cdf0e10cSrcweir com.sun.star.uno.Exception.class)); 1910cdf0e10cSrcweir success &= testMapAny(transport, 1911cdf0e10cSrcweir new Any(new Type( 1912cdf0e10cSrcweir com.sun.star.uno.Exception.class), 1913cdf0e10cSrcweir new com.sun.star.uno.Exception()), 1914cdf0e10cSrcweir new CompareClass( 1915cdf0e10cSrcweir com.sun.star.uno.Exception.class)); 1916cdf0e10cSrcweir success &= testMapAny(transport, 1917cdf0e10cSrcweir new Any(new Type( 1918cdf0e10cSrcweir com.sun.star.uno.Exception.class), 1919cdf0e10cSrcweir new BaseException()), 1920cdf0e10cSrcweir new CompareClass( 1921cdf0e10cSrcweir com.sun.star.uno.Exception.class)); 1922cdf0e10cSrcweir success &= testMapAny(transport, 1923cdf0e10cSrcweir new Any(new Type( 1924cdf0e10cSrcweir com.sun.star.uno.Exception.class), 1925cdf0e10cSrcweir new DerivedException()), 1926cdf0e10cSrcweir new CompareClass( 1927cdf0e10cSrcweir com.sun.star.uno.Exception.class)); 1928cdf0e10cSrcweir if (createTypes) { 1929cdf0e10cSrcweir success &= testMapAny(transport, new BaseException(), 1930cdf0e10cSrcweir new CompareBoxed()); 1931cdf0e10cSrcweir success &= testMapAny(transport, 1932cdf0e10cSrcweir new Any(new Type(BaseException.class), 1933cdf0e10cSrcweir new BaseException()), 1934cdf0e10cSrcweir new CompareUnboxed()); 1935cdf0e10cSrcweir success &= testMapAny(transport, 1936cdf0e10cSrcweir new Any(new Type(BaseException.class), 1937cdf0e10cSrcweir new DerivedException()), 1938cdf0e10cSrcweir new CompareSpecific(new BaseException())); 1939cdf0e10cSrcweir success &= testMapAny(transport, new DerivedException(), 1940cdf0e10cSrcweir new CompareBoxed()); 1941cdf0e10cSrcweir success &= testMapAny(transport, 1942cdf0e10cSrcweir new Any(new Type(DerivedException.class), 1943cdf0e10cSrcweir new DerivedException()), 1944cdf0e10cSrcweir new CompareUnboxed()); 1945cdf0e10cSrcweir } 1946cdf0e10cSrcweir success &= testMapAny(transport, 1947cdf0e10cSrcweir new com.sun.star.uno.RuntimeException(), 1948cdf0e10cSrcweir new CompareClass( 1949cdf0e10cSrcweir com.sun.star.uno.RuntimeException.class)); 1950cdf0e10cSrcweir success &= testMapAny(transport, 1951cdf0e10cSrcweir new Any( 1952cdf0e10cSrcweir new Type( 1953cdf0e10cSrcweir com.sun.star.uno.RuntimeException. 1954cdf0e10cSrcweir class), 1955cdf0e10cSrcweir new com.sun.star.uno.RuntimeException()), 1956cdf0e10cSrcweir new CompareClass( 1957cdf0e10cSrcweir com.sun.star.uno.RuntimeException.class)); 1958cdf0e10cSrcweir success &= testMapAny(transport, 1959cdf0e10cSrcweir new Any( 1960cdf0e10cSrcweir new Type( 1961cdf0e10cSrcweir com.sun.star.uno.RuntimeException. 1962cdf0e10cSrcweir class), 1963cdf0e10cSrcweir new BaseRuntimeException()), 1964cdf0e10cSrcweir new CompareClass( 1965cdf0e10cSrcweir com.sun.star.uno.RuntimeException.class)); 1966cdf0e10cSrcweir success &= testMapAny(transport, 1967cdf0e10cSrcweir new Any( 1968cdf0e10cSrcweir new Type( 1969cdf0e10cSrcweir com.sun.star.uno.RuntimeException. 1970cdf0e10cSrcweir class), 1971cdf0e10cSrcweir new DerivedRuntimeException()), 1972cdf0e10cSrcweir new CompareClass( 1973cdf0e10cSrcweir com.sun.star.uno.RuntimeException.class)); 1974cdf0e10cSrcweir if (createTypes) { 1975cdf0e10cSrcweir success &= testMapAny(transport, new BaseRuntimeException(), 1976cdf0e10cSrcweir new CompareBoxed()); 1977cdf0e10cSrcweir success &= testMapAny(transport, 1978cdf0e10cSrcweir new Any(new Type( 1979cdf0e10cSrcweir BaseRuntimeException.class), 1980cdf0e10cSrcweir new BaseRuntimeException()), 1981cdf0e10cSrcweir new CompareUnboxed()); 1982cdf0e10cSrcweir success &= testMapAny(transport, 1983cdf0e10cSrcweir new Any(new Type( 1984cdf0e10cSrcweir BaseRuntimeException.class), 1985cdf0e10cSrcweir new DerivedRuntimeException()), 1986cdf0e10cSrcweir new CompareSpecific( 1987cdf0e10cSrcweir new BaseRuntimeException())); 1988cdf0e10cSrcweir success &= testMapAny(transport, new DerivedRuntimeException(), 1989cdf0e10cSrcweir new CompareBoxed()); 1990cdf0e10cSrcweir success &= testMapAny(transport, 1991cdf0e10cSrcweir new Any(new Type( 1992cdf0e10cSrcweir DerivedRuntimeException.class), 1993cdf0e10cSrcweir new DerivedRuntimeException()), 1994cdf0e10cSrcweir new CompareUnboxed()); 1995cdf0e10cSrcweir } 1996cdf0e10cSrcweir 1997cdf0e10cSrcweir // Interface Types: 1998cdf0e10cSrcweir success &= testMapAny(transport, null, new CompareBoxed()); 1999cdf0e10cSrcweir success &= testMapAny(transport, new XInterface() {}, 2000cdf0e10cSrcweir new CompareBoxed()); 2001cdf0e10cSrcweir success &= testMapAny(transport, new BaseInterface() {}, 2002cdf0e10cSrcweir new CompareBoxed()); 2003cdf0e10cSrcweir success &= testMapAny(transport, new DerivedInterface() {}, 2004cdf0e10cSrcweir new CompareBoxed()); 2005cdf0e10cSrcweir success &= testMapAny(transport, 2006cdf0e10cSrcweir new Any(new Type(XInterface.class), null), 2007cdf0e10cSrcweir new CompareUnboxed()); 2008cdf0e10cSrcweir success &= testMapAny(transport, 2009cdf0e10cSrcweir new Any(new Type(XInterface.class), 2010cdf0e10cSrcweir new XInterface() {}), 2011cdf0e10cSrcweir new CompareUnboxed()); 2012cdf0e10cSrcweir success &= testMapAny(transport, 2013cdf0e10cSrcweir new Any(new Type(XInterface.class), 2014cdf0e10cSrcweir new BaseInterface() {}), 2015cdf0e10cSrcweir new CompareUnboxed()); 2016cdf0e10cSrcweir success &= testMapAny(transport, 2017cdf0e10cSrcweir new Any(new Type(XInterface.class), 2018cdf0e10cSrcweir new DerivedInterface() {}), 2019cdf0e10cSrcweir new CompareUnboxed()); 2020cdf0e10cSrcweir success &= testMapAny(transport, 2021cdf0e10cSrcweir new Any(new Type(BaseInterface.class), null), 2022cdf0e10cSrcweir new CompareBoxed()); 2023cdf0e10cSrcweir success &= testMapAny(transport, 2024cdf0e10cSrcweir new Any(new Type(BaseInterface.class), 2025cdf0e10cSrcweir new BaseInterface() {}), 2026cdf0e10cSrcweir new CompareBoxed()); 2027cdf0e10cSrcweir success &= testMapAny(transport, 2028cdf0e10cSrcweir new Any(new Type(BaseInterface.class), 2029cdf0e10cSrcweir new DerivedInterface() {}), 2030cdf0e10cSrcweir new CompareBoxed()); 2031cdf0e10cSrcweir success &= testMapAny(transport, 2032cdf0e10cSrcweir new Any(new Type(DerivedInterface.class), 2033cdf0e10cSrcweir null), 2034cdf0e10cSrcweir new CompareBoxed()); 2035cdf0e10cSrcweir success &= testMapAny(transport, 2036cdf0e10cSrcweir new Any(new Type(DerivedInterface.class), 2037cdf0e10cSrcweir new DerivedInterface() {}), 2038cdf0e10cSrcweir new CompareBoxed()); 2039cdf0e10cSrcweir 2040cdf0e10cSrcweir // Misc: 2041cdf0e10cSrcweir try { 2042cdf0e10cSrcweir transport.mapAny(new Object()); 2043cdf0e10cSrcweir System.out.println("BAD mapAny(Object), no exception"); 2044cdf0e10cSrcweir success = false; 2045cdf0e10cSrcweir } catch (StackOverflowError e) { 2046cdf0e10cSrcweir System.out.println("BAD mapAny(Object): " + e); 2047cdf0e10cSrcweir success = false; 2048cdf0e10cSrcweir } catch (RuntimeException e) {} 2049cdf0e10cSrcweir 2050cdf0e10cSrcweir return success; 2051cdf0e10cSrcweir } 2052cdf0e10cSrcweir TestAny()2053cdf0e10cSrcweir private TestAny() {} // do not instantiate 2054cdf0e10cSrcweir testType(Class zclass, TypeClass tclass, String tname)2055cdf0e10cSrcweir private static boolean testType(Class zclass, TypeClass tclass, 2056cdf0e10cSrcweir String tname) { 2057cdf0e10cSrcweir Type t1 = new Type(zclass); 2058cdf0e10cSrcweir Type t2 = new Type(tname, tclass); 2059cdf0e10cSrcweir boolean ok = true; 2060cdf0e10cSrcweir if (t1.getTypeClass() != tclass) { 2061cdf0e10cSrcweir ok = false; 2062cdf0e10cSrcweir System.out.println("BAD Type(" + zclass + ").getTypeClass() = " 2063cdf0e10cSrcweir + t1.getTypeClass() + " != " + tclass); 2064cdf0e10cSrcweir } 2065cdf0e10cSrcweir if (!t1.getTypeName().equals(tname)) { 2066cdf0e10cSrcweir ok = false; 2067cdf0e10cSrcweir System.out.println("BAD Type(" + zclass + ").getTypeName() = " 2068cdf0e10cSrcweir + t1.getTypeName() + " != " + tname); 2069cdf0e10cSrcweir } 2070cdf0e10cSrcweir if (!t1.equals(t2)) { 2071cdf0e10cSrcweir ok = false; 2072cdf0e10cSrcweir System.out.println("BAD Type(" + zclass + ") != Type(" + tname 2073cdf0e10cSrcweir + ", " + tclass + ")"); 2074cdf0e10cSrcweir } 2075cdf0e10cSrcweir return ok; 2076cdf0e10cSrcweir } 2077cdf0e10cSrcweir testMapAny(XTransport transport, Object any, Compare compare)2078cdf0e10cSrcweir private static boolean testMapAny(XTransport transport, Object any, 2079cdf0e10cSrcweir Compare compare) { 2080cdf0e10cSrcweir Object any2 = transport.mapAny(any); 2081cdf0e10cSrcweir boolean eq = compare.equal(any, any2); 2082cdf0e10cSrcweir if (!eq) { 2083cdf0e10cSrcweir System.out.println("BAD mapAny(" + any + ") -> " + any2); 2084cdf0e10cSrcweir } 2085cdf0e10cSrcweir return eq; 2086cdf0e10cSrcweir } 2087cdf0e10cSrcweir 2088cdf0e10cSrcweir private static abstract class Compare { equal(Object o1, Object o2)2089cdf0e10cSrcweir public abstract boolean equal(Object o1, Object o2); 2090cdf0e10cSrcweir } 2091cdf0e10cSrcweir 2092cdf0e10cSrcweir private static final class CompareBoxed extends Compare { CompareBoxed()2093cdf0e10cSrcweir public CompareBoxed() { 2094cdf0e10cSrcweir this(false); 2095cdf0e10cSrcweir } 2096cdf0e10cSrcweir CompareBoxed(boolean unboxInner)2097cdf0e10cSrcweir public CompareBoxed(boolean unboxInner) { 2098cdf0e10cSrcweir this.unboxInner = unboxInner; 2099cdf0e10cSrcweir } 2100cdf0e10cSrcweir equal(Object o1, Object o2)2101cdf0e10cSrcweir public boolean equal(Object o1, Object o2) { 2102cdf0e10cSrcweir if (o1 instanceof Any) { 2103cdf0e10cSrcweir return o2 instanceof Any 2104cdf0e10cSrcweir && ((Any) o1).getType().equals(((Any) o2).getType()) 2105cdf0e10cSrcweir && equalValues(((Any) o1).getObject(), 2106cdf0e10cSrcweir ((Any) o2).getObject()); 2107cdf0e10cSrcweir } else { 2108cdf0e10cSrcweir return equalValues(o1, o2); 2109cdf0e10cSrcweir } 2110cdf0e10cSrcweir } 2111cdf0e10cSrcweir equalValues(Object o1, Object o2)2112cdf0e10cSrcweir private boolean equalValues(Object o1, Object o2) { 2113cdf0e10cSrcweir if (o1 == null) { 2114cdf0e10cSrcweir return o2 == null; 2115cdf0e10cSrcweir } else if (o1.getClass().isArray()) { 2116cdf0e10cSrcweir if (!(o2 != null && o1.getClass() == o2.getClass() 2117cdf0e10cSrcweir && Array.getLength(o1) == Array.getLength(o2))) { 2118cdf0e10cSrcweir return false; 2119cdf0e10cSrcweir } 2120cdf0e10cSrcweir for (int i = 0; i < Array.getLength(o1); ++i) { 2121cdf0e10cSrcweir Object oo1 = Array.get(o1, i); 2122cdf0e10cSrcweir if (unboxInner && oo1 instanceof Any) { 2123cdf0e10cSrcweir oo1 = ((Any) oo1).getObject(); 2124cdf0e10cSrcweir } 2125cdf0e10cSrcweir if (!equal(oo1, Array.get(o2, i))) { 2126cdf0e10cSrcweir return false; 2127cdf0e10cSrcweir } 2128cdf0e10cSrcweir } 2129cdf0e10cSrcweir return true; 2130cdf0e10cSrcweir } else { 2131cdf0e10cSrcweir return o1.equals(o2); 2132cdf0e10cSrcweir } 2133cdf0e10cSrcweir } 2134cdf0e10cSrcweir 2135cdf0e10cSrcweir private final boolean unboxInner; 2136cdf0e10cSrcweir } 2137cdf0e10cSrcweir 2138cdf0e10cSrcweir private static final class CompareUnboxed extends Compare { CompareUnboxed()2139cdf0e10cSrcweir public CompareUnboxed() { 2140cdf0e10cSrcweir this(false); 2141cdf0e10cSrcweir } 2142cdf0e10cSrcweir CompareUnboxed(boolean unboxInner)2143cdf0e10cSrcweir public CompareUnboxed(boolean unboxInner) { 2144cdf0e10cSrcweir this.unboxInner = unboxInner; 2145cdf0e10cSrcweir } 2146cdf0e10cSrcweir equal(Object o1, Object o2)2147cdf0e10cSrcweir public boolean equal(Object o1, Object o2) { 2148cdf0e10cSrcweir return new CompareBoxed(unboxInner).equal(((Any) o1).getObject(), 2149cdf0e10cSrcweir o2); 2150cdf0e10cSrcweir } 2151cdf0e10cSrcweir 2152cdf0e10cSrcweir private final boolean unboxInner; 2153cdf0e10cSrcweir } 2154cdf0e10cSrcweir 2155cdf0e10cSrcweir private static final class CompareSpecific extends Compare { CompareSpecific(Object specific)2156cdf0e10cSrcweir public CompareSpecific(Object specific) { 2157cdf0e10cSrcweir this.specific = specific; 2158cdf0e10cSrcweir } 2159cdf0e10cSrcweir equal(Object o1, Object o2)2160cdf0e10cSrcweir public boolean equal(Object o1, Object o2) { 2161cdf0e10cSrcweir return new CompareBoxed().equal(specific, o2); 2162cdf0e10cSrcweir } 2163cdf0e10cSrcweir 2164cdf0e10cSrcweir private final Object specific; 2165cdf0e10cSrcweir } 2166cdf0e10cSrcweir 2167cdf0e10cSrcweir private static final class CompareClass extends Compare { CompareClass(Class clazz)2168cdf0e10cSrcweir public CompareClass(Class clazz) { 2169cdf0e10cSrcweir this.clazz = clazz; 2170cdf0e10cSrcweir } 2171cdf0e10cSrcweir equal(Object o1, Object o2)2172cdf0e10cSrcweir public boolean equal(Object o1, Object o2) { 2173cdf0e10cSrcweir return o2 != null && o2.getClass() == clazz; 2174cdf0e10cSrcweir } 2175cdf0e10cSrcweir 2176cdf0e10cSrcweir private final Class clazz; 2177cdf0e10cSrcweir } 2178cdf0e10cSrcweir 2179cdf0e10cSrcweir public static class Enum1 extends Enum { Enum1()2180cdf0e10cSrcweir public Enum1() { 2181cdf0e10cSrcweir super(0); 2182cdf0e10cSrcweir } 2183cdf0e10cSrcweir fromInt(int value)2184cdf0e10cSrcweir public static Enum1 fromInt(int value) { 2185cdf0e10cSrcweir return new Enum1(); 2186cdf0e10cSrcweir } 2187cdf0e10cSrcweir equals(Object obj)2188cdf0e10cSrcweir public boolean equals(Object obj) { 2189cdf0e10cSrcweir return obj != null && obj.getClass() == Enum1.class; 2190cdf0e10cSrcweir } 2191cdf0e10cSrcweir } 2192cdf0e10cSrcweir 2193cdf0e10cSrcweir public static class Enum2 extends Enum1 { equals(Object obj)2194cdf0e10cSrcweir public boolean equals(Object obj) { 2195cdf0e10cSrcweir return obj != null && obj.getClass() == Enum2.class; 2196cdf0e10cSrcweir } 2197cdf0e10cSrcweir } 2198cdf0e10cSrcweir 2199cdf0e10cSrcweir public static class BaseStruct { equals(Object obj)2200cdf0e10cSrcweir public boolean equals(Object obj) { 2201cdf0e10cSrcweir return obj != null && obj.getClass() == BaseStruct.class; 2202cdf0e10cSrcweir } 2203cdf0e10cSrcweir } 2204cdf0e10cSrcweir 2205cdf0e10cSrcweir public static class DerivedStruct extends BaseStruct { equals(Object obj)2206cdf0e10cSrcweir public boolean equals(Object obj) { 2207cdf0e10cSrcweir return obj != null && obj.getClass() == DerivedStruct.class; 2208cdf0e10cSrcweir } 2209cdf0e10cSrcweir } 2210cdf0e10cSrcweir 2211cdf0e10cSrcweir public static class BaseException extends com.sun.star.uno.Exception { BaseException()2212cdf0e10cSrcweir public BaseException() {} 2213cdf0e10cSrcweir BaseException(String message)2214cdf0e10cSrcweir public BaseException(String message) { 2215cdf0e10cSrcweir super(message); 2216cdf0e10cSrcweir } 2217cdf0e10cSrcweir equals(Object obj)2218cdf0e10cSrcweir public boolean equals(Object obj) { 2219cdf0e10cSrcweir return obj != null && obj.getClass() == BaseException.class; 2220cdf0e10cSrcweir } 2221cdf0e10cSrcweir } 2222cdf0e10cSrcweir 2223cdf0e10cSrcweir public static class DerivedException extends BaseException { DerivedException()2224cdf0e10cSrcweir public DerivedException() {} 2225cdf0e10cSrcweir DerivedException(String message)2226cdf0e10cSrcweir public DerivedException(String message) { 2227cdf0e10cSrcweir super(message); 2228cdf0e10cSrcweir } 2229cdf0e10cSrcweir equals(Object obj)2230cdf0e10cSrcweir public boolean equals(Object obj) { 2231cdf0e10cSrcweir return obj != null && obj.getClass() == DerivedException.class; 2232cdf0e10cSrcweir } 2233cdf0e10cSrcweir } 2234cdf0e10cSrcweir 2235cdf0e10cSrcweir public static class BaseRuntimeException 2236cdf0e10cSrcweir extends com.sun.star.uno.RuntimeException 2237cdf0e10cSrcweir { BaseRuntimeException()2238cdf0e10cSrcweir public BaseRuntimeException() {} 2239cdf0e10cSrcweir BaseRuntimeException(String message)2240cdf0e10cSrcweir public BaseRuntimeException(String message) { 2241cdf0e10cSrcweir super(message); 2242cdf0e10cSrcweir } 2243cdf0e10cSrcweir equals(Object obj)2244cdf0e10cSrcweir public boolean equals(Object obj) { 2245cdf0e10cSrcweir return obj != null 2246cdf0e10cSrcweir && obj.getClass() == BaseRuntimeException.class; 2247cdf0e10cSrcweir } 2248cdf0e10cSrcweir } 2249cdf0e10cSrcweir 2250cdf0e10cSrcweir public static class DerivedRuntimeException extends BaseRuntimeException 2251cdf0e10cSrcweir { DerivedRuntimeException()2252cdf0e10cSrcweir public DerivedRuntimeException() {} 2253cdf0e10cSrcweir DerivedRuntimeException(String message)2254cdf0e10cSrcweir public DerivedRuntimeException(String message) { 2255cdf0e10cSrcweir super(message); 2256cdf0e10cSrcweir } 2257cdf0e10cSrcweir equals(Object obj)2258cdf0e10cSrcweir public boolean equals(Object obj) { 2259cdf0e10cSrcweir return obj != null 2260cdf0e10cSrcweir && obj.getClass() == DerivedRuntimeException.class; 2261cdf0e10cSrcweir } 2262cdf0e10cSrcweir } 2263cdf0e10cSrcweir } 2264