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

Unified Diff: pkg/analysis_server/test/services/correction/fix_test.dart

Issue 2827863003: Revert "New Lint quick-fix: prefer_collection_literals (#29378)" (Closed)
Patch Set: Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analysis_server/test/mock_sdk.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/test/services/correction/fix_test.dart
diff --git a/pkg/analysis_server/test/services/correction/fix_test.dart b/pkg/analysis_server/test/services/correction/fix_test.dart
index b22cf37548e6ad7807608c3d269ea358e332856b..84b313adac620a726166f6cbe25a09d0362ed4bf 100644
--- a/pkg/analysis_server/test/services/correction/fix_test.dart
+++ b/pkg/analysis_server/test/services/correction/fix_test.dart
@@ -5958,110 +5958,6 @@ var x;
''');
}
- test_replaceWithLiteral_linkedHashMap_withCommentsInGeneric() async {
- String src = '''
-final a = /*LINT*/new LinkedHashMap<int,/*comment*/int>();
-''';
- await findLint(src, LintNames.prefer_collection_literals);
-
- await applyFix(DartFixKind.REPLACE_WITH_LITERAL);
-
- verifyResult('''
-final a = <int,/*comment*/int>{};
-''');
- }
-
- test_replaceWithLiteral_linkedHashMap_withDynamicGenerics() async {
- String src = '''
-final a = /*LINT*/new LinkedHashMap<dynamic,dynamic>();
-''';
- await findLint(src, LintNames.prefer_collection_literals);
-
- await applyFix(DartFixKind.REPLACE_WITH_LITERAL);
-
- verifyResult('''
-final a = <dynamic,dynamic>{};
-''');
- }
-
- test_replaceWithLiteral_linkedHashMap_withGeneric() async {
- String src = '''
-final a = /*LINT*/new LinkedHashMap<int,int>();
-''';
- await findLint(src, LintNames.prefer_collection_literals);
-
- await applyFix(DartFixKind.REPLACE_WITH_LITERAL);
-
- verifyResult('''
-final a = <int,int>{};
-''');
- }
-
- test_replaceWithLiteral_linkedHashMap_withoutGeneric() async {
- String src = '''
-final a = /*LINT*/new LinkedHashMap();
-''';
- await findLint(src, LintNames.prefer_collection_literals);
-
- await applyFix(DartFixKind.REPLACE_WITH_LITERAL);
-
- verifyResult('''
-final a = {};
-''');
- }
-
- test_replaceWithLiteral_list_withGeneric() async {
- String src = '''
-final a = /*LINT*/new List<int>();
-''';
- await findLint(src, LintNames.prefer_collection_literals);
-
- await applyFix(DartFixKind.REPLACE_WITH_LITERAL);
-
- verifyResult('''
-final a = <int>[];
-''');
- }
-
- test_replaceWithLiteral_list_withoutGeneric() async {
- String src = '''
-final a = /*LINT*/new List();
-''';
- await findLint(src, LintNames.prefer_collection_literals);
-
- await applyFix(DartFixKind.REPLACE_WITH_LITERAL);
-
- verifyResult('''
-final a = [];
-''');
- }
-
- test_replaceWithLiteral_map_withGeneric() async {
- String src = '''
-final a = /*LINT*/new Map<int,int>();
-''';
- await findLint(src, LintNames.prefer_collection_literals);
-
- await applyFix(DartFixKind.REPLACE_WITH_LITERAL);
-
- verifyResult('''
-final a = <int,int>{};
-''');
- }
-
- test_replaceWithLiteral_map_withoutGeneric() async {
- String src = '''
-final a = /*LINT*/new Map();
-''';
- await findLint(src, LintNames.prefer_collection_literals);
-
- await applyFix(DartFixKind.REPLACE_WITH_LITERAL);
-
- verifyResult('''
-final a = {};
-''');
- }
-
void verifyResult(String expectedResult) {
expect(resultCode, expectedResult);
}
« no previous file with comments | « pkg/analysis_server/test/mock_sdk.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698