| 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 2236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2247 await assertHasFix( | 2247 await assertHasFix( |
| 2248 DartFixKind.CREATE_LOCAL_VARIABLE, | 2248 DartFixKind.CREATE_LOCAL_VARIABLE, |
| 2249 ''' | 2249 ''' |
| 2250 main() { | 2250 main() { |
| 2251 int test; | 2251 int test; |
| 2252 test += 42; | 2252 test += 42; |
| 2253 } | 2253 } |
| 2254 '''); | 2254 '''); |
| 2255 } | 2255 } |
| 2256 | 2256 |
| 2257 test_createMissingMethodCall() async { |
| 2258 resolveTestUnit(''' |
| 2259 class C implements Function { |
| 2260 } |
| 2261 '''); |
| 2262 await assertHasFix( |
| 2263 DartFixKind.CREATE_MISSING_METHOD_CALL, |
| 2264 ''' |
| 2265 class C implements Function { |
| 2266 call() { |
| 2267 // TODO: implement call |
| 2268 } |
| 2269 } |
| 2270 '''); |
| 2271 } |
| 2272 |
| 2257 test_createMissingOverrides_field_untyped() async { | 2273 test_createMissingOverrides_field_untyped() async { |
| 2258 resolveTestUnit(''' | 2274 resolveTestUnit(''' |
| 2259 class A { | 2275 class A { |
| 2260 var f; | 2276 var f; |
| 2261 } | 2277 } |
| 2262 | 2278 |
| 2263 class B implements A { | 2279 class B implements A { |
| 2264 } | 2280 } |
| 2265 '''); | 2281 '''); |
| 2266 await assertHasFix( | 2282 await assertHasFix( |
| (...skipping 3046 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5313 @override | 5329 @override |
| 5314 void t() { } | 5330 void t() { } |
| 5315 } | 5331 } |
| 5316 '''); | 5332 '''); |
| 5317 } | 5333 } |
| 5318 | 5334 |
| 5319 void verifyResult(String expectedResult) { | 5335 void verifyResult(String expectedResult) { |
| 5320 expect(resultCode, expectedResult); | 5336 expect(resultCode, expectedResult); |
| 5321 } | 5337 } |
| 5322 } | 5338 } |
| OLD | NEW |