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

Unified Diff: third_party/pkg/barback-0.13.0/test/package_graph/transform/cross_package_test.dart

Issue 291843011: Run pub tests against older versions of barback. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: code review Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: third_party/pkg/barback-0.13.0/test/package_graph/transform/cross_package_test.dart
diff --git a/pkg/barback/test/package_graph/transform/cross_package_test.dart b/third_party/pkg/barback-0.13.0/test/package_graph/transform/cross_package_test.dart
similarity index 85%
copy from pkg/barback/test/package_graph/transform/cross_package_test.dart
copy to third_party/pkg/barback-0.13.0/test/package_graph/transform/cross_package_test.dart
index b499604680d968d767eb3ad36e6d30af09b0a8c6..6aaf58515536c246cdc35d4823188a2fd478a3d7 100644
--- a/pkg/barback/test/package_graph/transform/cross_package_test.dart
+++ b/third_party/pkg/barback-0.13.0/test/package_graph/transform/cross_package_test.dart
@@ -190,4 +190,37 @@ main() {
expectAsset("pkg1|a.out", "b");
buildShouldSucceed();
});
+
+ test("re-runs if the primary input is invalidated before accessing", () {
+ var transformer1 = new RewriteTransformer("txt", "mid");
+ var transformer2 = new RewriteTransformer("mid", "out");
+
+ initGraph([
+ "app|foo.txt"
+ ], {"app": [
+ [transformer1],
+ [transformer2]
+ ]});
+
+ transformer2.pausePrimaryInput();
+ updateSources(["app|foo.txt"]);
+
+ // Wait long enough to ensure that transformer1 has completed and
+ // transformer2 has started.
+ schedule(pumpEventQueue);
+
+ // Update the source again so that transformer1 invalidates the primary
+ // input of transformer2.
+ transformer1.pauseApply();
+ updateSources(["app|foo.txt"]);
+
+ transformer2.resumePrimaryInput();
+ transformer1.resumeApply();
+
+ expectAsset("app|foo.out", "foo.mid.out");
+ buildShouldSucceed();
+
+ expect(transformer1.numRuns, completion(equals(2)));
+ expect(transformer2.numRuns, completion(equals(2)));
+ });
}

Powered by Google App Engine
This is Rietveld 408576698