| 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 import 'package:barback/barback.dart'; | 5 import 'package:barback/barback.dart'; |
| 6 import 'package:collection/collection.dart'; |
| 6 import 'package:path/path.dart' as p; | 7 import 'package:path/path.dart' as p; |
| 8 import 'package:scheduled_test/scheduled_test.dart'; |
| 9 |
| 7 import 'package:pub/src/barback/cycle_exception.dart'; | 10 import 'package:pub/src/barback/cycle_exception.dart'; |
| 8 import 'package:pub/src/barback/dependency_computer.dart'; | 11 import 'package:pub/src/barback/dependency_computer.dart'; |
| 9 import 'package:pub/src/entrypoint.dart'; | 12 import 'package:pub/src/entrypoint.dart'; |
| 10 import 'package:pub/src/io.dart'; | 13 import 'package:pub/src/io.dart'; |
| 11 import 'package:pub/src/package.dart'; | 14 import 'package:pub/src/package.dart'; |
| 12 import 'package:pub/src/package_graph.dart'; | 15 import 'package:pub/src/package_graph.dart'; |
| 13 import 'package:pub/src/system_cache.dart'; | 16 import 'package:pub/src/system_cache.dart'; |
| 14 import 'package:pub/src/utils.dart'; | 17 import 'package:pub/src/utils.dart'; |
| 15 import 'package:scheduled_test/scheduled_test.dart'; | |
| 16 | 18 |
| 17 import '../test_pub.dart'; | 19 import '../test_pub.dart'; |
| 18 | 20 |
| 19 /// Expects that [DependencyComputer.transformersNeededByTransformers] will | 21 /// Expects that [DependencyComputer.transformersNeededByTransformers] will |
| 20 /// return a graph matching [expected] when run on the package graph defined by | 22 /// return a graph matching [expected] when run on the package graph defined by |
| 21 /// packages in the sandbox. | 23 /// packages in the sandbox. |
| 22 void expectDependencies(Map<String, Iterable<String>> expected) { | 24 void expectDependencies(Map<String, Iterable<String>> expected) { |
| 23 expected = mapMap(expected, value: (_, ids) => ids.toSet()); | 25 expected = mapMap(expected, value: (_, ids) => ids.toSet()); |
| 24 | 26 |
| 25 schedule(() { | 27 schedule(() { |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 | 117 |
| 116 buffer.writeln(""" | 118 buffer.writeln(""" |
| 117 NoOpTransformer extends Transformer { | 119 NoOpTransformer extends Transformer { |
| 118 bool isPrimary(AssetId id) => true; | 120 bool isPrimary(AssetId id) => true; |
| 119 void apply(Transform transform) {} | 121 void apply(Transform transform) {} |
| 120 } | 122 } |
| 121 """); | 123 """); |
| 122 | 124 |
| 123 return buffer.toString(); | 125 return buffer.toString(); |
| 124 } | 126 } |
| OLD | NEW |