jaroslav@355: /** jaroslav@355: * Back 2 Browser Bytecode Translator jaroslav@355: * Copyright (C) 2012 Jaroslav Tulach jaroslav@355: * jaroslav@355: * This program is free software: you can redistribute it and/or modify jaroslav@355: * it under the terms of the GNU General Public License as published by jaroslav@355: * the Free Software Foundation, version 2 of the License. jaroslav@355: * jaroslav@355: * This program is distributed in the hope that it will be useful, jaroslav@355: * but WITHOUT ANY WARRANTY; without even the implied warranty of jaroslav@355: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the jaroslav@355: * GNU General Public License for more details. jaroslav@355: * jaroslav@355: * You should have received a copy of the GNU General Public License jaroslav@355: * along with this program. Look for COPYING file in the top folder. jaroslav@355: * If not, see http://opensource.org/licenses/GPL-2.0. jaroslav@355: */ jaroslav@355: package org.apidesign.bck2brwsr.tck; jaroslav@355: jaroslav@355: import org.apidesign.bck2brwsr.vmtest.Compare; jaroslav@355: import org.apidesign.bck2brwsr.vmtest.VMTest; jaroslav@355: import org.testng.annotations.Factory; jaroslav@355: jaroslav@355: /** jaroslav@355: * jaroslav@355: * @author Jaroslav Tulach jaroslav@355: */ jaroslav@1634: public class ClassTest { jaroslav@413: @Compare jaroslav@1634: public boolean isDoubleArrayAssignableToObject() throws Exception { jaroslav@1634: double[] dbl = new double[0]; jaroslav@1634: Class dblCls = dbl.getClass(); jaroslav@1634: return Object.class.isAssignableFrom(dblCls); jaroslav@355: } jaroslav@355: jaroslav@1634: @Compare jaroslav@1634: public boolean isDoubleArrayAssignableToString() throws Exception { jaroslav@1634: double[] dbl = new double[0]; jaroslav@1634: Class dblCls = dbl.getClass(); jaroslav@1634: return String.class.isAssignableFrom(dblCls); jaroslav@392: } jaroslav@355: jaroslav@355: @Factory jaroslav@355: public static Object[] create() { jaroslav@1634: return VMTest.create(ClassTest.class); jaroslav@411: } jaroslav@355: }