OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 library test.services.refactoring.move_files; | 5 library test.services.refactoring.move_files; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 | 8 |
9 import 'package:analysis_server/src/services/refactoring/refactoring.dart'; | 9 import 'package:analysis_server/src/services/refactoring/refactoring.dart'; |
10 import 'package:analyzer/file_system/file_system.dart'; | 10 import 'package:analyzer/file_system/file_system.dart'; |
11 import 'package:analyzer/source/package_map_resolver.dart'; | 11 import 'package:analyzer/source/package_map_resolver.dart'; |
12 import 'package:analyzer/src/generated/engine.dart'; | 12 import 'package:analyzer/src/generated/engine.dart'; |
13 import 'package:analyzer/src/generated/source.dart'; | 13 import 'package:analyzer/src/generated/source.dart'; |
14 import 'package:test_reflective_loader/test_reflective_loader.dart'; | 14 import 'package:test_reflective_loader/test_reflective_loader.dart'; |
15 | 15 |
16 import '../../abstract_context.dart'; | 16 import '../../abstract_context.dart'; |
17 import '../../utils.dart'; | 17 import '../../utils.dart'; |
18 import 'abstract_refactoring.dart'; | 18 import 'abstract_refactoring.dart'; |
19 | 19 |
20 main() { | 20 main() { |
21 initializeTestEnvironment(); | 21 initializeTestEnvironment(); |
22 defineReflectiveTests(MoveFileTest); | 22 defineReflectiveSuite(() { |
| 23 defineReflectiveTests(MoveFileTest); |
| 24 }); |
23 } | 25 } |
24 | 26 |
25 @reflectiveTest | 27 @reflectiveTest |
26 class MoveFileTest extends RefactoringTest { | 28 class MoveFileTest extends RefactoringTest { |
27 MoveFileRefactoring refactoring; | 29 MoveFileRefactoring refactoring; |
28 | 30 |
29 test_file_definingUnit() async { | 31 test_file_definingUnit() async { |
30 String pathA = '/project/000/1111/a.dart'; | 32 String pathA = '/project/000/1111/a.dart'; |
31 String pathB = '/project/000/1111/b.dart'; | 33 String pathB = '/project/000/1111/b.dart'; |
32 String pathC = '/project/000/1111/22/c.dart'; | 34 String pathC = '/project/000/1111/22/c.dart'; |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
290 break; | 292 break; |
291 } | 293 } |
292 for (ChangeNotice notice in result.changeNotices) { | 294 for (ChangeNotice notice in result.changeNotices) { |
293 if (notice.source.fullName.startsWith('/project/')) { | 295 if (notice.source.fullName.startsWith('/project/')) { |
294 index.indexUnit(notice.resolvedDartUnit); | 296 index.indexUnit(notice.resolvedDartUnit); |
295 } | 297 } |
296 } | 298 } |
297 } | 299 } |
298 } | 300 } |
299 } | 301 } |
OLD | NEW |