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

Side by Side Diff: pkg/barback/test/package_graph/errors_test.dart

Issue 180473003: Barback transforms now pass through the primary input by default. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: code reivew 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library barback.test.package_graph.source_test; 5 library barback.test.package_graph.source_test;
6 6
7 import 'package:barback/src/utils.dart'; 7 import 'package:barback/src/utils.dart';
8 import 'package:scheduled_test/scheduled_test.dart'; 8 import 'package:scheduled_test/scheduled_test.dart';
9 9
10 import '../utils.dart'; 10 import '../utils.dart';
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 test("catches transformer exceptions and reports them", () { 107 test("catches transformer exceptions and reports them", () {
108 initGraph(["app|foo.txt"], {"app": [ 108 initGraph(["app|foo.txt"], {"app": [
109 [new BadTransformer(["app|foo.out"])] 109 [new BadTransformer(["app|foo.out"])]
110 ]}); 110 ]});
111 111
112 updateSources(["app|foo.txt"]); 112 updateSources(["app|foo.txt"]);
113 expectNoAsset("app|foo.out"); 113 expectNoAsset("app|foo.out");
114 buildShouldFail([isTransformerException(equals(BadTransformer.ERROR))]); 114 buildShouldFail([isTransformerException(equals(BadTransformer.ERROR))]);
115 }); 115 });
116 116
117 test("doesn't yield a source if a transform fails on it", () {
118 initGraph(["app|foo.txt"], {"app": [
119 [new BadTransformer(["app|foo.txt"])]
120 ]});
121
122 updateSources(["app|foo.txt"]);
123 expectNoAsset("app|foo.txt");
124 });
125
126 test("catches errors even if nothing is waiting for process results", () { 117 test("catches errors even if nothing is waiting for process results", () {
127 initGraph(["app|foo.txt"], {"app": [[new BadTransformer([])]]}); 118 initGraph(["app|foo.txt"], {"app": [[new BadTransformer([])]]});
128 119
129 updateSources(["app|foo.txt"]); 120 updateSources(["app|foo.txt"]);
130 // Note: No asset requests here. 121 // Note: No asset requests here.
131 buildShouldFail([isTransformerException(equals(BadTransformer.ERROR))]); 122 buildShouldFail([isTransformerException(equals(BadTransformer.ERROR))]);
132 }); 123 });
133 124
134 test("discards outputs from failed transforms", () { 125 test("discards outputs from failed transforms", () {
135 initGraph(["app|foo.txt"], {"app": [ 126 initGraph(["app|foo.txt"], {"app": [
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 315
325 updateSources(["app|foo.txt"]); 316 updateSources(["app|foo.txt"]);
326 expectAsset("app|foo.txt", "foo"); 317 expectAsset("app|foo.txt", "foo");
327 buildShouldSucceed(); 318 buildShouldSucceed();
328 319
329 updateSources(["app|foo.in"]); 320 updateSources(["app|foo.in"]);
330 expectAsset("app|foo.txt", "foo"); 321 expectAsset("app|foo.txt", "foo");
331 buildShouldFail([isAssetCollisionException("app|foo.txt")]); 322 buildShouldFail([isAssetCollisionException("app|foo.txt")]);
332 }); 323 });
333 } 324 }
OLDNEW
« no previous file with comments | « pkg/barback/test/package_graph/add_remove_transform_test.dart ('k') | pkg/barback/test/package_graph/get_all_assets_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698