OLD | NEW |
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.dart.util; | 5 library test.services.completion.dart.util; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 | 8 |
9 import 'package:analysis_server/plugin/protocol/protocol.dart' as protocol | 9 import 'package:analysis_server/plugin/protocol/protocol.dart' as protocol |
10 show Element, ElementKind; | 10 show Element, ElementKind; |
11 import 'package:analysis_server/plugin/protocol/protocol.dart' | 11 import 'package:analysis_server/plugin/protocol/protocol.dart' |
12 hide Element, ElementKind; | 12 hide Element, ElementKind; |
13 import 'package:analysis_server/plugin/protocol/protocol.dart'; | 13 import 'package:analysis_server/plugin/protocol/protocol.dart'; |
14 import 'package:analysis_server/src/provisional/completion/dart/completion_dart.
dart'; | 14 import 'package:analysis_server/src/provisional/completion/dart/completion_dart.
dart'; |
15 import 'package:analysis_server/src/services/completion/completion_core.dart'; | 15 import 'package:analysis_server/src/services/completion/completion_core.dart'; |
16 import 'package:analysis_server/src/services/completion/completion_performance.d
art'; | 16 import 'package:analysis_server/src/services/completion/completion_performance.d
art'; |
17 import 'package:analysis_server/src/services/completion/dart/completion_manager.
dart' | 17 import 'package:analysis_server/src/services/completion/dart/completion_manager.
dart' |
18 show DartCompletionRequestImpl, ReplacementRange; | 18 show DartCompletionRequestImpl, ReplacementRange; |
19 import 'package:analysis_server/src/services/index/index.dart'; | 19 import 'package:analysis_server/src/services/index/index.dart'; |
20 import 'package:analysis_server/src/services/search/search_engine_internal.dart'
; | 20 import 'package:analysis_server/src/services/search/search_engine_internal.dart'
; |
21 import 'package:analyzer/src/generated/source.dart'; | 21 import 'package:analyzer/src/generated/source.dart'; |
22 import 'package:analyzer/task/dart.dart'; | 22 import 'package:analyzer/task/dart.dart'; |
23 import 'package:unittest/unittest.dart'; | 23 import 'package:test/test.dart'; |
24 | 24 |
25 import '../../../abstract_context.dart'; | 25 import '../../../abstract_context.dart'; |
26 | 26 |
27 int suggestionComparator(CompletionSuggestion s1, CompletionSuggestion s2) { | 27 int suggestionComparator(CompletionSuggestion s1, CompletionSuggestion s2) { |
28 String c1 = s1.completion.toLowerCase(); | 28 String c1 = s1.completion.toLowerCase(); |
29 String c2 = s2.completion.toLowerCase(); | 29 String c2 = s2.completion.toLowerCase(); |
30 return c1.compareTo(c2); | 30 return c1.compareTo(c2); |
31 } | 31 } |
32 | 32 |
33 abstract class DartCompletionContributorTest extends AbstractContextTest { | 33 abstract class DartCompletionContributorTest extends AbstractContextTest { |
(...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
559 } | 559 } |
560 | 560 |
561 @override | 561 @override |
562 void setUp() { | 562 void setUp() { |
563 super.setUp(); | 563 super.setUp(); |
564 index = createMemoryIndex(); | 564 index = createMemoryIndex(); |
565 searchEngine = new SearchEngineImpl(index); | 565 searchEngine = new SearchEngineImpl(index); |
566 contributor = createContributor(); | 566 contributor = createContributor(); |
567 } | 567 } |
568 } | 568 } |
OLD | NEW |