rt/vm/src/test/java/org/apidesign/vm4brwsr/StaticUseSubTest.java
author Jaroslav Tulach <jaroslav.tulach@apidesign.org>
Wed, 27 Feb 2013 16:02:26 +0100
changeset 777 8a1f840a286b
parent 775 a13e33fd5c2e
child 789 bb7506513353
permissions -rw-r--r--
Using default, not formated license
jaroslav@775
     1
/**
jaroslav@777
     2
 * Back 2 Browser Bytecode Translator
jaroslav@777
     3
 * Copyright (C) 2012 Jaroslav Tulach <jaroslav.tulach@apidesign.org>
jaroslav@775
     4
 *
jaroslav@777
     5
 * This program is free software: you can redistribute it and/or modify
jaroslav@777
     6
 * it under the terms of the GNU General Public License as published by
jaroslav@777
     7
 * the Free Software Foundation, version 2 of the License.
jaroslav@775
     8
 *
jaroslav@777
     9
 * This program is distributed in the hope that it will be useful,
jaroslav@777
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
jaroslav@777
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
jaroslav@777
    12
 * GNU General Public License for more details.
jaroslav@775
    13
 *
jaroslav@777
    14
 * You should have received a copy of the GNU General Public License
jaroslav@777
    15
 * along with this program. Look for COPYING file in the top folder.
jaroslav@777
    16
 * If not, see http://opensource.org/licenses/GPL-2.0.
jaroslav@775
    17
 */
jaroslav@775
    18
package org.apidesign.vm4brwsr;
jaroslav@775
    19
jaroslav@775
    20
import org.testng.annotations.BeforeClass;
jaroslav@775
    21
import org.testng.annotations.Test;
jaroslav@775
    22
jaroslav@775
    23
/**
jaroslav@775
    24
 *
jaroslav@775
    25
 * @author Jaroslav Tulach <jtulach@netbeans.org>
jaroslav@775
    26
 */
jaroslav@775
    27
public class StaticUseSubTest {
jaroslav@775
    28
    private static TestVM code;
jaroslav@775
    29
jaroslav@775
    30
    @BeforeClass
jaroslav@775
    31
    public static void compileTheCode() throws Exception {
jaroslav@775
    32
        StringBuilder sb = new StringBuilder();
jaroslav@775
    33
        code = TestVM.compileClass(sb, "org/apidesign/vm4brwsr/StaticUseSub");
jaroslav@775
    34
    }
jaroslav@775
    35
    
jaroslav@775
    36
    @Test public void getInheritedStaticField() throws Exception {
jaroslav@775
    37
        code.assertExec(
jaroslav@775
    38
            "Obtains non-null", StaticUseSub.class, 
jaroslav@775
    39
            "getNonNull__Ljava_lang_String_2",
jaroslav@775
    40
            "java.lang.Object"
jaroslav@775
    41
        );
jaroslav@775
    42
    }
jaroslav@775
    43
}