| Index: pkg/analysis_server/test/services/correction/name_suggestion_test.dart
|
| diff --git a/pkg/analysis_server/test/services/correction/name_suggestion_test.dart b/pkg/analysis_server/test/services/correction/name_suggestion_test.dart
|
| index 80a32c99da4a0ed929474b5e7282127f2b2cadf0..d352a5ba29da666c9ec5f68a6408e7a8f6744019 100644
|
| --- a/pkg/analysis_server/test/services/correction/name_suggestion_test.dart
|
| +++ b/pkg/analysis_server/test/services/correction/name_suggestion_test.dart
|
| @@ -4,7 +4,6 @@
|
|
|
| import 'package:analysis_server/src/services/correction/name_suggestion.dart';
|
| import 'package:analyzer/dart/ast/ast.dart';
|
| -import 'package:analyzer/dart/element/element.dart';
|
| import 'package:analyzer/dart/element/type.dart';
|
| import 'package:test/test.dart';
|
| import 'package:test_reflective_loader/test_reflective_loader.dart';
|
| @@ -40,7 +39,7 @@ main() {
|
| }
|
| ''');
|
| Set<String> excluded = new Set<String>.from([]);
|
| - DartType expectedType = (findElement('node') as LocalVariableElement).type;
|
| + DartType expectedType = findLocalVariable('node').type;
|
| Expression assignedExpression =
|
| findNodeAtString('null;', (node) => node is NullLiteral);
|
| List<String> suggestions = getVariableNameSuggestionsForExpression(
|
| @@ -54,7 +53,7 @@ main() {
|
| double res = 0.0;
|
| }
|
| ''');
|
| - DartType expectedType = (findElement('res') as LocalVariableElement).type;
|
| + DartType expectedType = findLocalVariable('res').type;
|
| Expression assignedExpression = findNodeAtString('0.0;');
|
| // first choice for "double" is "d"
|
| expect(
|
| @@ -74,7 +73,7 @@ main() {
|
| int res = 0;
|
| }
|
| ''');
|
| - DartType expectedType = (findElement('res') as LocalVariableElement).type;
|
| + DartType expectedType = findLocalVariable('res').type;
|
| Expression assignedExpression = findNodeAtString('0;');
|
| // first choice for "int" is "i"
|
| expect(
|
| @@ -94,7 +93,7 @@ main() {
|
| String res = 'abc';
|
| }
|
| ''');
|
| - DartType expectedType = (findElement('res') as LocalVariableElement).type;
|
| + DartType expectedType = findLocalVariable('res').type;
|
| Expression assignedExpression = findNodeAtString("'abc';");
|
| // first choice for "String" is "s"
|
| expect(
|
|
|