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

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

Issue 36463002: Fix a synchrony bug in barback. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 library barback.test.package_graph.transform_test;
6
7 import 'package:barback/src/utils.dart';
8 import 'package:scheduled_test/scheduled_test.dart';
9
10 import '../utils.dart';
11
12 main() {
Bob Nystrom 2013/10/28 16:51:30 Can you add some documentation here explaining wha
nweiz 2013/10/28 23:54:49 Done.
13 initConfig();
14
15 test("updates sources many times", () {
16 initGraph(["app|foo.txt"], {
17 "app": [[new RewriteTransformer("txt", "out")]]
18 });
19
20 for (var i = 0; i < 1000; i++) {
21 updateSources(["app|foo.txt"]);
22 }
23
24 expectAsset("app|foo.out", "foo.out");
25 buildShouldSucceed();
26 });
27
28 test("updates and then removes sources many times", () {
29 initGraph(["app|foo.txt"], {
30 "app": [[new RewriteTransformer("txt", "out")]]
31 });
32
33 for (var i = 0; i < 1000; i++) {
34 updateSources(["app|foo.txt"]);
35 removeSources(["app|foo.txt"]);
36 }
37
38 expectNoAsset("app|foo.out");
39 expectNoAsset("app|foo.txt");
40 buildShouldSucceed();
41 });
42
43 test("updates transformers many times", () {
44 var rewrite = new RewriteTransformer("txt", "out");
45 initGraph(["app|foo.txt"], {"app": [[rewrite]]});
46 updateSources(["app|foo.txt"]);
47
48 for (var i = 0; i < 1; i++) {
Bob Nystrom 2013/10/28 16:51:30 That's not very many times.
nweiz 2013/10/28 23:54:49 Oops, left over from debuggnig. Fixed.
49 updateTransformers("app", [[rewrite]]);
50 }
51
52 expectAsset("app|foo.out", "foo.out");
53 buildShouldSucceed();
54 });
55
56 test("updates and removes transformers many times", () {
57 var rewrite = new RewriteTransformer("txt", "out");
58 initGraph(["app|foo.txt"], {"app": [[rewrite]]});
59 updateSources(["app|foo.txt"]);
60
61 for (var i = 0; i < 1; i++) {
Bob Nystrom 2013/10/28 16:51:30 Ditto.
nweiz 2013/10/28 23:54:49 Done.
62 updateTransformers("app", [[rewrite]]);
63 updateTransformers("app", [[]]);
64 }
65
66 expectAsset("app|foo.txt", "foo");
67 expectNoAsset("app|foo.out");
68 buildShouldSucceed();
69 });
70 }
OLDNEW
« no previous file with comments | « pkg/barback/lib/src/transform_node.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698