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

Side by Side Diff: pkg/analysis_services/test/completion/completion_computer_test.dart

Issue 436263002: incremental progress reworking code completion manager / computers (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: address comments 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pkg/analysis_services/lib/completion/completion_computer.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library test.services.completion.suggestion; 5 library test.services.completion.suggestion;
6 6
7 import 'package:analysis_services/completion/completion_computer.dart'; 7 import 'package:analysis_services/completion/completion_computer.dart';
8 import 'package:analysis_services/src/completion/top_level_computer.dart';
9 import 'package:analysis_testing/reflective_tests.dart'; 8 import 'package:analysis_testing/reflective_tests.dart';
9 import 'package:analyzer/src/generated/source.dart';
10 import 'package:unittest/unittest.dart'; 10 import 'package:unittest/unittest.dart';
11 11
12 import 'completion_test_util.dart'; 12 import 'completion_test_util.dart';
13 import 'package:analyzer/src/generated/source.dart'; 13 import 'dart:async';
14 14
15 main() { 15 main() {
16 groupSep = ' | '; 16 groupSep = ' | ';
17 runReflectiveTests(CompletionManagerTest); 17 runReflectiveTests(CompletionManagerTest);
18 runReflectiveTests(DartCompletionManagerTest); 18 runReflectiveTests(DartCompletionManagerTest);
19 } 19 }
20 20
21 @ReflectiveTestCase() 21 @ReflectiveTestCase()
22 class CompletionManagerTest extends AbstractCompletionTest { 22 class CompletionManagerTest extends AbstractCompletionTest {
23 23
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 computers.forEach((c) { 57 computers.forEach((c) {
58 msg.writeln(' ${c.runtimeType}'); 58 msg.writeln(' ${c.runtimeType}');
59 }); 59 });
60 fail(msg.toString()); 60 fail(msg.toString());
61 } 61 }
62 } 62 }
63 63
64 test_topLevel() { 64 test_topLevel() {
65 Source source = addSource('/does/not/exist.dart', ''); 65 Source source = addSource('/does/not/exist.dart', '');
66 var manager = new DartCompletionManager(source, 0, searchEngine); 66 var manager = new DartCompletionManager(source, 0, searchEngine);
67 manager.generate().then((List<CompletionComputer> computers) { 67 bool anyResult;
68 assertContainsType(computers, TopLevelComputer); 68 manager.results().forEach((_) {
69 expect(computers, hasLength(1)); 69 anyResult = true;
70 });
71 return new Future.delayed(Duration.ZERO, () {
72 expect(anyResult, isTrue);
70 }); 73 });
71 } 74 }
72 } 75 }
OLDNEW
« no previous file with comments | « pkg/analysis_services/lib/completion/completion_computer.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698