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

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

Issue 18178021: Split AssetGraph.results into two streams. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 5 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
Index: pkg/barback/test/asset_graph/errors_test.dart
diff --git a/pkg/barback/test/asset_graph/errors_test.dart b/pkg/barback/test/asset_graph/errors_test.dart
index 39e07c79169ea076774fa3e82df6247b05b9d3b8..75e16bf8f412d00caab9853e752b7000b1da6494 100644
--- a/pkg/barback/test/asset_graph/errors_test.dart
+++ b/pkg/barback/test/asset_graph/errors_test.dart
@@ -24,7 +24,7 @@ main() {
]);
updateSources(["app|foo.a"]);
- expectCollision("app|foo.b");
+ buildShouldFail([isAssetCollisionException("app|foo.b")]);
});
test("does not report asset not found errors in results", () {
@@ -38,10 +38,7 @@ main() {
initGraph();
updateSources(["app|unknown.txt"]);
- buildShouldFail((error) {
- expect(error, new isInstanceOf<AssetNotFoundException>());
- expect(error.id, equals(new AssetId.parse("app|unknown.txt")));
- });
+ buildShouldFail([isAssetNotFoundException("app|unknown.txt")]);
});
test("reports missing input errors in results", () {
@@ -49,10 +46,7 @@ main() {
[new ManyToOneTransformer("txt")]
]);
- buildShouldFail((error) {
- expect(error, new isInstanceOf<MissingInputException>());
- expect(error.id, equals(new AssetId.parse("app|a.inc")));
- });
+ buildShouldFail([isMissingInputException("app|a.inc")]);
updateSources(["app|a.txt"]);
@@ -77,10 +71,7 @@ main() {
removeSources(["app|b.inc"]);
});
- buildShouldFail((error) {
- expect(error, new isInstanceOf<MissingInputException>());
- expect(error.id, equals(new AssetId.parse("app|b.inc")));
- });
+ buildShouldFail([isMissingInputException("app|b.inc")]);
expectNoAsset("app|a.out");
});
@@ -95,9 +86,7 @@ main() {
expectNoAsset("app|foo.out");
- buildShouldFail((error) {
- expect(error, equals(BadTransformer.ERROR));
- });
+ buildShouldFail([equals(BadTransformer.ERROR)]);
});
// TODO(rnystrom): Is this the behavior we expect? If a transformer fails
@@ -123,9 +112,7 @@ main() {
// Note: No asset requests here.
- buildShouldFail((error) {
- expect(error, equals(BadTransformer.ERROR));
- });
+ buildShouldFail([equals(BadTransformer.ERROR)]);
});
test("discards outputs from failed transforms", () {

Powered by Google App Engine
This is Rietveld 408576698