Index: packages/barback/test/package_graph/collisions_test.dart |
diff --git a/packages/barback/test/package_graph/collisions_test.dart b/packages/barback/test/package_graph/collisions_test.dart |
index 91d00a0dce5d305c56703e519cee8ecece5a8adf..e7c794d71dfa2597a4c7601a18c1c3e5708ff9c1 100644 |
--- a/packages/barback/test/package_graph/collisions_test.dart |
+++ b/packages/barback/test/package_graph/collisions_test.dart |
@@ -13,25 +13,29 @@ main() { |
initConfig(); |
test("errors if two transformers output the same file", () { |
- initGraph(["app|foo.a"], {"app": [ |
- [ |
- new RewriteTransformer("a", "b"), |
- new RewriteTransformer("a", "b") |
+ initGraph([ |
+ "app|foo.a" |
+ ], { |
+ "app": [ |
+ [new RewriteTransformer("a", "b"), new RewriteTransformer("a", "b")] |
] |
- ]}); |
+ }); |
updateSources(["app|foo.a"]); |
buildShouldFail([isAssetCollisionException("app|foo.b")]); |
}); |
- test("errors if a new transformer outputs the same file as an old " |
+ test( |
+ "errors if a new transformer outputs the same file as an old " |
"transformer", () { |
- initGraph(["app|foo.a", "app|foo.b"], {"app": [ |
- [ |
- new RewriteTransformer("a", "c"), |
- new RewriteTransformer("b", "c") |
+ initGraph([ |
+ "app|foo.a", |
+ "app|foo.b" |
+ ], { |
+ "app": [ |
+ [new RewriteTransformer("a", "c"), new RewriteTransformer("b", "c")] |
] |
- ]}); |
+ }); |
updateSources(["app|foo.a"]); |
expectAsset("app|foo.c", "foo.c"); |
buildShouldSucceed(); |
@@ -46,7 +50,11 @@ main() { |
initGraph({ |
"app|foo.one": "one", |
"app|foo.two": "two" |
- }, {"app": [[rewrite1, rewrite2]]}); |
+ }, { |
+ "app": [ |
+ [rewrite1, rewrite2] |
+ ] |
+ }); |
rewrite1.pauseApply(); |
updateSources(["app|foo.one", "app|foo.two"]); |
@@ -71,12 +79,14 @@ main() { |
initGraph({ |
"app|foo.one": "one", |
"app|foo.two": "two" |
- }, {"app": [ |
- [ |
- new RewriteTransformer("one", "out"), |
- new RewriteTransformer("two", "out") |
+ }, { |
+ "app": [ |
+ [ |
+ new RewriteTransformer("one", "out"), |
+ new RewriteTransformer("two", "out") |
+ ] |
] |
- ]}); |
+ }); |
updateSources(["app|foo.one"]); |
expectAsset("app|foo.out", "one.out"); |
@@ -95,13 +105,15 @@ main() { |
initGraph({ |
"app|foo.one": "one", |
"app|foo.two": "two" |
- }, {"app": [ |
- [ |
- new RewriteTransformer("one", "mid"), |
- new RewriteTransformer("two", "mid") |
- ], |
- [new RewriteTransformer("mid", "out")] |
- ]}); |
+ }, { |
+ "app": [ |
+ [ |
+ new RewriteTransformer("one", "mid"), |
+ new RewriteTransformer("two", "mid") |
+ ], |
+ [new RewriteTransformer("mid", "out")] |
+ ] |
+ }); |
updateSources(["app|foo.one"]); |
expectAsset("app|foo.out", "one.mid.out"); |
@@ -116,7 +128,8 @@ main() { |
buildShouldSucceed(); |
}); |
- test("a collision that is partially resolved returns the second completed " |
+ test( |
+ "a collision that is partially resolved returns the second completed " |
"output", () { |
var rewrite1 = new RewriteTransformer("one", "out"); |
var rewrite2 = new RewriteTransformer("two", "out"); |
@@ -125,7 +138,11 @@ main() { |
"app|foo.one": "one", |
"app|foo.two": "two", |
"app|foo.three": "three" |
- }, {"app": [[rewrite1, rewrite2, rewrite3]]}); |
+ }, { |
+ "app": [ |
+ [rewrite1, rewrite2, rewrite3] |
+ ] |
+ }); |
// Make rewrite3 the most-recently-completed transformer from the first run. |
rewrite2.pauseApply(); |
@@ -157,9 +174,11 @@ main() { |
initGraph([ |
"app|foo.txt", |
"app|foo.in" |
- ], {"app": [ |
- [new RewriteTransformer("in", "txt")] |
- ]}); |
+ ], { |
+ "app": [ |
+ [new RewriteTransformer("in", "txt")] |
+ ] |
+ }); |
updateSources(["app|foo.txt", "app|foo.in"]); |
expectAsset("app|foo.txt", "foo"); |
@@ -170,9 +189,11 @@ main() { |
initGraph([ |
"app|foo.txt", |
"app|foo.in" |
- ], {"app": [ |
- [new RewriteTransformer("in", "txt")] |
- ]}); |
+ ], { |
+ "app": [ |
+ [new RewriteTransformer("in", "txt")] |
+ ] |
+ }); |
updateSources(["app|foo.in"]); |
expectAsset("app|foo.txt", "foo.txt"); |
@@ -183,14 +204,17 @@ main() { |
buildShouldFail([isAssetCollisionException("app|foo.txt")]); |
}); |
- test("a new transform output that collides with a pass-through asset returns " |
+ test( |
+ "a new transform output that collides with a pass-through asset returns " |
"the pass-through asset", () { |
initGraph([ |
"app|foo.txt", |
"app|foo.in" |
- ], {"app": [ |
- [new RewriteTransformer("in", "txt")] |
- ]}); |
+ ], { |
+ "app": [ |
+ [new RewriteTransformer("in", "txt")] |
+ ] |
+ }); |
updateSources(["app|foo.txt"]); |
expectAsset("app|foo.txt", "foo"); |