Package net.hydromatic.sqllogictest
Class TestStatistics
- java.lang.Object
-
- net.hydromatic.sqllogictest.TestStatistics
-
public class TestStatistics extends Object
Class that keeps track of the tests executed, including failures encountered.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTestStatistics.FailedTestDescriptionDescription of a test that failed.
-
Constructor Summary
Constructors Constructor Description TestStatistics(boolean stopAtFirstError)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(TestStatistics stats)Add the other statistics to this.booleanaddFailure(TestStatistics.FailedTestDescription failure)Add a new failure; return 'true' if we need to stop executing.intgetFailed()intgetIgnored()intgetPassed()voidincIgnored()Increment the number of tests that were ignored.voidincPassed()Increment the number of tests that have passed.voidprintStatistics(PrintStream out)Print the statistics to the specified stream.voidsetFailed(int n)Set the number of tests that have failed.voidsetIgnored(int n)Set the number of tests that were ignored.voidsetPassed(int n)Set the number of tests that have passed.inttotalTests()
-
-
-
Method Detail
-
incPassed
public void incPassed()
Increment the number of tests that have passed.
-
incIgnored
public void incIgnored()
Increment the number of tests that were ignored.
-
setPassed
public void setPassed(int n)
Set the number of tests that have passed.
-
setFailed
public void setFailed(int n)
Set the number of tests that have failed.
-
setIgnored
public void setIgnored(int n)
Set the number of tests that were ignored.
-
add
public void add(TestStatistics stats)
Add the other statistics to this.
-
getFailed
public int getFailed()
- Returns:
- The number of failed tests.
-
getPassed
public int getPassed()
- Returns:
- The number of passed tests.
-
getIgnored
public int getIgnored()
- Returns:
- The number of ignored tests.
-
addFailure
public boolean addFailure(TestStatistics.FailedTestDescription failure)
Add a new failure; return 'true' if we need to stop executing.
-
totalTests
public int totalTests()
- Returns:
- Total number of tests that were considered.
-
printStatistics
public void printStatistics(PrintStream out)
Print the statistics to the specified stream.
-
-