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

Unified Diff: pkg/analysis_server/test/edit/sort_members_test.dart

Issue 1938023002: Keep directive annotations while sorting. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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/lib/src/services/correction/sort_members.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/edit/sort_members_test.dart
diff --git a/pkg/analysis_server/test/edit/sort_members_test.dart b/pkg/analysis_server/test/edit/sort_members_test.dart
index a955360b4fa82b011fc6be6578eee6ecae926339..ee801df7b123acc83246fe0ffd72b525f2d033b4 100644
--- a/pkg/analysis_server/test/edit/sort_members_test.dart
+++ b/pkg/analysis_server/test/edit/sort_members_test.dart
@@ -144,6 +144,40 @@ main() {
''');
}
+ test_OK_directives_withAnnotation() async {
+ addTestFile('''
+library lib;
+
+export 'dart:bbb';
+@MyAnnotation(1)
+@MyAnnotation(2)
+import 'dart:bbb';
+@MyAnnotation(3)
+export 'dart:aaa';
+import 'dart:aaa';
+
+class MyAnnotation {
+ const MyAnnotation(_);
+}
+''');
+ return _assertSorted(r'''
+library lib;
+
+import 'dart:aaa';
+@MyAnnotation(1)
+@MyAnnotation(2)
+import 'dart:bbb';
+
+@MyAnnotation(3)
+export 'dart:aaa';
+export 'dart:bbb';
+
+class MyAnnotation {
+ const MyAnnotation(_);
+}
+''');
+ }
+
test_OK_unitMembers_class() async {
addTestFile('''
class C {}
« no previous file with comments | « pkg/analysis_server/lib/src/services/correction/sort_members.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698