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

Side by Side Diff: sdk/lib/_internal/pub_generated/test/build/outputs_error_to_json_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 '../../lib/src/exit_codes.dart' as exit_codes;
4 import '../descriptor.dart' as d;
5 import '../test_pub.dart';
6 const TRANSFORMER = """
7 import 'dart:async';
8
9 import 'package:barback/barback.dart';
10
11 class RewriteTransformer extends Transformer {
12 RewriteTransformer.asPlugin();
13
14 String get allowedExtensions => '.txt';
15
16 Future apply(Transform transform) => throw new Exception('oh no!');
17 }
18 """;
19 main() {
20 initConfig();
21 withBarbackVersions("any", () {
22 integration("outputs error to JSON in a failed build", () {
23 currentSchedule.timeout *= 2;
24 d.dir(appPath, [d.pubspec({
25 "name": "myapp",
26 "transformers": ["myapp"]
27 }),
28 d.dir("lib", [d.file("transformer.dart", TRANSFORMER)]),
29 d.dir("web", [d.file("foo.txt", "foo")])]).create();
30 createLockFile('myapp', pkg: ['barback']);
31 schedulePub(args: ["build", "--format", "json"], outputJson: {
32 "buildResult": "failure",
33 "errors": [{
34 "error": startsWith(
35 "Transform Rewrite on myapp|web/foo.txt " "threw error: oh no!")
36 }],
37 "log": []
38 }, exitCode: exit_codes.DATA);
39 });
40 });
41 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698