Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(28)

Side by Side Diff: pkg/analysis_server/test/services/correction/fix_test.dart

Issue 1981353002: Issue 26460. Add Quick Fix for missing 'Function.call()' implementation. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « pkg/analysis_server/lib/src/services/correction/fix_internal.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/lib/src/services/correction/fix_internal.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698