| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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.dependencies.import_collector; | 5 library test.services.dependencies.import_collector; |
| 6 | 6 |
| 7 import 'package:analysis_server/src/services/dependencies/reachable_source_colle
ctor.dart'; | 7 import 'package:analysis_server/src/services/dependencies/reachable_source_colle
ctor.dart'; |
| 8 import 'package:analyzer/src/generated/source.dart'; | 8 import 'package:analyzer/src/generated/source.dart'; |
| 9 import 'package:test/test.dart'; | 9 import 'package:test/test.dart'; |
| 10 import 'package:test_reflective_loader/test_reflective_loader.dart'; | 10 import 'package:test_reflective_loader/test_reflective_loader.dart'; |
| 11 | 11 |
| 12 import '../../abstract_context.dart'; | 12 import '../../abstract_context.dart'; |
| 13 | 13 |
| 14 main() { | 14 main() { |
| 15 defineReflectiveSuite(() { | 15 defineReflectiveSuite(() { |
| 16 defineReflectiveTests(ReachableSourceCollectorTest); | 16 defineReflectiveTests(ReachableSourceCollectorTest); |
| 17 }); | 17 }); |
| 18 } | 18 } |
| 19 | 19 |
| 20 @reflectiveTest | 20 @reflectiveTest |
| 21 class ReachableSourceCollectorTest extends AbstractContextTest { | 21 class ReachableSourceCollectorTest extends AbstractContextTest { |
| 22 @override |
| 23 bool get enableNewAnalysisDriver => false; |
| 24 |
| 22 Map<String, List<String>> importsFor(Source source) => | 25 Map<String, List<String>> importsFor(Source source) => |
| 23 new ReachableSourceCollector(source, context).collectSources(); | 26 new ReachableSourceCollector(source, context).collectSources(); |
| 24 | 27 |
| 25 test_null_context() { | 28 test_null_context() { |
| 26 Source lib = addSource('/lib.dart', ''); | 29 Source lib = addSource('/lib.dart', ''); |
| 27 expect(() => new ReachableSourceCollector(lib, null), | 30 expect(() => new ReachableSourceCollector(lib, null), |
| 28 throwsA(new isInstanceOf<ArgumentError>())); | 31 throwsA(new isInstanceOf<ArgumentError>())); |
| 29 } | 32 } |
| 30 | 33 |
| 31 test_null_source() { | 34 test_null_source() { |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 unorderedEquals([ | 74 unorderedEquals([ |
| 72 'dart:_internal', | 75 'dart:_internal', |
| 73 'dart:async', | 76 'dart:async', |
| 74 'dart:core', | 77 'dart:core', |
| 75 'dart:math', | 78 'dart:math', |
| 76 'file:///lib3.dart', | 79 'file:///lib3.dart', |
| 77 'file:///lib4.dart' | 80 'file:///lib4.dart' |
| 78 ])); | 81 ])); |
| 79 } | 82 } |
| 80 } | 83 } |
| OLD | NEW |