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

Side by Side Diff: sdk/lib/_internal/pub_generated/test/transformer/a_transformer_rejects_its_config_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
(Empty)
1 library pub_tests;
2 import 'package:scheduled_test/scheduled_test.dart';
3 import '../descriptor.dart' as d;
4 import '../test_pub.dart';
5 import '../serve/utils.dart';
6 const REJECT_CONFIG_TRANSFORMER = """
7 import 'dart:async';
8
9 import 'package:barback/barback.dart';
10
11 class RejectConfigTransformer extends Transformer {
12 RejectConfigTransformer.asPlugin(BarbackSettings settings) {
13 throw "I hate these settings!";
14 }
15
16 Future<bool> isPrimary(_) => new Future.value(true);
17 Future apply(Transform transform) {}
18 }
19 """;
20 main() {
21 initConfig();
22 withBarbackVersions("any", () {
23 integration("a transformer can reject is configuration", () {
24 d.dir(appPath, [d.pubspec({
25 "name": "myapp",
26 "transformers": [{
27 "myapp/src/transformer": {
28 'foo': 'bar'
29 }
30 }]
31 }),
32 d.dir(
33 "lib",
34 [
35 d.dir(
36 "src",
37 [d.file("transformer.dart", REJECT_CONFIG_TRANSFORMER)]) ])]).create();
38 createLockFile('myapp', pkg: ['barback']);
39 var pub = startPubServe();
40 pub.stderr.expect(
41 endsWith('Error loading transformer: I hate these ' 'settings!'));
42 pub.shouldExit(1);
43 });
44 });
45 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698