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

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

Issue 961443004: Issue 21978. Put function 'main' first when sorting members. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 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/services/correction/sort_members_test.dart
diff --git a/pkg/analysis_server/test/services/correction/sort_members_test.dart b/pkg/analysis_server/test/services/correction/sort_members_test.dart
index 70eb57055cc12b4f2712b9e1a04e63cd44189f7b..c9c315d53dcf01ed52170c1ddc5e2bc5b2ede1f1 100644
--- a/pkg/analysis_server/test/services/correction/sort_members_test.dart
+++ b/pkg/analysis_server/test/services/correction/sort_members_test.dart
@@ -483,7 +483,7 @@ typedef FC();
import 'dart:a';
import 'package:b';
-main() {
+foo() {
}
f() => null;
@@ -496,11 +496,31 @@ import 'package:b';
f() => null;
-main() {
+foo() {
}
''');
}
+ void test_unitMembers_mainFirst() {
+ _parseTestUnit(r'''
+class C {}
+aaa() {}
+get bbb() {}
+class A {}
+main() {}
+class B {}
+''');
+ // validate change
+ _assertSort(r'''
+main() {}
+get bbb() {}
+aaa() {}
+class A {}
+class B {}
+class C {}
+''');
+ }
+
void test_unitMembers_mix() {
_parseTestUnit(r'''
_mmm() {}
« 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