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

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

Issue 196473016: Consider errors logged by a transformer equivalent to thrown errors. (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
« no previous file with comments | « pkg/barback/lib/src/transform_node.dart ('k') | pkg/barback/test/transformer/bad_log.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 ]); 145 ]);
146 }); 146 });
147 147
148 test("an asset isn't passed through a transformer with an error", () { 148 test("an asset isn't passed through a transformer with an error", () {
149 initGraph(["app|foo.txt",], {"app": [[new BadTransformer([])]]}); 149 initGraph(["app|foo.txt",], {"app": [[new BadTransformer([])]]});
150 150
151 updateSources(["app|foo.txt"]); 151 updateSources(["app|foo.txt"]);
152 expectNoAsset("app|foo.txt"); 152 expectNoAsset("app|foo.txt");
153 buildShouldFail([isTransformerException(equals(BadTransformer.ERROR))]); 153 buildShouldFail([isTransformerException(equals(BadTransformer.ERROR))]);
154 }); 154 });
155
156 test("a transformer that logs errors shouldn't produce output", () {
157 initGraph(["app|foo.txt"], {"app": [
158 [new BadLogTransformer(["app|out.txt"])]
159 ]});
160
161 updateSources(["app|foo.txt"]);
162 expectNoAsset("app|foo.txt");
163 expectNoAsset("app|out.txt");
164 buildShouldFail([
165 isTransformerException(equals("first error")),
166 isTransformerException(equals("second error"))
167 ]);
168 });
155 } 169 }
OLDNEW
« no previous file with comments | « pkg/barback/lib/src/transform_node.dart ('k') | pkg/barback/test/transformer/bad_log.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698