Refactoring renaming of some tests in move_file_test.dart and sorting of the tests
Change-Id: I14d132c070b866da0a1373fc0f807f868f3024a2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101078
Reviewed-by: Jaime Wren <jwren@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
Auto-Submit: Jaime Wren <jwren@google.com>
diff --git a/pkg/analysis_server/test/services/refactoring/move_file_test.dart b/pkg/analysis_server/test/services/refactoring/move_file_test.dart
index ced6825..6790018 100644
--- a/pkg/analysis_server/test/services/refactoring/move_file_test.dart
+++ b/pkg/analysis_server/test/services/refactoring/move_file_test.dart
@@ -75,25 +75,6 @@
''');
}
- test_file_imported_with_package_uri_up() async {
- var file = newFile('/home/test/lib/222/old_name.dart', content: '');
- addTestSource(r'''
-import 'package:test/222/old_name.dart';
-''');
-
- // Since the file being refactored isn't the test source, we set the
- // testAnalysisResult manually here, the path is referenced through the
- // referenced File object to run on Windows:
- testAnalysisResult = await session.getResolvedUnit(file.path);
-
- _createRefactoring('/home/test/lib/new_name.dart', oldFile: file.path);
- await _assertSuccessfulRefactoring();
-
- assertFileChangeResult(testFile, '''
-import 'package:test/new_name.dart';
-''');
- }
-
test_file_imported_with_package_uri_sideways() async {
var file = newFile('/home/test/lib/111/old_name.dart', content: '');
addTestSource(r'''
@@ -113,7 +94,26 @@
''');
}
- test_file_relative_imported_down() async {
+ test_file_imported_with_package_uri_up() async {
+ var file = newFile('/home/test/lib/222/old_name.dart', content: '');
+ addTestSource(r'''
+import 'package:test/222/old_name.dart';
+''');
+
+ // Since the file being refactored isn't the test source, we set the
+ // testAnalysisResult manually here, the path is referenced through the
+ // referenced File object to run on Windows:
+ testAnalysisResult = await session.getResolvedUnit(file.path);
+
+ _createRefactoring('/home/test/lib/new_name.dart', oldFile: file.path);
+ await _assertSuccessfulRefactoring();
+
+ assertFileChangeResult(testFile, '''
+import 'package:test/new_name.dart';
+''');
+ }
+
+ test_file_imported_with_relative_uri_down() async {
String pathA = convertPath('/home/test/000/1111/a.dart');
testFile = convertPath('/home/test/000/1111/test.dart');
addSource(pathA, '''
@@ -131,7 +131,7 @@
assertNoFileChange(testFile);
}
- test_file_relative_imported_sideways() async {
+ test_file_imported_with_relative_uri_sideways() async {
String pathA = convertPath('/home/test/000/1111/a.dart');
testFile = convertPath('/home/test/000/1111/sub/folder/test.dart');
addSource(pathA, '''
@@ -147,7 +147,7 @@
assertNoFileChange(testFile);
}
- test_file_relative_imported_up() async {
+ test_file_imported_with_relative_uri_up() async {
String pathA = convertPath('/home/test/000/1111/a.dart');
testFile = convertPath('/home/test/000/1111/22/test.dart');
addSource(pathA, '''