Index: pkg/analyzer/test/src/task/driver_test.dart |
diff --git a/pkg/analyzer/test/src/task/driver_test.dart b/pkg/analyzer/test/src/task/driver_test.dart |
index cfbbe81abbd75a5ed72a7fc6d27d86a6dba4a05c..1053691c9f37f75a491bb6e819846df26fd2e326 100644 |
--- a/pkg/analyzer/test/src/task/driver_test.dart |
+++ b/pkg/analyzer/test/src/task/driver_test.dart |
@@ -28,8 +28,8 @@ main() { |
groupSep = ' | '; |
runReflectiveTests(AnalysisDriverTest); |
runReflectiveTests(CycleAwareDependencyWalkerTest); |
- runReflectiveTests(WorkOrderTest); |
runReflectiveTests(WorkItemTest); |
+ runReflectiveTests(WorkOrderTest); |
} |
class AbstractDriverTest { |
@@ -332,6 +332,28 @@ class AnalysisDriverTest extends AbstractDriverTest { |
expect(analysisDriver.performAnalysisTask(), false); |
} |
+ test_performAnalysisTask_onResultComputed() { |
+ AnalysisTarget target = new TestSource(); |
+ ResultDescriptor result = new ResultDescriptor('result', null); |
+ TestAnalysisTask task; |
+ TaskDescriptor descriptor = new TaskDescriptor( |
+ 'task', (context, target) => task, (target) => {}, [result]); |
+ task = new TestAnalysisTask(context, target, |
+ descriptor: descriptor, value: 42); |
+ WorkItem item = new WorkItem(context, target, descriptor, null); |
+ |
+ bool streamNotified = false; |
+ analysisDriver.onResultComputed(result).listen((event) { |
+ streamNotified = true; |
+ expect(event.context, same(context)); |
+ expect(event.target, same(target)); |
+ expect(event.descriptor, same(result)); |
+ expect(event.value, 42); |
+ }); |
+ analysisDriver.performWorkItem(item); |
+ expect(streamNotified, isTrue); |
+ } |
+ |
test_performWorkItem_exceptionInTask() { |
AnalysisTarget target = new TestSource(); |
ResultDescriptor result = new ResultDescriptor('result', null); |