1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/rt/vm/src/test/java/org/apidesign/vm4brwsr/StaticUseSubTest.java Wed Feb 27 14:38:16 2013 +0100
1.3 @@ -0,0 +1,43 @@
1.4 +/**
1.5 + * Back 2 Browser Bytecode Translator Copyright (C) 2012 Jaroslav Tulach
1.6 + * <jaroslav.tulach@apidesign.org>
1.7 + *
1.8 + * This program is free software: you can redistribute it and/or modify it under
1.9 + * the terms of the GNU General Public License as published by the Free Software
1.10 + * Foundation, version 2 of the License.
1.11 + *
1.12 + * This program is distributed in the hope that it will be useful, but WITHOUT
1.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
1.14 + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
1.15 + * details.
1.16 + *
1.17 + * You should have received a copy of the GNU General Public License along with
1.18 + * this program. Look for COPYING file in the top folder. If not, see
1.19 + * http://opensource.org/licenses/GPL-2.0.
1.20 + */
1.21 +package org.apidesign.vm4brwsr;
1.22 +
1.23 +import org.testng.annotations.BeforeClass;
1.24 +import org.testng.annotations.Test;
1.25 +
1.26 +/**
1.27 + *
1.28 + * @author Jaroslav Tulach <jtulach@netbeans.org>
1.29 + */
1.30 +public class StaticUseSubTest {
1.31 + private static TestVM code;
1.32 +
1.33 + @BeforeClass
1.34 + public static void compileTheCode() throws Exception {
1.35 + StringBuilder sb = new StringBuilder();
1.36 + code = TestVM.compileClass(sb, "org/apidesign/vm4brwsr/StaticUseSub");
1.37 + }
1.38 +
1.39 + @Test public void getInheritedStaticField() throws Exception {
1.40 + code.assertExec(
1.41 + "Obtains non-null", StaticUseSub.class,
1.42 + "getNonNull__Ljava_lang_String_2",
1.43 + "java.lang.Object"
1.44 + );
1.45 + }
1.46 +}