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

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

Issue 2618653002: Issue 28261. Add support for implementing generic methods in Quick Fix. (Closed)
Patch Set: Created 3 years, 11 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/util.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/protocol/protocol.dart' 10 import 'package:analysis_server/plugin/protocol/protocol.dart'
(...skipping 2601 matching lines...) Expand 10 before | Expand all | Expand 10 after
2612 2612
2613 class B extends A { 2613 class B extends A {
2614 @override 2614 @override
2615 void foo() { 2615 void foo() {
2616 // TODO: implement foo 2616 // TODO: implement foo
2617 } 2617 }
2618 } 2618 }
2619 '''); 2619 ''');
2620 } 2620 }
2621 2621
2622 test_createMissingOverrides_method_generic() async {
2623 resolveTestUnit('''
2624 class C<T> {}
2625 class V<E> {}
2626
2627 abstract class A {
2628 E foo<E extends C<int>>(V<E> v);
2629 }
2630
2631 class B implements A {
2632 }
2633 ''');
2634 await assertHasFix(
2635 DartFixKind.CREATE_MISSING_OVERRIDES,
2636 '''
2637 class C<T> {}
2638 class V<E> {}
2639
2640 abstract class A {
2641 E foo<E extends C<int>>(V<E> v);
2642 }
2643
2644 class B implements A {
2645 @override
2646 E foo<E extends C<int>>(V<E> v) {
2647 // TODO: implement foo
2648 }
2649 }
2650 ''');
2651 }
2652
2622 test_createMissingOverrides_operator() async { 2653 test_createMissingOverrides_operator() async {
2623 resolveTestUnit(''' 2654 resolveTestUnit('''
2624 abstract class A { 2655 abstract class A {
2625 int operator [](int index); 2656 int operator [](int index);
2626 void operator []=(int index, String value); 2657 void operator []=(int index, String value);
2627 } 2658 }
2628 2659
2629 class B extends A { 2660 class B extends A {
2630 } 2661 }
2631 '''); 2662 ''');
(...skipping 2908 matching lines...) Expand 10 before | Expand all | Expand 10 after
5540 var v = 42; 5571 var v = 42;
5541 print('v: $v'); 5572 print('v: $v');
5542 } 5573 }
5543 '''); 5574 ''');
5544 } 5575 }
5545 5576
5546 void verifyResult(String expectedResult) { 5577 void verifyResult(String expectedResult) {
5547 expect(resultCode, expectedResult); 5578 expect(resultCode, expectedResult);
5548 } 5579 }
5549 } 5580 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/lib/src/services/correction/util.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698