| OLD | NEW |
| 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, 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 import 'dart:async'; | 5 import 'dart:async'; |
| 6 | 6 |
| 7 import 'package:analyzer/file_system/file_system.dart'; | 7 import 'package:analyzer/file_system/file_system.dart'; |
| 8 import 'package:analyzer/source/package_map_resolver.dart'; | 8 import 'package:analyzer/source/package_map_resolver.dart'; |
| 9 import 'package:analyzer/src/dart/analysis/driver.dart'; | 9 import 'package:analyzer/src/dart/analysis/driver.dart'; |
| 10 import 'package:analyzer/src/generated/source.dart'; | 10 import 'package:analyzer/src/generated/source.dart'; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 } | 25 } |
| 26 | 26 |
| 27 abstract class DartCompletionContributorTest extends AbstractContextTest { | 27 abstract class DartCompletionContributorTest extends AbstractContextTest { |
| 28 static const String _UNCHECKED = '__UNCHECKED__'; | 28 static const String _UNCHECKED = '__UNCHECKED__'; |
| 29 String testFile; | 29 String testFile; |
| 30 Source testSource; | 30 Source testSource; |
| 31 int completionOffset; | 31 int completionOffset; |
| 32 int replacementOffset; | 32 int replacementOffset; |
| 33 int replacementLength; | 33 int replacementLength; |
| 34 CompletionContributor contributor; | 34 CompletionContributor contributor; |
| 35 CompletionRequest request; | 35 DartCompletionRequest request; |
| 36 List<CompletionSuggestion> suggestions; | 36 List<CompletionSuggestion> suggestions; |
| 37 | 37 |
| 38 /** | 38 /** |
| 39 * If `true` and `null` is specified as the suggestion's expected returnType | 39 * If `true` and `null` is specified as the suggestion's expected returnType |
| 40 * then the actual suggestion is expected to have a `dynamic` returnType. | 40 * then the actual suggestion is expected to have a `dynamic` returnType. |
| 41 * Newer tests return `false` so that they can distinguish between | 41 * Newer tests return `false` so that they can distinguish between |
| 42 * `dynamic` and `null`. | 42 * `dynamic` and `null`. |
| 43 * Eventually all tests should be converted and this getter removed. | 43 * Eventually all tests should be converted and this getter removed. |
| 44 */ | 44 */ |
| 45 bool get isNullExpectedReturnTypeConsideredDynamic => true; | 45 bool get isNullExpectedReturnTypeConsideredDynamic => true; |
| (...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 560 addSource(path, content); | 560 addSource(path, content); |
| 561 } | 561 } |
| 562 | 562 |
| 563 @override | 563 @override |
| 564 void setUp() { | 564 void setUp() { |
| 565 super.setUp(); | 565 super.setUp(); |
| 566 testFile = provider.convertPath('/completionTest.dart'); | 566 testFile = provider.convertPath('/completionTest.dart'); |
| 567 contributor = createContributor(); | 567 contributor = createContributor(); |
| 568 } | 568 } |
| 569 } | 569 } |
| OLD | NEW |