vmtest/src/test/java/org/apidesign/bck2brwsr/tck/ReflectionTest.java
author Jaroslav Tulach <jaroslav.tulach@apidesign.org>
Thu, 20 Dec 2012 21:39:16 +0100
branchlauncher
changeset 358 f6a165f7f00f
child 392 44a5802816be
permissions -rw-r--r--
Loaded classes need to have their static initializes invoked. Before accessing static field of a class, initializers need to be executed as well.
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@355
    28
public class ReflectionTest {
jaroslav@355
    29
    @Compare public String intType() {
jaroslav@355
    30
        return Integer.TYPE.toString();
jaroslav@355
    31
    }
jaroslav@355
    32
jaroslav@355
    33
    @Compare public String longClass() {
jaroslav@355
    34
        return long.class.toString();
jaroslav@355
    35
    }
jaroslav@355
    36
    
jaroslav@355
    37
    
jaroslav@355
    38
    @Factory
jaroslav@355
    39
    public static Object[] create() {
jaroslav@355
    40
        return VMTest.create(ReflectionTest.class);
jaroslav@355
    41
    }
jaroslav@355
    42
    
jaroslav@355
    43
}