mirror of
https://github.com/dart-lang/sdk
synced 2024-10-04 20:29:39 +00:00
Issue 54893: Add a test for sorting imports that span 2 lines.
Change-Id: I9ed0a1b754d3f201d760813dafa4c1049b7124f1 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/360280 Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Commit-Queue: Keerti Parthasarathy <keertip@google.com>
This commit is contained in:
parent
3b23ffe53f
commit
b6137f7cee
|
@ -93,6 +93,52 @@ void f(Stream<String> args) {
|
|||
A.m();
|
||||
B.m();
|
||||
}
|
||||
''');
|
||||
}
|
||||
|
||||
Future<void> test_organizePathImports_thatSpanTwoLines() async {
|
||||
newFile('$testPackageLibPath/a.dart', '''
|
||||
class A {
|
||||
static void m() {}
|
||||
}
|
||||
''');
|
||||
newFile('$testPackageLibPath/a/b.dart', '''
|
||||
class B {
|
||||
static void m() {}
|
||||
}
|
||||
''');
|
||||
newFile('$testPackageLibPath/a/c.dart', '''
|
||||
class C {
|
||||
static void m() {}
|
||||
}
|
||||
''');
|
||||
|
||||
await resolveTestCode('''
|
||||
import 'dart:async';
|
||||
import 'a/b.dart';
|
||||
import 'a.dart'
|
||||
show A;
|
||||
import 'a/c.dart';
|
||||
|
||||
void f(Stream<String> args) {
|
||||
A.m();
|
||||
B.m();
|
||||
C.m();
|
||||
}
|
||||
''');
|
||||
await assertHasFix('''
|
||||
import 'dart:async';
|
||||
|
||||
import 'a.dart'
|
||||
show A;
|
||||
import 'a/b.dart';
|
||||
import 'a/c.dart';
|
||||
|
||||
void f(Stream<String> args) {
|
||||
A.m();
|
||||
B.m();
|
||||
C.m();
|
||||
}
|
||||
''');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue