rt/emul/compacttest/src/test/java/org/apidesign/bck2brwsr/tck/ClassTest.java
author Jaroslav Tulach <jaroslav.tulach@apidesign.org>
Wed, 19 Nov 2014 19:32:00 +0100
changeset 1723 3a1f262311cf
parent 1634 rt/emul/compact/src/test/java/org/apidesign/bck2brwsr/tck/ClassTest.java@783acbc99199
child 1787 ea12a3bb4b33
permissions -rw-r--r--
Separating compact profile tests into own project, so launcher.http can depend on compact profile JAR
jaroslav@355
     1
/**
jaroslav@355
     2
 * Back 2 Browser Bytecode Translator
jaroslav@355
     3
 * Copyright (C) 2012 Jaroslav Tulach <jaroslav.tulach@apidesign.org>
jaroslav@355
     4
 *
jaroslav@355
     5
 * This program is free software: you can redistribute it and/or modify
jaroslav@355
     6
 * it under the terms of the GNU General Public License as published by
jaroslav@355
     7
 * the Free Software Foundation, version 2 of the License.
jaroslav@355
     8
 *
jaroslav@355
     9
 * This program is distributed in the hope that it will be useful,
jaroslav@355
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
jaroslav@355
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
jaroslav@355
    12
 * GNU General Public License for more details.
jaroslav@355
    13
 *
jaroslav@355
    14
 * You should have received a copy of the GNU General Public License
jaroslav@355
    15
 * along with this program. Look for COPYING file in the top folder.
jaroslav@355
    16
 * If not, see http://opensource.org/licenses/GPL-2.0.
jaroslav@355
    17
 */
jaroslav@355
    18
package org.apidesign.bck2brwsr.tck;
jaroslav@355
    19
jaroslav@355
    20
import org.apidesign.bck2brwsr.vmtest.Compare;
jaroslav@355
    21
import org.apidesign.bck2brwsr.vmtest.VMTest;
jaroslav@355
    22
import org.testng.annotations.Factory;
jaroslav@355
    23
jaroslav@355
    24
/**
jaroslav@355
    25
 *
jaroslav@355
    26
 * @author Jaroslav Tulach <jtulach@netbeans.org>
jaroslav@355
    27
 */
jaroslav@1634
    28
public class ClassTest {
jaroslav@413
    29
    @Compare
jaroslav@1634
    30
    public boolean isDoubleArrayAssignableToObject() throws Exception {
jaroslav@1634
    31
        double[] dbl = new double[0];
jaroslav@1634
    32
        Class<?> dblCls = dbl.getClass();
jaroslav@1634
    33
        return Object.class.isAssignableFrom(dblCls);
jaroslav@355
    34
    }
jaroslav@355
    35
jaroslav@1634
    36
    @Compare
jaroslav@1634
    37
    public boolean isDoubleArrayAssignableToString() throws Exception {
jaroslav@1634
    38
        double[] dbl = new double[0];
jaroslav@1634
    39
        Class<?> dblCls = dbl.getClass();
jaroslav@1634
    40
        return String.class.isAssignableFrom(dblCls);
jaroslav@392
    41
    }
jaroslav@355
    42
    
jaroslav@355
    43
    @Factory
jaroslav@355
    44
    public static Object[] create() {
jaroslav@1634
    45
        return VMTest.create(ClassTest.class);
jaroslav@411
    46
    }
jaroslav@355
    47
}