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, int verbosity)
-
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.intgetFailedTestCount()intgetIgnoredTestCount()intgetParseFailureCount()intgetPassedTestCount()intgetTestFileCount()voidincFiles()Increment the number of files processed.voidincFilesNotParsed()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.voidsetFailedTestCount(int n)Set the number of tests that have failed.voidsetIgnoredTestCount(int n)Set the number of tests that were ignored.voidsetPassedTestCount(int n)Set the number of tests that have passed.inttotalTests()
-
-
-
Method Detail
-
getTestFileCount
public int getTestFileCount()
-
getParseFailureCount
public int getParseFailureCount()
-
incFilesNotParsed
public void incFilesNotParsed()
-
incFiles
public void incFiles()
Increment the number of files processed.
-
incPassed
public void incPassed()
Increment the number of tests that have passed.
-
incIgnored
public void incIgnored()
Increment the number of tests that were ignored.
-
setPassedTestCount
public void setPassedTestCount(int n)
Set the number of tests that have passed.
-
setFailedTestCount
public void setFailedTestCount(int n)
Set the number of tests that have failed.
-
setIgnoredTestCount
public void setIgnoredTestCount(int n)
Set the number of tests that were ignored.
-
add
public void add(TestStatistics stats)
Add the other statistics to this.
-
getFailedTestCount
public int getFailedTestCount()
- Returns:
- The number of failed tests.
-
getPassedTestCount
public int getPassedTestCount()
- Returns:
- The number of passed tests.
-
getIgnoredTestCount
public int getIgnoredTestCount()
- 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.
-
-