| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 barback.test.package_graph.source_test; | 5 library barback.test.package_graph.source_test; |
| 6 | 6 |
| 7 import 'package:barback/src/utils.dart'; | 7 import 'package:barback/src/utils.dart'; |
| 8 import 'package:scheduled_test/scheduled_test.dart'; | 8 import 'package:scheduled_test/scheduled_test.dart'; |
| 9 | 9 |
| 10 import '../utils.dart'; | 10 import '../utils.dart'; |
| (...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 }, {"app": [[rewrite1, rewrite2, rewrite3]]}); | 261 }, {"app": [[rewrite1, rewrite2, rewrite3]]}); |
| 262 | 262 |
| 263 // Make rewrite3 the most-recently-completed transformer from the first run. | 263 // Make rewrite3 the most-recently-completed transformer from the first run. |
| 264 rewrite2.pauseApply(); | 264 rewrite2.pauseApply(); |
| 265 rewrite3.pauseApply(); | 265 rewrite3.pauseApply(); |
| 266 updateSources(["app|foo.one", "app|foo.two", "app|foo.three"]); | 266 updateSources(["app|foo.one", "app|foo.two", "app|foo.three"]); |
| 267 schedule(pumpEventQueue); | 267 schedule(pumpEventQueue); |
| 268 rewrite2.resumeApply(); | 268 rewrite2.resumeApply(); |
| 269 schedule(pumpEventQueue); | 269 schedule(pumpEventQueue); |
| 270 rewrite3.resumeApply(); | 270 rewrite3.resumeApply(); |
| 271 buildShouldFail([isAssetCollisionException("app|foo.out")]); | 271 buildShouldFail([ |
| 272 isAssetCollisionException("app|foo.out"), |
| 273 isAssetCollisionException("app|foo.out") |
| 274 ]); |
| 272 | 275 |
| 273 // Then update rewrite3 in a separate build. rewrite2 should still be the | 276 // Then update rewrite3 in a separate build. rewrite2 should still be the |
| 274 // next version of foo.out in line. | 277 // next version of foo.out in line. |
| 275 // TODO(nweiz): Should this emit a collision error as well? Or should they | 278 // TODO(nweiz): Should this emit a collision error as well? Or should they |
| 276 // only be emitted when a file is added or removed? | 279 // only be emitted when a file is added or removed? |
| 277 updateSources(["app|foo.three"]); | 280 updateSources(["app|foo.three"]); |
| 278 buildShouldSucceed(); | 281 buildShouldSucceed(); |
| 279 | 282 |
| 280 removeSources(["app|foo.one"]); | 283 removeSources(["app|foo.one"]); |
| 281 expectAsset("app|foo.out", "two.out"); | 284 expectAsset("app|foo.out", "two.out"); |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 | 327 |
| 325 updateSources(["app|foo.txt"]); | 328 updateSources(["app|foo.txt"]); |
| 326 expectAsset("app|foo.txt", "foo"); | 329 expectAsset("app|foo.txt", "foo"); |
| 327 buildShouldSucceed(); | 330 buildShouldSucceed(); |
| 328 | 331 |
| 329 updateSources(["app|foo.in"]); | 332 updateSources(["app|foo.in"]); |
| 330 expectAsset("app|foo.txt", "foo"); | 333 expectAsset("app|foo.txt", "foo"); |
| 331 buildShouldFail([isAssetCollisionException("app|foo.txt")]); | 334 buildShouldFail([isAssetCollisionException("app|foo.txt")]); |
| 332 }); | 335 }); |
| 333 } | 336 } |
| OLD | NEW |