rt/emul/compacttest/src/test/java/org/apidesign/bck2brwsr/tck/LoggerTest.java
author Jaroslav Tulach <jaroslav.tulach@apidesign.org>
Wed, 19 Nov 2014 19:32:00 +0100
changeset 1723 3a1f262311cf
parent 1260 rt/emul/compact/src/test/java/org/apidesign/bck2brwsr/tck/LoggerTest.java@fe3567c7b522
child 1787 ea12a3bb4b33
permissions -rw-r--r--
Separating compact profile tests into own project, so launcher.http can depend on compact profile JAR
jaroslav@1260
     1
/**
jaroslav@1260
     2
 * Back 2 Browser Bytecode Translator
jaroslav@1260
     3
 * Copyright (C) 2012 Jaroslav Tulach <jaroslav.tulach@apidesign.org>
jaroslav@1260
     4
 *
jaroslav@1260
     5
 * This program is free software: you can redistribute it and/or modify
jaroslav@1260
     6
 * it under the terms of the GNU General Public License as published by
jaroslav@1260
     7
 * the Free Software Foundation, version 2 of the License.
jaroslav@1260
     8
 *
jaroslav@1260
     9
 * This program is distributed in the hope that it will be useful,
jaroslav@1260
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
jaroslav@1260
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
jaroslav@1260
    12
 * GNU General Public License for more details.
jaroslav@1260
    13
 *
jaroslav@1260
    14
 * You should have received a copy of the GNU General Public License
jaroslav@1260
    15
 * along with this program. Look for COPYING file in the top folder.
jaroslav@1260
    16
 * If not, see http://opensource.org/licenses/GPL-2.0.
jaroslav@1260
    17
 */
jaroslav@1260
    18
package org.apidesign.bck2brwsr.tck;
jaroslav@1260
    19
jaroslav@1260
    20
import java.util.logging.Logger;
jaroslav@1260
    21
import org.apidesign.bck2brwsr.vmtest.Compare;
jaroslav@1260
    22
import org.apidesign.bck2brwsr.vmtest.VMTest;
jaroslav@1260
    23
import org.testng.annotations.Factory;
jaroslav@1260
    24
jaroslav@1260
    25
/**
jaroslav@1260
    26
 *
jaroslav@1260
    27
 * @author Jaroslav Tulach <jtulach@netbeans.org>
jaroslav@1260
    28
 */
jaroslav@1260
    29
public class LoggerTest {
jaroslav@1260
    30
    @Compare public String parentLogger() {
jaroslav@1260
    31
        Logger lx = Logger.getLogger("x");
jaroslav@1260
    32
        assert lx != null;
jaroslav@1260
    33
        assert lx.getName().equals("x") : "Right name: " + lx.getName();
jaroslav@1260
    34
        Logger lxyz = Logger.getLogger("x.y.z");
jaroslav@1260
    35
        assert lxyz != null;
jaroslav@1260
    36
        assert lxyz.getName().equals("x.y.z") : "xyz name: " + lxyz.getName();
jaroslav@1260
    37
        return lxyz.getParent().getName();
jaroslav@1260
    38
    }
jaroslav@1260
    39
    
jaroslav@1260
    40
    @Factory public static Object[] create() {
jaroslav@1260
    41
        return VMTest.create(LoggerTest.class);
jaroslav@1260
    42
    }
jaroslav@1260
    43
}