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.correction.fix; | 5 library test.services.correction.fix; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 | 8 |
9 import 'package:analysis_server/plugin/edit/fix/fix_core.dart'; | 9 import 'package:analysis_server/plugin/edit/fix/fix_core.dart'; |
10 import 'package:analysis_server/plugin/edit/fix/fix_dart.dart'; | 10 import 'package:analysis_server/plugin/edit/fix/fix_dart.dart'; |
(...skipping 4323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4334 | 4334 |
4335 test_undefinedMethod_create_BAD_inSDK() async { | 4335 test_undefinedMethod_create_BAD_inSDK() async { |
4336 resolveTestUnit(''' | 4336 resolveTestUnit(''' |
4337 main() { | 4337 main() { |
4338 List.foo(); | 4338 List.foo(); |
4339 } | 4339 } |
4340 '''); | 4340 '''); |
4341 await assertNoFix(DartFixKind.CREATE_METHOD); | 4341 await assertNoFix(DartFixKind.CREATE_METHOD); |
4342 } | 4342 } |
4343 | 4343 |
| 4344 test_undefinedMethod_create_BAD_targetIsEnum() async { |
| 4345 resolveTestUnit(''' |
| 4346 enum MyEnum {A, B} |
| 4347 main() { |
| 4348 MyEnum.foo(); |
| 4349 } |
| 4350 '''); |
| 4351 await assertNoFix(DartFixKind.CREATE_METHOD); |
| 4352 } |
| 4353 |
4344 test_undefinedMethod_create_generic_BAD_argumentType() async { | 4354 test_undefinedMethod_create_generic_BAD_argumentType() async { |
4345 resolveTestUnit(''' | 4355 resolveTestUnit(''' |
4346 class A<T> { | 4356 class A<T> { |
4347 B b; | 4357 B b; |
4348 Map<int, T> items; | 4358 Map<int, T> items; |
4349 main() { | 4359 main() { |
4350 b.process(items); | 4360 b.process(items); |
4351 } | 4361 } |
4352 } | 4362 } |
4353 | 4363 |
(...skipping 870 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5224 @override | 5234 @override |
5225 void t() { } | 5235 void t() { } |
5226 } | 5236 } |
5227 '''); | 5237 '''); |
5228 } | 5238 } |
5229 | 5239 |
5230 void verifyResult(String expectedResult) { | 5240 void verifyResult(String expectedResult) { |
5231 expect(resultCode, expectedResult); | 5241 expect(resultCode, expectedResult); |
5232 } | 5242 } |
5233 } | 5243 } |
OLD | NEW |