jaroslav@775: /** jaroslav@777: * Back 2 Browser Bytecode Translator jaroslav@777: * Copyright (C) 2012 Jaroslav Tulach jaroslav@775: * jaroslav@777: * This program is free software: you can redistribute it and/or modify jaroslav@777: * it under the terms of the GNU General Public License as published by jaroslav@777: * the Free Software Foundation, version 2 of the License. jaroslav@775: * jaroslav@777: * This program is distributed in the hope that it will be useful, jaroslav@777: * but WITHOUT ANY WARRANTY; without even the implied warranty of jaroslav@777: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the jaroslav@777: * GNU General Public License for more details. jaroslav@775: * jaroslav@777: * You should have received a copy of the GNU General Public License jaroslav@777: * along with this program. Look for COPYING file in the top folder. jaroslav@777: * If not, see http://opensource.org/licenses/GPL-2.0. jaroslav@775: */ jaroslav@775: package org.apidesign.vm4brwsr; jaroslav@775: jaroslav@789: import org.testng.annotations.AfterClass; jaroslav@775: import org.testng.annotations.BeforeClass; jaroslav@775: import org.testng.annotations.Test; jaroslav@775: jaroslav@775: /** jaroslav@775: * jaroslav@775: * @author Jaroslav Tulach jaroslav@775: */ jaroslav@775: public class StaticUseSubTest { jaroslav@775: private static TestVM code; jaroslav@775: jaroslav@775: @BeforeClass jaroslav@775: public static void compileTheCode() throws Exception { jaroslav@775: StringBuilder sb = new StringBuilder(); jaroslav@775: code = TestVM.compileClass(sb, "org/apidesign/vm4brwsr/StaticUseSub"); jaroslav@775: } jaroslav@789: @AfterClass jaroslav@789: public static void releaseTheCode() { jaroslav@789: code = null; jaroslav@789: } jaroslav@775: jaroslav@775: @Test public void getInheritedStaticField() throws Exception { jaroslav@775: code.assertExec( jaroslav@775: "Obtains non-null", StaticUseSub.class, jaroslav@775: "getNonNull__Ljava_lang_String_2", jaroslav@775: "java.lang.Object" jaroslav@775: ); jaroslav@775: } jaroslav@775: }