Class TypecheckResult
java.lang.Object
org.checkerframework.framework.test.TypecheckResult
Represents the test results from typechecking one or more Java files using the given
TestConfiguration.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedTypecheckResult(TestConfiguration configuration, CompilationResult compilationResult, Collection<TestDiagnostic> expectedDiagnostics, Collection<TestDiagnostic> missingDiagnostics, Collection<TestDiagnostic> unexpectedDiagnostics) Creates a TypecheckResult. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns true if the test failed.static TypecheckResultfromCompilationResults(TestConfiguration configuration, CompilationResult result, Collection<TestDiagnostic> expectedDiagnostics) Collection<Diagnostic<? extends JavaFileObject>> Returns the actual diagnostics.Returns the compilation result.Returns the test configuration.Returns the expected diagnostics.Returns the diagnostics that were expected but were not issued.Returns the diagnostics that were issued but were not expected.Summarize unexpected and missing diagnostics.
-
Constructor Details
-
TypecheckResult
protected TypecheckResult(TestConfiguration configuration, CompilationResult compilationResult, Collection<TestDiagnostic> expectedDiagnostics, Collection<TestDiagnostic> missingDiagnostics, Collection<TestDiagnostic> unexpectedDiagnostics) Creates a TypecheckResult.- Parameters:
configuration- The test configuration.compilationResult- The compilation result.expectedDiagnostics- the expected diagnosticsmissingDiagnostics- the diagnostics that were expected but were not issuedunexpectedDiagnostics- the diagnostics that were issued but were not expected
-
-
Method Details
-
getConfiguration
Returns the test configuration.- Returns:
- the test configuration
-
getCompilationResult
Returns the compilation result.- Returns:
- the compilation result
-
getActualDiagnostics
Returns the actual diagnostics.- Returns:
- the actual diagnostics
-
getExpectedDiagnostics
Returns the expected diagnostics.- Returns:
- the expected diagnostics
-
didTestFail
public boolean didTestFail()Returns true if the test failed.- Returns:
- true if the test failed
-
getMissingDiagnostics
Returns the diagnostics that were expected but were not issued.- Returns:
- the diagnostics that were expected but were not issued
-
getUnexpectedDiagnostics
Returns the diagnostics that were issued but were not expected.- Returns:
- the diagnostics that were issued but were not expected
-
getErrorHeaders
-
summarize
Summarize unexpected and missing diagnostics.- Returns:
- summary of failures
-
fromCompilationResults
public static TypecheckResult fromCompilationResults(TestConfiguration configuration, CompilationResult result, Collection<TestDiagnostic> expectedDiagnostics)
-