File tree Expand file tree Collapse file tree 1 file changed +46
-0
lines changed
pkg/analysis_server/test/src/services/correction/fix Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Original file line number Diff line number Diff line change @@ -93,6 +93,52 @@ void f(Stream<String> args) {
93
93
A.m();
94
94
B.m();
95
95
}
96
+ ''' );
97
+ }
98
+
99
+ Future <void > test_organizePathImports_thatSpanTwoLines () async {
100
+ newFile ('$testPackageLibPath /a.dart' , '''
101
+ class A {
102
+ static void m() {}
103
+ }
104
+ ''' );
105
+ newFile ('$testPackageLibPath /a/b.dart' , '''
106
+ class B {
107
+ static void m() {}
108
+ }
109
+ ''' );
110
+ newFile ('$testPackageLibPath /a/c.dart' , '''
111
+ class C {
112
+ static void m() {}
113
+ }
114
+ ''' );
115
+
116
+ await resolveTestCode ('''
117
+ import 'dart:async';
118
+ import 'a/b.dart';
119
+ import 'a.dart'
120
+ show A;
121
+ import 'a/c.dart';
122
+
123
+ void f(Stream<String> args) {
124
+ A.m();
125
+ B.m();
126
+ C.m();
127
+ }
128
+ ''' );
129
+ await assertHasFix ('''
130
+ import 'dart:async';
131
+
132
+ import 'a.dart'
133
+ show A;
134
+ import 'a/b.dart';
135
+ import 'a/c.dart';
136
+
137
+ void f(Stream<String> args) {
138
+ A.m();
139
+ B.m();
140
+ C.m();
141
+ }
96
142
''' );
97
143
}
98
144
}
You can’t perform that action at this time.
0 commit comments