Created
November 4, 2014 22:55
-
-
Save adamretter/b7bff200a29d6753f0b9 to your computer and use it in GitHub Desktop.
JUnitRunner with output to the console
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.rocksdb.test; | |
import org.junit.runner.JUnitCore; | |
import org.junit.runner.Result; | |
import org.junit.internal.JUnitSystem; | |
import org.junit.internal.RealSystem; | |
import org.junit.internal.TextListener; | |
public class JUnitConsoleRunner { | |
public final static void main(final String args[]) { | |
public static void main(String... args) { | |
final JUnitCore junit = new JUnitCore(); | |
final JUnitSystem system = new RealSystem(); | |
junit.addListener(new TextListener(system)); | |
final Result result = junit.runMain(system, args); | |
System.exit(result.wasSuccessful() ? 0 : 1); | |
} | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment