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

Side by Side Diff: sdk/lib/_internal/pub_generated/test/barback/utils.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 import 'package:scheduled_test/scheduled_test.dart';
2 import '../../lib/src/exit_codes.dart' as exit_codes;
3 import '../test_pub.dart';
4 void pubBuildAndServeShouldFail(String description, {List<String> args,
5 String error, String buildError, String serveError, int exitCode}) {
6 if (error != null) {
7 assert(buildError == null);
8 buildError = error;
9 assert(serveError == null);
10 serveError = error;
11 }
12 var buildExpectation = buildError;
13 var serveExpectation = serveError;
14 if (exitCode == exit_codes.USAGE) {
15 buildExpectation =
16 allOf(startsWith(buildExpectation), contains("Usage: pub build"));
17 serveExpectation =
18 allOf(startsWith(serveExpectation), contains("Usage: pub serve"));
19 }
20 integration("build fails $description", () {
21 schedulePub(
22 args: ["build"]..addAll(args),
23 error: buildExpectation,
24 exitCode: exitCode);
25 });
26 integration("build --format json fails $description", () {
27 schedulePub(args: ["build", "--format", "json"]..addAll(args), outputJson: {
28 "error": buildError
29 }, exitCode: exitCode);
30 });
31 integration("serve fails $description", () {
32 schedulePub(
33 args: ["serve"]..addAll(args),
34 error: serveExpectation,
35 exitCode: exitCode);
36 });
37 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698