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

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

Issue 1428903002: Mark HintCode.CAN_BE_NULL_AFTER_NULL_AWARE as fixable. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month 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 'package:analysis_server/plugin/edit/fix/fix_core.dart'; 7 import 'package:analysis_server/plugin/edit/fix/fix_core.dart';
8 import 'package:analysis_server/plugin/protocol/protocol.dart' 8 import 'package:analysis_server/plugin/protocol/protocol.dart'
9 hide AnalysisError; 9 hide AnalysisError;
10 import 'package:analysis_server/src/services/correction/fix.dart'; 10 import 'package:analysis_server/src/services/correction/fix.dart';
(...skipping 3280 matching lines...) Expand 10 before | Expand all | Expand 10 after
3291 3291
3292 void test_removeUnnecessaryCast_assignment() { 3292 void test_removeUnnecessaryCast_assignment() {
3293 resolveTestUnit(''' 3293 resolveTestUnit('''
3294 main(Object p) { 3294 main(Object p) {
3295 if (p is String) { 3295 if (p is String) {
3296 String v = ((p as String)); 3296 String v = ((p as String));
3297 } 3297 }
3298 } 3298 }
3299 '''); 3299 ''');
3300 assertHasFix( 3300 assertHasFix(
3301 DartFixKind.REMOVE_UNNECASSARY_CAST, 3301 DartFixKind.REMOVE_UNNECESSARY_CAST,
3302 ''' 3302 '''
3303 main(Object p) { 3303 main(Object p) {
3304 if (p is String) { 3304 if (p is String) {
3305 String v = p; 3305 String v = p;
3306 } 3306 }
3307 } 3307 }
3308 '''); 3308 ''');
3309 } 3309 }
3310 3310
3311 void test_removeUnusedCatchClause() { 3311 void test_removeUnusedCatchClause() {
(...skipping 1301 matching lines...) Expand 10 before | Expand all | Expand 10 after
4613 int offset = resultCode.indexOf(search); 4613 int offset = resultCode.indexOf(search);
4614 positions.add(new Position(testFile, offset)); 4614 positions.add(new Position(testFile, offset));
4615 } 4615 }
4616 return positions; 4616 return positions;
4617 } 4617 }
4618 4618
4619 void _performAnalysis() { 4619 void _performAnalysis() {
4620 while (context.performAnalysisTask().hasMoreWork); 4620 while (context.performAnalysisTask().hasMoreWork);
4621 } 4621 }
4622 } 4622 }
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