| 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.manager; | 5 library test.services.completion.manager; |
| 6 | 6 |
| 7 import 'package:analysis_server/src/services/completion/completion_manager.dart'
; | 7 import 'package:analysis_server/src/services/completion/completion_manager.dart'
; |
| 8 import 'package:analysis_server/src/services/completion/dart_completion_manager.
dart'; | 8 import 'package:analysis_server/src/services/completion/dart_completion_manager.
dart'; |
| 9 import 'package:analyzer/src/generated/source.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 '../../abstract_context.dart'; | 12 import '../../abstract_context.dart'; |
| 13 import '../../reflective_tests.dart'; | 13 import '../../reflective_tests.dart'; |
| 14 | 14 |
| 15 main() { | 15 main() { |
| 16 groupSep = ' | '; | 16 groupSep = ' | '; |
| 17 runReflectiveTests(CompletionManagerTest); | 17 runReflectiveTests(CompletionManagerTest); |
| 18 } | 18 } |
| 19 | 19 |
| 20 @ReflectiveTestCase() | 20 @reflectiveTest |
| 21 class CompletionManagerTest extends AbstractContextTest { | 21 class CompletionManagerTest extends AbstractContextTest { |
| 22 var perf = new CompletionPerformance(); | 22 var perf = new CompletionPerformance(); |
| 23 | 23 |
| 24 test_dart() { | 24 test_dart() { |
| 25 Source source = addSource('/does/not/exist.dart', ''); | 25 Source source = addSource('/does/not/exist.dart', ''); |
| 26 var manager = new CompletionManager.create(context, source, null); | 26 var manager = new CompletionManager.create(context, source, null); |
| 27 expect(manager.runtimeType, DartCompletionManager); | 27 expect(manager.runtimeType, DartCompletionManager); |
| 28 } | 28 } |
| 29 | 29 |
| 30 test_html() { | 30 test_html() { |
| 31 Source source = addSource('/does/not/exist.html', ''); | 31 Source source = addSource('/does/not/exist.html', ''); |
| 32 var manager = new CompletionManager.create(context, source, null); | 32 var manager = new CompletionManager.create(context, source, null); |
| 33 expect(manager.runtimeType, NoOpCompletionManager); | 33 expect(manager.runtimeType, NoOpCompletionManager); |
| 34 } | 34 } |
| 35 | 35 |
| 36 test_null_context() { | 36 test_null_context() { |
| 37 Source source = addSource('/does/not/exist.dart', ''); | 37 Source source = addSource('/does/not/exist.dart', ''); |
| 38 var manager = new CompletionManager.create(null, source, null); | 38 var manager = new CompletionManager.create(null, source, null); |
| 39 expect(manager.runtimeType, NoOpCompletionManager); | 39 expect(manager.runtimeType, NoOpCompletionManager); |
| 40 } | 40 } |
| 41 | 41 |
| 42 test_other() { | 42 test_other() { |
| 43 Source source = addSource('/does/not/exist.foo', ''); | 43 Source source = addSource('/does/not/exist.foo', ''); |
| 44 var manager = new CompletionManager.create(context, source, null); | 44 var manager = new CompletionManager.create(context, source, null); |
| 45 expect(manager.runtimeType, NoOpCompletionManager); | 45 expect(manager.runtimeType, NoOpCompletionManager); |
| 46 } | 46 } |
| 47 } | 47 } |
| OLD | NEW |