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