jaroslav@775: /** jaroslav@775: * Back 2 Browser Bytecode Translator jaroslav@775: * Copyright (C) 2012 Jaroslav Tulach jaroslav@775: * jaroslav@775: * This program is free software: you can redistribute it and/or modify jaroslav@775: * it under the terms of the GNU General Public License as published by jaroslav@775: * the Free Software Foundation, version 2 of the License. jaroslav@775: * jaroslav@775: * This program is distributed in the hope that it will be useful, jaroslav@775: * but WITHOUT ANY WARRANTY; without even the implied warranty of jaroslav@775: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the jaroslav@775: * GNU General Public License for more details. jaroslav@775: * jaroslav@775: * You should have received a copy of the GNU General Public License jaroslav@775: * along with this program. Look for COPYING file in the top folder. jaroslav@775: * If not, see http://opensource.org/licenses/GPL-2.0. jaroslav@775: */ jaroslav@775: package org.apidesign.bck2brwsr.tck; jaroslav@775: jaroslav@775: import org.apidesign.bck2brwsr.vmtest.Compare; jaroslav@775: import org.apidesign.bck2brwsr.vmtest.VMTest; jaroslav@775: import org.testng.annotations.Factory; jaroslav@775: jaroslav@775: /** jaroslav@775: * jaroslav@775: * @author Jaroslav Tulach jaroslav@775: */ jaroslav@775: public class StaticUseSubTest { jaroslav@775: @Compare public String staticFieldInitializationInSuperClass() throws Exception { jaroslav@775: Object ret = StaticUseSub.getNonNull(); jaroslav@775: return ret.getClass().getName(); jaroslav@775: } jaroslav@1022: jaroslav@1022: @Compare public String isNullPointerTheSame() throws Exception { jaroslav@1022: try { jaroslav@1022: return StaticUseSub.getNull().getClass().toString(); jaroslav@1022: } catch (NullPointerException ex) { jaroslav@1022: return ex.getClass().getName(); jaroslav@1022: } jaroslav@1022: } jaroslav@775: jaroslav@775: @Factory public static Object[] create() { jaroslav@775: return VMTest.create(StaticUseSubTest.class); jaroslav@775: } jaroslav@775: }