fixup test name
This commit is contained in:
parent
91925050b6
commit
cafd9d83fb
|
@ -24,6 +24,7 @@ import java.util.Properties;
|
||||||
|
|
||||||
import junit.framework.AssertionFailedError;
|
import junit.framework.AssertionFailedError;
|
||||||
import junit.framework.Test;
|
import junit.framework.Test;
|
||||||
|
import junit.framework.TestCase;
|
||||||
import junit.framework.TestFailure;
|
import junit.framework.TestFailure;
|
||||||
import junit.framework.TestSuite;
|
import junit.framework.TestSuite;
|
||||||
|
|
||||||
|
@ -40,6 +41,8 @@ public class SigarTestPrinter extends ResultPrinter {
|
||||||
private int maxNameLen = 0;
|
private int maxNameLen = 0;
|
||||||
//just print once if we're run w/ "time 10 test"
|
//just print once if we're run w/ "time 10 test"
|
||||||
private static boolean printedVersion;
|
private static boolean printedVersion;
|
||||||
|
private static final String PREFIX =
|
||||||
|
"org.hyperic.sigar.test.Test";
|
||||||
|
|
||||||
private static final String[][] LOG_PROPS = {
|
private static final String[][] LOG_PROPS = {
|
||||||
{
|
{
|
||||||
|
@ -69,7 +72,10 @@ public class SigarTestPrinter extends ResultPrinter {
|
||||||
//for each test success, failure or error.
|
//for each test success, failure or error.
|
||||||
public void startTest(Test test) {
|
public void startTest(Test test) {
|
||||||
PrintStream writer = getWriter();
|
PrintStream writer = getWriter();
|
||||||
String name = test.getClass().getName();
|
String cls = test.getClass().getName();
|
||||||
|
cls = cls.substring(PREFIX.length());
|
||||||
|
String method = ((TestCase)test).getName();
|
||||||
|
String name = cls + "." + method;
|
||||||
writer.print(name);
|
writer.print(name);
|
||||||
int n = ((maxNameLen+3) - name.length());
|
int n = ((maxNameLen+3) - name.length());
|
||||||
for (int i=0; i<n; i++) {
|
for (int i=0; i<n; i++) {
|
||||||
|
|
Loading…
Reference in New Issue