rt/emul/compact/src/test/java/org/apidesign/bck2brwsr/tck/ClassLoaderTest.java
author Jaroslav Tulach <jaroslav.tulach@apidesign.org>
Wed, 23 Oct 2013 14:56:31 +0200
changeset 1388 d28e1c58f508
parent 1328 rt/emul/compact/src/test/java/org/apidesign/bck2brwsr/tck/SystemTest.java@1d1d70f6828b
child 1403 8120793cc756
permissions -rw-r--r--
Preventing StackOverflowError when asking for non-existing system resource
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@1328
    32
jaroslav@1328
    33
    @Factory public static Object[] create() {
jaroslav@1388
    34
        return VMTest.create(ClassLoaderTest.class);
jaroslav@1328
    35
    }
jaroslav@1328
    36
}