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

Unified Diff: pkg/barback/test/package_graph/transform_test.dart

Issue 23311006: Add the ability to dynamically modify transforms to barback. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Code review changes. Created 7 years, 4 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
« no previous file with comments | « pkg/barback/test/package_graph/add_remove_transform_test.dart ('k') | pkg/barback/test/utils.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/barback/test/package_graph/transform_test.dart
diff --git a/pkg/barback/test/package_graph/transform_test.dart b/pkg/barback/test/package_graph/transform_test.dart
index ba14d16eb58f9a1dc85241e9af2691291d50fd6c..8c108b3f24e4f69e6d88c4836ea3ed50ec12b4fa 100644
--- a/pkg/barback/test/package_graph/transform_test.dart
+++ b/pkg/barback/test/package_graph/transform_test.dart
@@ -1055,5 +1055,45 @@ main() {
expectNoAsset("pkg1|c.done");
buildShouldSucceed();
});
+
+ test("sees a transformer that's newly applied to a cross-package "
+ "dependency", () {
+ initGraph({
+ "pkg1|a.txt": "pkg2|a.inc",
+ "pkg2|a.inc": "a"
+ }, {
+ "pkg1": [[new ManyToOneTransformer("txt")]],
+ "pkg2": [[new CheckContentTransformer("b", " transformed")]]
+ });
+
+ updateSources(["pkg1|a.txt", "pkg2|a.inc"]);
+ expectAsset("pkg1|a.out", "a");
+ buildShouldSucceed();
+
+ modifyAsset("pkg2|a.inc", "b");
+ updateSources(["pkg2|a.inc"]);
+ expectAsset("pkg1|a.out", "b transformed");
+ buildShouldSucceed();
+ });
+
+ test("doesn't see a transformer that's newly not applied to a "
+ "cross-package dependency", () {
+ initGraph({
+ "pkg1|a.txt": "pkg2|a.inc",
+ "pkg2|a.inc": "a"
+ }, {
+ "pkg1": [[new ManyToOneTransformer("txt")]],
+ "pkg2": [[new CheckContentTransformer("a", " transformed")]]
+ });
+
+ updateSources(["pkg1|a.txt", "pkg2|a.inc"]);
+ expectAsset("pkg1|a.out", "a transformed");
+ buildShouldSucceed();
+
+ modifyAsset("pkg2|a.inc", "b");
+ updateSources(["pkg2|a.inc"]);
+ expectAsset("pkg1|a.out", "b");
+ buildShouldSucceed();
+ });
});
}
« no previous file with comments | « pkg/barback/test/package_graph/add_remove_transform_test.dart ('k') | pkg/barback/test/utils.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698