Index: pkg/analysis_server/test/services/completion/completion_computer_test.dart |
diff --git a/pkg/analysis_server/test/services/completion/completion_computer_test.dart b/pkg/analysis_server/test/services/completion/completion_computer_test.dart |
index e6bbcb68f32e36b8119aa07754ce7d8cc45ca6ab..dddf75ec3986f8a17731cbb05d7b86c00b9307e2 100644 |
--- a/pkg/analysis_server/test/services/completion/completion_computer_test.dart |
+++ b/pkg/analysis_server/test/services/completion/completion_computer_test.dart |
@@ -94,26 +94,24 @@ class DartCompletionManagerTest extends AbstractSingleUnitTest { |
switch (++count) { |
case 1: |
contributor1.assertCalls(context, source, 0, searchEngine); |
+ expect(contributor1.fastCount, equals(1)); |
+ expect(contributor1.fullCount, equals(0)); |
contributor2.assertCalls(context, source, 0, searchEngine); |
- expect(isLast, isFalse); |
- expect(r.suggestions, hasLength(1)); |
- expect(r.suggestions, contains(suggestion1)); |
- resolveLibrary(); |
- break; |
- case 2: |
- contributor1.assertFull(0); |
- contributor2.assertFull(1); |
+ expect(contributor2.fastCount, equals(1)); |
+ expect(contributor2.fullCount, equals(1)); |
expect(isLast, isTrue); |
expect(r.suggestions, hasLength(2)); |
expect(r.suggestions, contains(suggestion1)); |
expect(r.suggestions, contains(suggestion2)); |
+ resolveLibrary(); |
break; |
default: |
fail('unexpected'); |
} |
}, onDone: () { |
done = true; |
- expect(count, equals(2)); |
+ // There is only one notification |
+ expect(count, equals(1)); |
}); |
return pumpEventQueue().then((_) { |
expect(done, isTrue); |
@@ -134,7 +132,11 @@ class DartCompletionManagerTest extends AbstractSingleUnitTest { |
switch (++count) { |
case 1: |
contributor1.assertCalls(context, source, 0, searchEngine); |
+ expect(contributor1.fastCount, equals(1)); |
+ expect(contributor1.fullCount, equals(0)); |
contributor2.assertCalls(context, source, 0, searchEngine); |
+ expect(contributor2.fastCount, equals(1)); |
+ expect(contributor2.fullCount, equals(0)); |
expect(isLast, isTrue); |
expect(r.suggestions, hasLength(2)); |
expect(r.suggestions, contains(suggestion1)); |
@@ -170,14 +172,11 @@ class MockCompletionContributor extends DartCompletionContributor { |
MockCompletionContributor(this.fastSuggestion, this.fullSuggestion); |
- assertCalls(AnalysisContext context, Source source, int offset, |
- SearchEngine searchEngine) { |
+ assertCalls(AnalysisContext context, Source source, int offset, SearchEngine searchEngine) { |
expect(request.context, equals(context)); |
expect(request.source, equals(source)); |
expect(request.offset, equals(offset)); |
expect(request.searchEngine, equals(searchEngine)); |
- expect(this.fastCount, equals(1)); |
- expect(this.fullCount, equals(0)); |
} |
assertFull(int fullCount) { |