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

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

Issue 196473016: Consider errors logged by a transformer equivalent to thrown errors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: code review 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/barback/lib/src/transform_node.dart ('k') | pkg/barback/test/transformer/bad_log.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/barback/test/package_graph/errors_test.dart
diff --git a/pkg/barback/test/package_graph/errors_test.dart b/pkg/barback/test/package_graph/errors_test.dart
index d1e8ea3726f579dfff1e24bfce519b9650eed7e7..8cc134be2111c1fdef12f8777a57ed722d973a53 100644
--- a/pkg/barback/test/package_graph/errors_test.dart
+++ b/pkg/barback/test/package_graph/errors_test.dart
@@ -152,4 +152,18 @@ main() {
expectNoAsset("app|foo.txt");
buildShouldFail([isTransformerException(equals(BadTransformer.ERROR))]);
});
+
+ test("a transformer that logs errors shouldn't produce output", () {
+ initGraph(["app|foo.txt"], {"app": [
+ [new BadLogTransformer(["app|out.txt"])]
+ ]});
+
+ updateSources(["app|foo.txt"]);
+ expectNoAsset("app|foo.txt");
+ expectNoAsset("app|out.txt");
+ buildShouldFail([
+ isTransformerException(equals("first error")),
+ isTransformerException(equals("second error"))
+ ]);
+ });
}
« no previous file with comments | « pkg/barback/lib/src/transform_node.dart ('k') | pkg/barback/test/transformer/bad_log.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698