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

Side by Side Diff: sdk/lib/_internal/pub_generated/test/dart2js/reports_dart_parse_errors_test.dart

Issue 896623005: Use native async/await support in pub. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Code review changes Created 5 years, 10 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 // 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 import 'package:path/path.dart' as p;
6 import 'package:scheduled_test/scheduled_test.dart';
7 import 'package:scheduled_test/scheduled_stream.dart';
8
9 import '../../lib/src/exit_codes.dart' as exit_codes;
10 import '../descriptor.dart' as d;
11 import '../test_pub.dart';
12
13 main() {
14 initConfig();
15 integration("reports Dart parse errors", () {
16 // Dart2js can take a long time to compile dart code, so we increase the
17 // timeout to cope with that.
18 currentSchedule.timeout *= 3;
19
20 d.dir(
21 appPath,
22 [
23 d.appPubspec(),
24 d.dir(
25 'web',
26 [
27 d.file('file.txt', 'contents'),
28 d.file('file.dart', 'void void;'),
29 d.dir('subdir', [d.file('subfile.dart', 'void void;')])])]). create();
30
31 var pub = startPub(args: ["build"]);
32 pub.stdout.expect(startsWith("Loading source assets..."));
33 pub.stdout.expect(startsWith("Building myapp..."));
34
35 var consumeFile = consumeThrough(
36 inOrder(
37 ["[Error from Dart2JS]:", startsWith(p.join("web", "file.dart") + ": ")]));
38 var consumeSubfile = consumeThrough(
39 inOrder(
40 [
41 "[Error from Dart2JS]:",
42 startsWith(p.join("web", "subdir", "subfile.dart") + ":")]));
43
44 // It's nondeterministic what order the dart2js transformers start running,
45 // so we allow the error messages to be emitted in either order.
46 pub.stderr.expect(
47 either(
48 inOrder([consumeFile, consumeSubfile]),
49 inOrder([consumeSubfile, consumeFile])));
50
51 pub.shouldExit(exit_codes.DATA);
52
53 // Doesn't output anything if an error occurred.
54 d.dir(appPath, [d.dir('build', [d.nothing('web')])]).validate();
55 });
56 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698