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

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

Issue 22961002: Add more metadata to non-programmatic barback exceptions. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Small fix 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/lib/src/utils.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/errors_test.dart
diff --git a/pkg/barback/test/package_graph/errors_test.dart b/pkg/barback/test/package_graph/errors_test.dart
index 885c9f3cb92e87e1c862e694b6e60c6792ce9510..46ff28996590ebfd379cbb39928f403685f4b96b 100644
--- a/pkg/barback/test/package_graph/errors_test.dart
+++ b/pkg/barback/test/package_graph/errors_test.dart
@@ -62,7 +62,10 @@ main() {
initGraph(["app|known.txt"]);
updateSources(["app|unknown.txt"]);
- buildShouldFail([isAssetNotFoundException("app|unknown.txt")]);
+ buildShouldFail([
+ isAssetLoadException("app|unknown.txt",
+ isAssetNotFoundException("app|unknown.txt"))
+ ]);
});
test("reports missing input errors in results", () {
@@ -82,7 +85,7 @@ main() {
});
updateSources(["app|foo.txt"]);
- buildShouldFail([isInvalidOutputException("app", "wrong|foo.txt")]);
+ buildShouldFail([isInvalidOutputException("wrong|foo.txt")]);
});
test("fails if a non-primary input is removed", () {
@@ -111,7 +114,7 @@ main() {
updateSources(["app|foo.txt"]);
expectNoAsset("app|foo.out");
- buildShouldFail([equals(BadTransformer.ERROR)]);
+ buildShouldFail([isTransformerException(equals(BadTransformer.ERROR))]);
});
test("doesn't yield a source if a transform fails on it", () {
@@ -128,7 +131,7 @@ main() {
updateSources(["app|foo.txt"]);
// Note: No asset requests here.
- buildShouldFail([equals(BadTransformer.ERROR)]);
+ buildShouldFail([isTransformerException(equals(BadTransformer.ERROR))]);
});
test("discards outputs from failed transforms", () {
@@ -146,7 +149,7 @@ main() {
updateSources(["pkg1|foo.txt", "pkg2|foo.txt"]);
expectAsset("pkg2|foo.txt", "foo");
- buildShouldFail([equals(BadTransformer.ERROR)]);
+ buildShouldFail([isTransformerException(equals(BadTransformer.ERROR))]);
});
test("emits multiple failures if multiple packages fail", () {
@@ -157,8 +160,8 @@ main() {
updateSources(["pkg1|foo.txt", "pkg2|foo.txt"]);
buildShouldFail([
- equals(BadTransformer.ERROR),
- equals(BadTransformer.ERROR)
+ isTransformerException(equals(BadTransformer.ERROR)),
+ isTransformerException(equals(BadTransformer.ERROR))
]);
});
@@ -168,7 +171,9 @@ main() {
setAssetError("app|foo.txt");
updateSources(["app|foo.txt"]);
expectNoAsset("app|foo.txt");
- buildShouldFail([isMockLoadException("app|foo.txt")]);
+ buildShouldFail([
+ isAssetLoadException("app|foo.txt", isMockLoadException("app|foo.txt"))
+ ]);
});
test("a collision returns the first-produced output", () {
« no previous file with comments | « pkg/barback/lib/src/utils.dart ('k') | pkg/barback/test/utils.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698