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

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

Issue 188673004: Roll forward commits r33138, r33135, and r33134. (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 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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 318
328 updateSources(["app|foo.txt"]); 319 updateSources(["app|foo.txt"]);
329 expectAsset("app|foo.txt", "foo"); 320 expectAsset("app|foo.txt", "foo");
330 buildShouldSucceed(); 321 buildShouldSucceed();
331 322
332 updateSources(["app|foo.in"]); 323 updateSources(["app|foo.in"]);
333 expectAsset("app|foo.txt", "foo"); 324 expectAsset("app|foo.txt", "foo");
334 buildShouldFail([isAssetCollisionException("app|foo.txt")]); 325 buildShouldFail([isAssetCollisionException("app|foo.txt")]);
335 }); 326 });
336 } 327 }
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