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

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

Issue 2916923002: Update a few more methods in FixProcessor, and fix some bugs in ChangeBuilder (Closed)
Patch Set: Created 3 years, 6 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
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 import 'dart:async'; 5 import 'dart:async';
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/edit/fix/fix_dart.dart'; 8 import 'package:analysis_server/plugin/edit/fix/fix_dart.dart';
9 import 'package:analysis_server/src/services/correction/fix.dart'; 9 import 'package:analysis_server/src/services/correction/fix.dart';
10 import 'package:analysis_server/src/services/correction/fix_internal.dart'; 10 import 'package:analysis_server/src/services/correction/fix_internal.dart';
(...skipping 3412 matching lines...) Expand 10 before | Expand all | Expand 10 after
3423 library main; 3423 library main;
3424 int main() async { 3424 int main() async {
3425 } 3425 }
3426 '''); 3426 ''');
3427 await assertHasFix( 3427 await assertHasFix(
3428 DartFixKind.REPLACE_RETURN_TYPE_FUTURE, 3428 DartFixKind.REPLACE_RETURN_TYPE_FUTURE,
3429 ''' 3429 '''
3430 library main; 3430 library main;
3431 3431
3432 import 'dart:async'; 3432 import 'dart:async';
3433
3433 Future<int> main() async { 3434 Future<int> main() async {
3434 } 3435 }
3435 '''); 3436 ''');
3436 } 3437 }
3437 3438
3438 test_illegalAsyncReturnType_asyncLibrary_usePrefix() async { 3439 test_illegalAsyncReturnType_asyncLibrary_usePrefix() async {
3439 errorFilter = (AnalysisError error) { 3440 errorFilter = (AnalysisError error) {
3440 return error.errorCode == StaticTypeWarningCode.ILLEGAL_ASYNC_RETURN_TYPE; 3441 return error.errorCode == StaticTypeWarningCode.ILLEGAL_ASYNC_RETURN_TYPE;
3441 }; 3442 };
3442 await resolveTestUnit(''' 3443 await resolveTestUnit('''
(...skipping 3459 matching lines...) Expand 10 before | Expand all | Expand 10 after
6902 @override 6903 @override
6903 final AnalysisError error; 6904 final AnalysisError error;
6904 6905
6905 _DartFixContextImpl(this.resourceProvider, this.analysisDriver, 6906 _DartFixContextImpl(this.resourceProvider, this.analysisDriver,
6906 this.astProvider, this.unit, this.error); 6907 this.astProvider, this.unit, this.error);
6907 6908
6908 @override 6909 @override
6909 GetTopLevelDeclarations get getTopLevelDeclarations => 6910 GetTopLevelDeclarations get getTopLevelDeclarations =>
6910 analysisDriver.getTopLevelNameDeclarations; 6911 analysisDriver.getTopLevelNameDeclarations;
6911 } 6912 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698