Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(129)

Unified Diff: pkg/analysis_services/test/completion/completion_computer_test.dart

Issue 440343003: incremental improvement to top level code completion results (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merge Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/analysis_services/test/completion/completion_computer_test.dart
diff --git a/pkg/analysis_services/test/completion/completion_computer_test.dart b/pkg/analysis_services/test/completion/completion_computer_test.dart
index bb2fe05c37276f4dd5ab5c9ff0d2b2e3c2b25815..0956d60c2d997a71aebb28fe03ee123e94c04656 100644
--- a/pkg/analysis_services/test/completion/completion_computer_test.dart
+++ b/pkg/analysis_services/test/completion/completion_computer_test.dart
@@ -4,13 +4,14 @@
library test.services.completion.suggestion;
+import 'dart:async';
+
import 'package:analysis_services/completion/completion_computer.dart';
import 'package:analysis_testing/reflective_tests.dart';
import 'package:analyzer/src/generated/source.dart';
import 'package:unittest/unittest.dart';
import 'completion_test_util.dart';
-import 'dart:async';
main() {
groupSep = ' | ';
@@ -23,19 +24,25 @@ class CompletionManagerTest extends AbstractCompletionTest {
test_dart() {
Source source = addSource('/does/not/exist.dart', '');
- var manager = CompletionManager.create(source, 0, null);
+ var manager = CompletionManager.create(context, source, 0, null);
expect(manager.runtimeType, DartCompletionManager);
}
test_html() {
Source source = addSource('/does/not/exist.html', '');
- var manager = CompletionManager.create(source, 0, null);
+ var manager = CompletionManager.create(context, source, 0, null);
+ expect(manager.runtimeType, NoOpCompletionManager);
+ }
+
+ test_null_context() {
+ Source source = addSource('/does/not/exist.dart', '');
+ var manager = CompletionManager.create(null, source, 0, null);
expect(manager.runtimeType, NoOpCompletionManager);
}
test_other() {
Source source = addSource('/does/not/exist.foo', '');
- var manager = CompletionManager.create(source, 0, null);
+ var manager = CompletionManager.create(context, source, 0, null);
expect(manager.runtimeType, NoOpCompletionManager);
}
}
@@ -63,7 +70,7 @@ class DartCompletionManagerTest extends AbstractCompletionTest {
test_topLevel() {
Source source = addSource('/does/not/exist.dart', '');
- var manager = new DartCompletionManager(source, 0, searchEngine);
+ var manager = new DartCompletionManager(context, source, 0, searchEngine);
bool anyResult;
manager.results().forEach((_) {
anyResult = true;

Powered by Google App Engine
This is Rietveld 408576698