Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(89)

Side by Side Diff: pkg/barback/test/package_graph/transform/concurrency_test.dart

Issue 189263002: Make Phase.getInput in barback play nicely with the push model. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 /// This library contains tests for transformer behavior that relates to actions 5 /// This library contains tests for transformer behavior that relates to actions
6 /// happening concurrently or other complex asynchronous timing behavior. 6 /// happening concurrently or other complex asynchronous timing behavior.
7 library barback.test.package_graph.transform.concurrency_test; 7 library barback.test.package_graph.transform.concurrency_test;
8 8
9 import 'package:barback/src/utils.dart'; 9 import 'package:barback/src/utils.dart';
10 import 'package:scheduled_test/scheduled_test.dart'; 10 import 'package:scheduled_test/scheduled_test.dart';
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 removeSources(["app|foo.txt"]); 463 removeSources(["app|foo.txt"]);
464 464
465 // Make sure the removal is processed completely before we restart rewrite2. 465 // Make sure the removal is processed completely before we restart rewrite2.
466 schedule(pumpEventQueue); 466 schedule(pumpEventQueue);
467 rewrite1.resumeApply(); 467 rewrite1.resumeApply();
468 468
469 buildShouldSucceed(); 469 buildShouldSucceed();
470 expectNoAsset("app|foo.out1"); 470 expectNoAsset("app|foo.out1");
471 expectNoAsset("app|foo.out2"); 471 expectNoAsset("app|foo.out2");
472 }); 472 });
473
474 test("a transformer in a later phase gets a slow secondary input from an "
475 "earlier phase", () {
476 var rewrite = new RewriteTransformer("in", "in");
477 initGraph({
478 "app|foo.in": "foo",
479 "app|bar.txt": "foo.in"
480 }, {"app": [
481 [rewrite],
482 [new ManyToOneTransformer("txt")]
483 ]});
484
485 rewrite.pauseApply();
486 updateSources(["app|foo.in", "app|bar.txt"]);
487 expectAssetDoesNotComplete("app|bar.out");
488
489 rewrite.resumeApply();
490 expectAsset("app|bar.out", "foo.in");
491 buildShouldSucceed();
492 });
473 } 493 }
OLDNEW
« pkg/barback/lib/src/phase.dart ('K') | « pkg/barback/lib/src/transform_node.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698