assertDiagnosticsInFile method
Asserts that the number of diagnostics that have been gathered at path
matches the number of expectedDiagnostics and that they have the
expected error descriptions and locations.
The order in which the diagnostics were gathered is ignored.
Note: Be sure to await any use of this API, to avoid stale analysis
results (See DisposedAnalysisContextResult).
Implementation
Future<void> assertDiagnosticsInFile(
String path,
List<ExpectedDiagnostic> expectedDiagnostics,
) async {
await _resolveFile(path);
assertDiagnosticsIn(_diagnostics, expectedDiagnostics);
}