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

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

Issue 1764743002: Ignore not ClassDeclaration target of an unknown method invocation. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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 4323 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 }
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