| Index: pkg/analyzer/test/src/dart/analysis/driver_test.dart
|
| diff --git a/pkg/analyzer/test/src/dart/analysis/driver_test.dart b/pkg/analyzer/test/src/dart/analysis/driver_test.dart
|
| index cf941a4fbce43bdb788f72332b227dcea3acbd86..c3e6cde79e5e5c0b2aea693d223fb7cf73da37f4 100644
|
| --- a/pkg/analyzer/test/src/dart/analysis/driver_test.dart
|
| +++ b/pkg/analyzer/test/src/dart/analysis/driver_test.dart
|
| @@ -562,8 +562,25 @@ part 'part.dart';
|
| AnalysisResult result1 = await driver.getResult(a);
|
| expect(driver.test.priorityResults, containsPair(a, result1));
|
|
|
| - AnalysisResult result2 = await driver.getResult(a);
|
| - expect(result2, same(result1));
|
| + await scheduler.waitForIdle();
|
| + allResults.clear();
|
| +
|
| + // Get the (cached) result, not reported to the stream.
|
| + {
|
| + AnalysisResult result2 = await driver.getResult(a);
|
| + expect(result2, same(result1));
|
| + expect(allResults, isEmpty);
|
| + }
|
| +
|
| + // Get the (cached) result, reported to the stream.
|
| + {
|
| + AnalysisResult result2 =
|
| + await driver.getResult(a, sendCachedToStream: true);
|
| + expect(result2, same(result1));
|
| +
|
| + expect(allResults, hasLength(1));
|
| + expect(allResults.single, same(result1));
|
| + }
|
| }
|
|
|
| test_cachedPriorityResults_flush_onAnyFileChange() async {
|
|
|