| 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.toplevel; | 5 library test.services.completion.toplevel; |
| 6 | 6 |
| 7 import 'package:analysis_server/src/protocol.dart'; | 7 import 'package:analysis_server/src/protocol.dart'; |
| 8 import 'package:analysis_server/src/services/completion/completion_manager.dart'
; | 8 import 'package:analysis_server/src/services/completion/completion_manager.dart'
; |
| 9 import 'package:analysis_server/src/services/completion/dart_completion_cache.da
rt'; | 9 import 'package:analysis_server/src/services/completion/dart_completion_cache.da
rt'; |
| 10 import 'package:analysis_server/src/services/completion/dart_completion_manager.
dart'; | 10 import 'package:analysis_server/src/services/completion/dart_completion_manager.
dart'; |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 isCached(cache.otherImportedSuggestions, completion)) { | 92 isCached(cache.otherImportedSuggestions, completion)) { |
| 93 fail('expected $completion NOT to be cached'); | 93 fail('expected $completion NOT to be cached'); |
| 94 } | 94 } |
| 95 } | 95 } |
| 96 | 96 |
| 97 bool isCached(List<CompletionSuggestion> suggestions, String completion) => | 97 bool isCached(List<CompletionSuggestion> suggestions, String completion) => |
| 98 suggestions.any((CompletionSuggestion s) => s.completion == completion); | 98 suggestions.any((CompletionSuggestion s) => s.completion == completion); |
| 99 | 99 |
| 100 @override | 100 @override |
| 101 void setUpComputer() { | 101 void setUpComputer() { |
| 102 computer = new ImportedComputer(); | 102 computer = new ImportedComputer(shouldWaitForLowPrioritySuggestions: true); |
| 103 } | 103 } |
| 104 | 104 |
| 105 @override | 105 @override |
| 106 test_ArgumentList() { | 106 test_ArgumentList() { |
| 107 return super.test_ArgumentList().then((_) { | 107 return super.test_ArgumentList().then((_) { |
| 108 expect(request.cache.importKey, "import '/libA.dart';"); | 108 expect(request.cache.importKey, "import '/libA.dart';"); |
| 109 }); | 109 }); |
| 110 } | 110 } |
| 111 | 111 |
| 112 @override | 112 @override |
| (...skipping 25 matching lines...) Expand all Loading... |
| 138 test_Block_inherited_imported() { | 138 test_Block_inherited_imported() { |
| 139 return super.test_Block_inherited_imported().then((_) { | 139 return super.test_Block_inherited_imported().then((_) { |
| 140 assertCached('E'); | 140 assertCached('E'); |
| 141 assertCached('F'); | 141 assertCached('F'); |
| 142 assertNotCached('e1'); | 142 assertNotCached('e1'); |
| 143 assertNotCached('i2'); | 143 assertNotCached('i2'); |
| 144 assertNotCached('m1'); | 144 assertNotCached('m1'); |
| 145 }); | 145 }); |
| 146 } | 146 } |
| 147 } | 147 } |
| OLD | NEW |