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

Side by Side Diff: pkg/barback/test/package_graph/transform/pass_through_test.dart

Issue 224933002: Only run [Transformer.isPrimary] once for each asset/transformer pair. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: code review Created 6 years, 8 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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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.transform.pass_through_test; 5 library barback.test.package_graph.transform.pass_through_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 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 expectAsset("app|foo.out", "bar"); 245 expectAsset("app|foo.out", "bar");
246 246
247 manyToOne.pauseApply(); 247 manyToOne.pauseApply();
248 updateSources(["app|bar.in"]); 248 updateSources(["app|bar.in"]);
249 expectAssetDoesNotComplete("app|foo.txt"); 249 expectAssetDoesNotComplete("app|foo.txt");
250 250
251 manyToOne.resumeApply(); 251 manyToOne.resumeApply();
252 expectAsset("app|foo.txt", "bar.in"); 252 expectAsset("app|foo.txt", "bar.in");
253 buildShouldSucceed(); 253 buildShouldSucceed();
254 }); 254 });
255
256 test("doesn't return an overwritten asset until we know it will still "
257 "be overwritten", () {
258 var rewrite = new RewriteTransformer("txt", "txt");
259 initGraph(["app|foo.txt"], {"app": [[rewrite]]});
260
261 updateSources(["app|foo.txt"]);
262 expectAsset("app|foo.txt", "foo.txt");
263 buildShouldSucceed();
264
265 rewrite.pauseIsPrimary("app|foo.txt");
266 updateSources(["app|foo.txt"]);
267 expectAssetDoesNotComplete("app|foo.txt");
268
269 rewrite.resumeIsPrimary("app|foo.txt");
270 expectAsset("app|foo.txt", "foo.txt");
271 buildShouldSucceed();
272 });
273 } 255 }
OLDNEW
« no previous file with comments | « pkg/barback/test/package_graph/transform/concurrency_test.dart ('k') | pkg/barback/test/transformer/bad.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698