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

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

Issue 199443003: Asset load failures in Barback should produce AssetNotFoundExceptions. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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/catch_asset_not_found.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..fed8ea54514c8d8027403897a74a247c485ca37f 100644
--- a/pkg/barback/test/package_graph/errors_test.dart
+++ b/pkg/barback/test/package_graph/errors_test.dart
@@ -146,10 +146,20 @@ main() {
});
test("an asset isn't passed through a transformer with an error", () {
- initGraph(["app|foo.txt",], {"app": [[new BadTransformer([])]]});
+ initGraph(["app|foo.txt"], {"app": [[new BadTransformer([])]]});
updateSources(["app|foo.txt"]);
expectNoAsset("app|foo.txt");
buildShouldFail([isTransformerException(equals(BadTransformer.ERROR))]);
});
+
+ test("a transformer can catch an error loading a secondary input", () {
+ initGraph(["app|foo.txt"], {"app": [
+ [new CatchAssetNotFoundTransformer(".txt", "app|nothing")]
+ ]});
+
+ updateSources(["app|foo.txt"]);
+ expectAsset("app|foo.txt", "failed to load app|nothing");
+ buildShouldSucceed();
+ });
}
« no previous file with comments | « pkg/barback/lib/src/transform_node.dart ('k') | pkg/barback/test/transformer/catch_asset_not_found.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698