jaroslav@1489: /** jaroslav@1489: * Back 2 Browser Bytecode Translator jaroslav@1489: * Copyright (C) 2012 Jaroslav Tulach jaroslav@1489: * jaroslav@1489: * This program is free software: you can redistribute it and/or modify jaroslav@1489: * it under the terms of the GNU General Public License as published by jaroslav@1489: * the Free Software Foundation, version 2 of the License. jaroslav@1489: * jaroslav@1489: * This program is distributed in the hope that it will be useful, jaroslav@1489: * but WITHOUT ANY WARRANTY; without even the implied warranty of jaroslav@1489: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the jaroslav@1489: * GNU General Public License for more details. jaroslav@1489: * jaroslav@1489: * You should have received a copy of the GNU General Public License jaroslav@1489: * along with this program. Look for COPYING file in the top folder. jaroslav@1489: * If not, see http://opensource.org/licenses/GPL-2.0. jaroslav@1489: */ jaroslav@1489: package org.apidesign.bck2brwsr.launcher; jaroslav@1489: jaroslav@1489: import java.io.File; jaroslav@1489: import java.net.URL; jaroslav@1489: import static org.testng.Assert.*; jaroslav@1489: import org.testng.annotations.Test; jaroslav@1489: jaroslav@1489: /** jaroslav@1489: * jaroslav@1489: * @author Jaroslav Tulach jaroslav@1489: */ jaroslav@1489: public class CompileCPTest { jaroslav@1489: public CompileCPTest() { jaroslav@1489: } jaroslav@1489: jaroslav@1489: @Test public void compileClassPath() throws Exception { jaroslav@1489: URL u = CompileCPTest.class.getResource("/" + CompileCPTest.class.getName().replace('.', '/') + ".class"); jaroslav@1489: assertNotNull(u, "URL found"); jaroslav@1489: assertEquals(u.getProtocol(), "file", "It comes from a disk"); jaroslav@1489: jaroslav@1489: String resources = CompileCP.compileFromClassPath(u); jaroslav@1489: assertNotNull(resources, "something compiled"); jaroslav@1489: } jaroslav@1489: }