| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS d.file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS d.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 pub_tests; | 5 library pub_tests; |
| 6 | 6 |
| 7 import 'package:barback/barback.dart'; | 7 import 'package:barback/barback.dart'; |
| 8 import 'package:path/path.dart' as p; | 8 import 'package:path/path.dart' as p; |
| 9 import 'package:pub/src/barback/cycle_exception.dart'; |
| 10 import 'package:pub/src/barback/dependency_computer.dart'; |
| 11 import 'package:pub/src/entrypoint.dart'; |
| 12 import 'package:pub/src/io.dart'; |
| 13 import 'package:pub/src/package.dart'; |
| 14 import 'package:pub/src/package_graph.dart'; |
| 15 import 'package:pub/src/source/path.dart'; |
| 16 import 'package:pub/src/system_cache.dart'; |
| 17 import 'package:pub/src/utils.dart'; |
| 9 import 'package:scheduled_test/scheduled_test.dart'; | 18 import 'package:scheduled_test/scheduled_test.dart'; |
| 10 | 19 |
| 11 import '../../lib/src/barback/cycle_exception.dart'; | |
| 12 import '../../lib/src/barback/dependency_computer.dart'; | |
| 13 import '../../lib/src/entrypoint.dart'; | |
| 14 import '../../lib/src/io.dart'; | |
| 15 import '../../lib/src/package.dart'; | |
| 16 import '../../lib/src/package_graph.dart'; | |
| 17 import '../../lib/src/source/path.dart'; | |
| 18 import '../../lib/src/system_cache.dart'; | |
| 19 import '../../lib/src/utils.dart'; | |
| 20 import '../test_pub.dart'; | 20 import '../test_pub.dart'; |
| 21 | 21 |
| 22 /// Expects that [DependencyComputer.transformersNeededByTransformers] will | 22 /// Expects that [DependencyComputer.transformersNeededByTransformers] will |
| 23 /// return a graph matching [expected] when run on the package graph defined by | 23 /// return a graph matching [expected] when run on the package graph defined by |
| 24 /// packages in the sandbox. | 24 /// packages in the sandbox. |
| 25 void expectDependencies(Map<String, Iterable<String>> expected) { | 25 void expectDependencies(Map<String, Iterable<String>> expected) { |
| 26 expected = mapMap(expected, value: (_, ids) => ids.toSet()); | 26 expected = mapMap(expected, value: (_, ids) => ids.toSet()); |
| 27 | 27 |
| 28 schedule(() { | 28 schedule(() { |
| 29 var computer = new DependencyComputer(_loadPackageGraph()); | 29 var computer = new DependencyComputer(_loadPackageGraph()); |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 | 120 |
| 121 buffer.writeln(""" | 121 buffer.writeln(""" |
| 122 NoOpTransformer extends Transformer { | 122 NoOpTransformer extends Transformer { |
| 123 bool isPrimary(AssetId id) => true; | 123 bool isPrimary(AssetId id) => true; |
| 124 void apply(Transform transform) {} | 124 void apply(Transform transform) {} |
| 125 } | 125 } |
| 126 """); | 126 """); |
| 127 | 127 |
| 128 return buffer.toString(); | 128 return buffer.toString(); |
| 129 } | 129 } |
| OLD | NEW |