jaroslav@1260: /** jaroslav@1260: * Back 2 Browser Bytecode Translator jaroslav@1260: * Copyright (C) 2012 Jaroslav Tulach jaroslav@1260: * jaroslav@1260: * This program is free software: you can redistribute it and/or modify jaroslav@1260: * it under the terms of the GNU General Public License as published by jaroslav@1260: * the Free Software Foundation, version 2 of the License. jaroslav@1260: * jaroslav@1260: * This program is distributed in the hope that it will be useful, jaroslav@1260: * but WITHOUT ANY WARRANTY; without even the implied warranty of jaroslav@1260: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the jaroslav@1260: * GNU General Public License for more details. jaroslav@1260: * jaroslav@1260: * You should have received a copy of the GNU General Public License jaroslav@1260: * along with this program. Look for COPYING file in the top folder. jaroslav@1260: * If not, see http://opensource.org/licenses/GPL-2.0. jaroslav@1260: */ jaroslav@1260: package org.apidesign.bck2brwsr.tck; jaroslav@1260: jaroslav@1260: import java.util.logging.Logger; jaroslav@1260: import org.apidesign.bck2brwsr.vmtest.Compare; jaroslav@1260: import org.apidesign.bck2brwsr.vmtest.VMTest; jaroslav@1260: import org.testng.annotations.Factory; jaroslav@1260: jaroslav@1260: /** jaroslav@1260: * jaroslav@1260: * @author Jaroslav Tulach jaroslav@1260: */ jaroslav@1260: public class LoggerTest { jaroslav@1260: @Compare public String parentLogger() { jaroslav@1260: Logger lx = Logger.getLogger("x"); jaroslav@1260: assert lx != null; jaroslav@1260: assert lx.getName().equals("x") : "Right name: " + lx.getName(); jaroslav@1260: Logger lxyz = Logger.getLogger("x.y.z"); jaroslav@1260: assert lxyz != null; jaroslav@1260: assert lxyz.getName().equals("x.y.z") : "xyz name: " + lxyz.getName(); jaroslav@1260: return lxyz.getParent().getName(); jaroslav@1260: } jaroslav@1260: jaroslav@1260: @Factory public static Object[] create() { jaroslav@1260: return VMTest.create(LoggerTest.class); jaroslav@1260: } jaroslav@1260: }