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

Side by Side Diff: sdk/lib/_internal/pub_generated/test/transformer/loads_a_declaring_aggregate_transformer_test.dart

Issue 557563002: Store the async-await compiled pub code directly in the repo. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 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 d.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 pub_tests; 1 library pub_tests;
6
7 import '../descriptor.dart' as d; 2 import '../descriptor.dart' as d;
8 import '../test_pub.dart'; 3 import '../test_pub.dart';
9 import '../serve/utils.dart'; 4 import '../serve/utils.dart';
10
11 const AGGREGATE_TRANSFORMER = """ 5 const AGGREGATE_TRANSFORMER = """
12 import 'dart:async'; 6 import 'dart:async';
13 7
14 import 'package:barback/barback.dart'; 8 import 'package:barback/barback.dart';
15 import 'package:path/path.dart' as p; 9 import 'package:path/path.dart' as p;
16 10
17 class ManyToOneTransformer extends AggregateTransformer 11 class ManyToOneTransformer extends AggregateTransformer
18 implements DeclaringAggregateTransformer { 12 implements DeclaringAggregateTransformer {
19 ManyToOneTransformer.asPlugin(); 13 ManyToOneTransformer.asPlugin();
20 14
(...skipping 12 matching lines...) Expand all
33 transform.addOutput(new Asset.fromString(id, contents.join('\\n'))); 27 transform.addOutput(new Asset.fromString(id, contents.join('\\n')));
34 }); 28 });
35 } 29 }
36 30
37 void declareOutputs(DeclaringAggregateTransform transform) { 31 void declareOutputs(DeclaringAggregateTransform transform) {
38 transform.declareOutput(new AssetId(transform.package, 32 transform.declareOutput(new AssetId(transform.package,
39 p.url.join(transform.key, 'out.final'))); 33 p.url.join(transform.key, 'out.final')));
40 } 34 }
41 } 35 }
42 """; 36 """;
43
44 main() { 37 main() {
45 initConfig(); 38 initConfig();
46 withBarbackVersions(">=0.14.1", () { 39 withBarbackVersions(">=0.14.1", () {
47 integration("loads a declaring aggregate transformer", () { 40 integration("loads a declaring aggregate transformer", () {
48 d.dir(appPath, [ 41 d.dir(appPath, [d.pubspec({
49 d.pubspec({
50 "name": "myapp", 42 "name": "myapp",
51 "transformers": ["myapp/lazy", "myapp/aggregate"] 43 "transformers": ["myapp/lazy", "myapp/aggregate"]
52 }), 44 }),
53 d.dir("lib", [ 45 d.dir(
54 d.file("lazy.dart", LAZY_TRANSFORMER), 46 "lib",
55 d.file("aggregate.dart", AGGREGATE_TRANSFORMER), 47 [
56 ]), 48 d.file("lazy.dart", LAZY_TRANSFORMER),
57 d.dir("web", [ 49 d.file("aggregate.dart", AGGREGATE_TRANSFORMER)]),
58 d.file("foo.txt", "foo"), 50 d.dir("web", [d.file("foo.txt", "foo"), d.file("bar.txt", "bar")])]) .create();
59 d.file("bar.txt", "bar")
60 ])
61 ]).create();
62
63 createLockFile('myapp', pkg: ['barback']); 51 createLockFile('myapp', pkg: ['barback']);
64
65 var server = pubServe(); 52 var server = pubServe();
66 // The transformer should preserve laziness.
67 server.stdout.expect("Build completed successfully"); 53 server.stdout.expect("Build completed successfully");
68
69 requestShouldSucceed("out.final", "bar.out\nfoo.out"); 54 requestShouldSucceed("out.final", "bar.out\nfoo.out");
70 endPubServe(); 55 endPubServe();
71 }); 56 });
72 }); 57 });
73 } 58 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698