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

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

Issue 255283003: Don't assume that a transform node is consistently deferred or not. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 8 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/lib/src/transform_node.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/barback/test/package_graph/declaring_transformer_test.dart
diff --git a/pkg/barback/test/package_graph/declaring_transformer_test.dart b/pkg/barback/test/package_graph/declaring_transformer_test.dart
index 638aeb304b50e142c9d9db11e0e66cf515554e66..dc180aee2151009b4dd7800b556320f97686b714 100644
--- a/pkg/barback/test/package_graph/declaring_transformer_test.dart
+++ b/pkg/barback/test/package_graph/declaring_transformer_test.dart
@@ -220,38 +220,36 @@ main() {
expect(declaring.numRuns, completion(equals(2)));
});
- // TODO(nweiz): Re-enable these when barback is capable of dealing with a
- // changing [TransformNode.deferred] value.
- // group("with an error in declareOutputs", () {
- // test("still runs apply", () {
- // initGraph(["app|foo.txt"], {"app": [[
- // new DeclaringBadTransformer("app|out.txt",
- // declareError: true, applyError: false)
- // ]]});
- //
- // updateSources(["app|foo.txt"]);
- // expectAsset("app|out.txt", "bad out");
- // expectAsset("app|foo.txt", "foo");
- // buildShouldFail([isTransformerException(BadTransformer.ERROR)]);
- // });
- //
- // test("waits for apply to complete before passing through the input even if "
- // "consumePrimary was called", () {
- // var transformer = new DeclaringBadTransformer("app|out.txt",
- // declareError: true, applyError: false)..consumePrimary = true;
- // initGraph(["app|foo.txt"], {"app": [[transformer]]});
- //
- // transformer.pauseApply();
- // updateSources(["app|foo.txt"]);
- // expectAssetDoesNotComplete("app|out.txt");
- // expectAssetDoesNotComplete("app|foo.txt");
- //
- // transformer.resumeApply();
- // expectAsset("app|out.txt", "bad out");
- // expectNoAsset("app|foo.txt");
- // buildShouldFail([isTransformerException(BadTransformer.ERROR)]);
- // });
- // });
+ group("with an error in declareOutputs", () {
+ test("still runs apply", () {
Bob Nystrom 2014/04/29 23:46:22 This seems like a perverse edge case to add comple
nweiz 2014/04/30 00:36:57 Why not apply it? As far as we know, it'll still f
Bob Nystrom 2014/04/30 19:21:24 Maybe, but it's also likely to be broken if it cou
+ initGraph(["app|foo.txt"], {"app": [[
+ new DeclaringBadTransformer("app|out.txt",
+ declareError: true, applyError: false)
+ ]]});
+
+ updateSources(["app|foo.txt"]);
+ expectAsset("app|out.txt", "bad out");
+ expectAsset("app|foo.txt", "foo");
+ buildShouldFail([isTransformerException(BadTransformer.ERROR)]);
+ });
+
+ test("waits for apply to complete before passing through the input even if "
+ "consumePrimary was called", () {
+ var transformer = new DeclaringBadTransformer("app|out.txt",
+ declareError: true, applyError: false)..consumePrimary = true;
+ initGraph(["app|foo.txt"], {"app": [[transformer]]});
+
+ transformer.pauseApply();
+ updateSources(["app|foo.txt"]);
+ expectAssetDoesNotComplete("app|out.txt");
+ expectAssetDoesNotComplete("app|foo.txt");
+
+ transformer.resumeApply();
+ expectAsset("app|out.txt", "bad out");
+ expectNoAsset("app|foo.txt");
+ buildShouldFail([isTransformerException(BadTransformer.ERROR)]);
+ });
+ });
test("with an error in apply still passes through the input", () {
initGraph(["app|foo.txt"], {"app": [[
« no previous file with comments | « 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