mirror of
https://github.com/fankes/JSON-java-compat.git
synced 2025-09-08 11:34:43 +08:00
latest
This commit is contained in:
19
src/test/org/json/junit/TestRunner.java
Normal file
19
src/test/org/json/junit/TestRunner.java
Normal file
@@ -0,0 +1,19 @@
|
||||
package org.json.junit;
|
||||
|
||||
import org.junit.runner.JUnitCore;
|
||||
import org.junit.runner.Result;
|
||||
import org.junit.runner.notification.Failure;
|
||||
|
||||
/**
|
||||
* Invoke this class main method if you want to run unit tests from the
|
||||
* command line. If successful, will print "true" to stdout.
|
||||
*/
|
||||
public class TestRunner {
|
||||
public static void main(String[] args) {
|
||||
Result result = JUnitCore.runClasses(JunitTestSuite.class);
|
||||
for (Failure failure : result.getFailures()) {
|
||||
System.out.println(failure.toString());
|
||||
}
|
||||
System.out.println(result.wasSuccessful());
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user