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

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

Issue 200983002: Re-run a transform when a secondary input starts existing. (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 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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 169
170 test("a transformer can catch an error loading a secondary input", () { 170 test("a transformer can catch an error loading a secondary input", () {
171 initGraph(["app|foo.txt"], {"app": [ 171 initGraph(["app|foo.txt"], {"app": [
172 [new CatchAssetNotFoundTransformer(".txt", "app|nothing")] 172 [new CatchAssetNotFoundTransformer(".txt", "app|nothing")]
173 ]}); 173 ]});
174 174
175 updateSources(["app|foo.txt"]); 175 updateSources(["app|foo.txt"]);
176 expectAsset("app|foo.txt", "failed to load app|nothing"); 176 expectAsset("app|foo.txt", "failed to load app|nothing");
177 buildShouldSucceed(); 177 buildShouldSucceed();
178 }); 178 });
179
180 test("a transformer that fails due to a missing secondary input is re-run "
181 "when that input appears", () {
182 initGraph({
183 "app|foo.txt": "bar.inc",
184 "app|bar.inc": "bar"
185 }, {"app": [
186 [new ManyToOneTransformer("txt")]
187 ]});
188
189 updateSources(["app|foo.txt"]);
190 expectNoAsset("app|foo.out");
191 buildShouldFail([isMissingInputException("app|bar.inc")]);
192
193 updateSources(["app|bar.inc"]);
194 expectAsset("app|foo.out", "bar");
195 buildShouldSucceed();
196 });
179 } 197 }
OLDNEW
« no previous file with comments | « pkg/barback/lib/src/transform_node.dart ('k') | pkg/barback/test/package_graph/transform/transform_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698