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

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

Issue 1277983002: Remove also duplicate imports. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 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/lib/src/services/correction/organize_directives.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/organize_directives_test.dart
diff --git a/pkg/analysis_server/test/services/correction/organize_directives_test.dart b/pkg/analysis_server/test/services/correction/organize_directives_test.dart
index cc6c55b405d54d79a50c138f49cc9e1c23e68f96..6c817b588bd05377cbb9023d4828de882a2ec660 100644
--- a/pkg/analysis_server/test/services/correction/organize_directives_test.dart
+++ b/pkg/analysis_server/test/services/correction/organize_directives_test.dart
@@ -22,6 +22,26 @@ main() {
class OrganizeDirectivesTest extends AbstractSingleUnitTest {
List<AnalysisError> testErrors;
+ void test_remove_duplicateImports() {
+ _computeUnitAndErrors(r'''
+import 'dart:async';
+import 'dart:async';
+
+main() {
+ Future f;
+}''');
+ // validate change
+ _assertOrganize(
+ r'''
+import 'dart:async';
+
+main() {
+ Future f;
+}''',
+ removeUnresolved: true,
+ removeUnused: true);
+ }
+
void test_remove_unresolvedDirectives() {
addSource('/existing_part1.dart', 'part of lib;');
addSource('/existing_part2.dart', 'part of lib;');
« no previous file with comments | « pkg/analysis_server/lib/src/services/correction/organize_directives.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698