| 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/protocol.dart'; | 9 import 'package:analysis_server/src/protocol.dart'; |
| 10 import 'package:analysis_server/src/services/refactoring/refactoring.dart'; | 10 import 'package:analysis_server/src/services/refactoring/refactoring.dart'; |
| 11 import 'package:analyzer/file_system/file_system.dart'; | 11 import 'package:analyzer/file_system/file_system.dart'; |
| 12 import 'package:analyzer/source/package_map_resolver.dart'; | 12 import 'package:analyzer/source/package_map_resolver.dart'; |
| 13 import 'package:analyzer/src/generated/engine.dart'; | 13 import 'package:analyzer/src/generated/engine.dart'; |
| 14 import 'package:analyzer/src/generated/source.dart'; | 14 import 'package:analyzer/src/generated/source.dart'; |
| 15 import 'package:unittest/unittest.dart'; | 15 import 'package:unittest/unittest.dart'; |
| 16 | 16 |
| 17 import '../../abstract_context.dart'; | 17 import '../../abstract_context.dart'; |
| 18 import '../../reflective_tests.dart'; | 18 import '../../reflective_tests.dart'; |
| 19 import 'abstract_refactoring.dart'; | 19 import 'abstract_refactoring.dart'; |
| 20 | 20 |
| 21 | 21 |
| 22 main() { | 22 main() { |
| 23 groupSep = ' | '; | 23 groupSep = ' | '; |
| 24 runReflectiveTests(MoveFileTest); | 24 runReflectiveTests(MoveFileTest); |
| 25 } | 25 } |
| 26 | 26 |
| 27 | 27 |
| 28 @ReflectiveTestCase() | 28 @reflectiveTest |
| 29 class MoveFileTest extends RefactoringTest { | 29 class MoveFileTest extends RefactoringTest { |
| 30 MoveFileRefactoring refactoring; | 30 MoveFileRefactoring refactoring; |
| 31 | 31 |
| 32 test_definingUnit() { | 32 test_definingUnit() { |
| 33 String pathA = '/project/000/1111/a.dart'; | 33 String pathA = '/project/000/1111/a.dart'; |
| 34 String pathB = '/project/000/1111/b.dart'; | 34 String pathB = '/project/000/1111/b.dart'; |
| 35 String pathC = '/project/000/1111/22/c.dart'; | 35 String pathC = '/project/000/1111/22/c.dart'; |
| 36 String pathD = '/project/000/1111/333/d.dart'; | 36 String pathD = '/project/000/1111/333/d.dart'; |
| 37 testFile = '/project/000/1111/test.dart'; | 37 testFile = '/project/000/1111/test.dart'; |
| 38 addSource('/absolute/uri.dart', ''); | 38 addSource('/absolute/uri.dart', ''); |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 break; | 219 break; |
| 220 } | 220 } |
| 221 for (ChangeNotice notice in result.changeNotices) { | 221 for (ChangeNotice notice in result.changeNotices) { |
| 222 if (notice.source.fullName.startsWith('/project/')) { | 222 if (notice.source.fullName.startsWith('/project/')) { |
| 223 index.indexUnit(context, notice.compilationUnit); | 223 index.indexUnit(context, notice.compilationUnit); |
| 224 } | 224 } |
| 225 } | 225 } |
| 226 } | 226 } |
| 227 } | 227 } |
| 228 } | 228 } |
| OLD | NEW |