author | Jaroslav Tulach <jaroslav.tulach@apidesign.org> |
Thu, 31 Oct 2013 15:16:56 +0100 | |
changeset 1403 | 8120793cc756 |
parent 1388 | d28e1c58f508 |
permissions | -rw-r--r-- |
jaroslav@1328 | 1 |
/** |
jaroslav@1328 | 2 |
* Back 2 Browser Bytecode Translator |
jaroslav@1328 | 3 |
* Copyright (C) 2012 Jaroslav Tulach <jaroslav.tulach@apidesign.org> |
jaroslav@1328 | 4 |
* |
jaroslav@1328 | 5 |
* This program is free software: you can redistribute it and/or modify |
jaroslav@1328 | 6 |
* it under the terms of the GNU General Public License as published by |
jaroslav@1328 | 7 |
* the Free Software Foundation, version 2 of the License. |
jaroslav@1328 | 8 |
* |
jaroslav@1328 | 9 |
* This program is distributed in the hope that it will be useful, |
jaroslav@1328 | 10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
jaroslav@1328 | 11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
jaroslav@1328 | 12 |
* GNU General Public License for more details. |
jaroslav@1328 | 13 |
* |
jaroslav@1328 | 14 |
* You should have received a copy of the GNU General Public License |
jaroslav@1328 | 15 |
* along with this program. Look for COPYING file in the top folder. |
jaroslav@1328 | 16 |
* If not, see http://opensource.org/licenses/GPL-2.0. |
jaroslav@1328 | 17 |
*/ |
jaroslav@1328 | 18 |
package org.apidesign.bck2brwsr.tck; |
jaroslav@1328 | 19 |
|
jaroslav@1328 | 20 |
import org.apidesign.bck2brwsr.vmtest.Compare; |
jaroslav@1328 | 21 |
import org.apidesign.bck2brwsr.vmtest.VMTest; |
jaroslav@1328 | 22 |
import org.testng.annotations.Factory; |
jaroslav@1328 | 23 |
|
jaroslav@1328 | 24 |
/** |
jaroslav@1328 | 25 |
* |
jaroslav@1328 | 26 |
* @author Jaroslav Tulach <jtulach@netbeans.org> |
jaroslav@1328 | 27 |
*/ |
jaroslav@1388 | 28 |
public class ClassLoaderTest { |
jaroslav@1388 | 29 |
@Compare public Object unknownResource() { |
jaroslav@1388 | 30 |
return ClassLoader.getSystemResource("really/unknown/resource.txt"); |
jaroslav@1328 | 31 |
} |
jaroslav@1403 | 32 |
|
jaroslav@1403 | 33 |
@Compare public boolean indenpotentSetOfClassloaderIsOK() { |
jaroslav@1403 | 34 |
Thread.currentThread().setContextClassLoader(ClassLoader.getSystemClassLoader()); |
jaroslav@1403 | 35 |
return Thread.currentThread().getContextClassLoader() == ClassLoader.getSystemClassLoader(); |
jaroslav@1403 | 36 |
} |
jaroslav@1328 | 37 |
|
jaroslav@1328 | 38 |
@Factory public static Object[] create() { |
jaroslav@1388 | 39 |
return VMTest.create(ClassLoaderTest.class); |
jaroslav@1328 | 40 |
} |
jaroslav@1328 | 41 |
} |