| Index: pkg/analysis_server/test/services/correction/fix_test.dart
|
| diff --git a/pkg/analysis_server/test/services/correction/fix_test.dart b/pkg/analysis_server/test/services/correction/fix_test.dart
|
| index a54eb0085168550511eccd2fab76a53f3c558375..6f0d8ab05171ee679a2d7586811c9f608d1a3e26 100644
|
| --- a/pkg/analysis_server/test/services/correction/fix_test.dart
|
| +++ b/pkg/analysis_server/test/services/correction/fix_test.dart
|
| @@ -597,6 +597,55 @@ main(B b) {
|
| ''');
|
| }
|
|
|
| + test_changeTypeAnnotation_BAD_multipleVariables() async {
|
| + resolveTestUnit('''
|
| +main() {
|
| + String a, b = 42;
|
| +}
|
| +''');
|
| + await assertNoFix(DartFixKind.CHANGE_TYPE_ANNOTATION);
|
| + }
|
| +
|
| + test_changeTypeAnnotation_BAD_notVariableDeclaration() async {
|
| + resolveTestUnit('''
|
| +main() {
|
| + String p;
|
| + p = 42;
|
| +}
|
| +''');
|
| + await assertNoFix(DartFixKind.CHANGE_TYPE_ANNOTATION);
|
| + }
|
| +
|
| + test_changeTypeAnnotation_OK_generic() async {
|
| + resolveTestUnit('''
|
| +main() {
|
| + String v = <int>[];
|
| +}
|
| +''');
|
| + await assertHasFix(
|
| + DartFixKind.CHANGE_TYPE_ANNOTATION,
|
| + '''
|
| +main() {
|
| + List<int> v = <int>[];
|
| +}
|
| +''');
|
| + }
|
| +
|
| + test_changeTypeAnnotation_OK_simple() async {
|
| + resolveTestUnit('''
|
| +main() {
|
| + String v = 'abc'.length;
|
| +}
|
| +''');
|
| + await assertHasFix(
|
| + DartFixKind.CHANGE_TYPE_ANNOTATION,
|
| + '''
|
| +main() {
|
| + int v = 'abc'.length;
|
| +}
|
| +''');
|
| + }
|
| +
|
| test_createClass() async {
|
| resolveTestUnit('''
|
| main() {
|
|
|