author | Jaroslav Tulach <jaroslav.tulach@apidesign.org> |
Fri, 27 Sep 2013 20:20:50 +0200 | |
changeset 1310 | 635ee75d82a5 |
parent 1022 | 00ae3f46e54f |
permissions | -rw-r--r-- |
jaroslav@775 | 1 |
/** |
jaroslav@775 | 2 |
* Back 2 Browser Bytecode Translator |
jaroslav@775 | 3 |
* Copyright (C) 2012 Jaroslav Tulach <jaroslav.tulach@apidesign.org> |
jaroslav@775 | 4 |
* |
jaroslav@775 | 5 |
* This program is free software: you can redistribute it and/or modify |
jaroslav@775 | 6 |
* it under the terms of the GNU General Public License as published by |
jaroslav@775 | 7 |
* the Free Software Foundation, version 2 of the License. |
jaroslav@775 | 8 |
* |
jaroslav@775 | 9 |
* This program is distributed in the hope that it will be useful, |
jaroslav@775 | 10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
jaroslav@775 | 11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
jaroslav@775 | 12 |
* GNU General Public License for more details. |
jaroslav@775 | 13 |
* |
jaroslav@775 | 14 |
* You should have received a copy of the GNU General Public License |
jaroslav@775 | 15 |
* along with this program. Look for COPYING file in the top folder. |
jaroslav@775 | 16 |
* If not, see http://opensource.org/licenses/GPL-2.0. |
jaroslav@775 | 17 |
*/ |
jaroslav@775 | 18 |
package org.apidesign.bck2brwsr.tck; |
jaroslav@775 | 19 |
|
jaroslav@775 | 20 |
import org.apidesign.bck2brwsr.vmtest.Compare; |
jaroslav@775 | 21 |
import org.apidesign.bck2brwsr.vmtest.VMTest; |
jaroslav@775 | 22 |
import org.testng.annotations.Factory; |
jaroslav@775 | 23 |
|
jaroslav@775 | 24 |
/** |
jaroslav@775 | 25 |
* |
jaroslav@775 | 26 |
* @author Jaroslav Tulach <jtulach@netbeans.org> |
jaroslav@775 | 27 |
*/ |
jaroslav@775 | 28 |
public class StaticUseSubTest { |
jaroslav@775 | 29 |
@Compare public String staticFieldInitializationInSuperClass() throws Exception { |
jaroslav@775 | 30 |
Object ret = StaticUseSub.getNonNull(); |
jaroslav@775 | 31 |
return ret.getClass().getName(); |
jaroslav@775 | 32 |
} |
jaroslav@1022 | 33 |
|
jaroslav@1022 | 34 |
@Compare public String isNullPointerTheSame() throws Exception { |
jaroslav@1022 | 35 |
try { |
jaroslav@1022 | 36 |
return StaticUseSub.getNull().getClass().toString(); |
jaroslav@1022 | 37 |
} catch (NullPointerException ex) { |
jaroslav@1022 | 38 |
return ex.getClass().getName(); |
jaroslav@1022 | 39 |
} |
jaroslav@1022 | 40 |
} |
jaroslav@775 | 41 |
|
jaroslav@775 | 42 |
@Factory public static Object[] create() { |
jaroslav@775 | 43 |
return VMTest.create(StaticUseSubTest.class); |
jaroslav@775 | 44 |
} |
jaroslav@775 | 45 |
} |