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

Side by Side Diff: sdk/lib/_internal/pub/test/test_pub.dart

Issue 602983002: Remove unused parameter. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 2 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
« no previous file with comments | « no previous file | sdk/lib/_internal/pub_generated/test/test_pub.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 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 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. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 /// Test infrastructure for testing pub. 5 /// Test infrastructure for testing pub.
6 /// 6 ///
7 /// Unlike typical unit tests, most pub tests are integration tests that stage 7 /// Unlike typical unit tests, most pub tests are integration tests that stage
8 /// some stuff on the file system, run pub, and then validate the results. This 8 /// some stuff on the file system, run pub, and then validate the results. This
9 /// library provides an API to build tests like that. 9 /// library provides an API to build tests like that.
10 library test_pub; 10 library test_pub;
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 /// 405 ///
406 /// Runs Pub with [args] and validates that its results match [output] (or 406 /// Runs Pub with [args] and validates that its results match [output] (or
407 /// [outputJson]), [error], and [exitCode]. 407 /// [outputJson]), [error], and [exitCode].
408 /// 408 ///
409 /// [output] and [error] can be [String]s, [RegExp]s, or [Matcher]s. 409 /// [output] and [error] can be [String]s, [RegExp]s, or [Matcher]s.
410 /// 410 ///
411 /// If [outputJson] is given, validates that pub outputs stringified JSON 411 /// If [outputJson] is given, validates that pub outputs stringified JSON
412 /// matching that object, which can be a literal JSON object or any other 412 /// matching that object, which can be a literal JSON object or any other
413 /// [Matcher]. 413 /// [Matcher].
414 void schedulePub({List args, output, error, outputJson, 414 void schedulePub({List args, output, error, outputJson,
415 Future<Uri> tokenEndpoint, int exitCode: exit_codes.SUCCESS}) { 415 int exitCode: exit_codes.SUCCESS}) {
416 // Cannot pass both output and outputJson. 416 // Cannot pass both output and outputJson.
417 assert(output == null || outputJson == null); 417 assert(output == null || outputJson == null);
418 418
419 var pub = startPub(args: args, tokenEndpoint: tokenEndpoint); 419 var pub = startPub(args: args);
420 pub.shouldExit(exitCode); 420 pub.shouldExit(exitCode);
421 421
422 var failures = []; 422 var failures = [];
423 var stderr; 423 var stderr;
424 424
425 expect(Future.wait([ 425 expect(Future.wait([
426 pub.stdoutStream().toList(), 426 pub.stdoutStream().toList(),
427 pub.stderrStream().toList() 427 pub.stderrStream().toList()
428 ]).then((results) { 428 ]).then((results) {
429 var stdout = results[0].join("\n"); 429 var stdout = results[0].join("\n");
(...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after
967 _lastMatcher.matches(item.last, matchState); 967 _lastMatcher.matches(item.last, matchState);
968 } 968 }
969 969
970 Description describe(Description description) { 970 Description describe(Description description) {
971 return description.addAll("(", ", ", ")", [_firstMatcher, _lastMatcher]); 971 return description.addAll("(", ", ", ")", [_firstMatcher, _lastMatcher]);
972 } 972 }
973 } 973 }
974 974
975 /// A [StreamMatcher] that matches multiple lines of output. 975 /// A [StreamMatcher] that matches multiple lines of output.
976 StreamMatcher emitsLines(String output) => inOrder(output.split("\n")); 976 StreamMatcher emitsLines(String output) => inOrder(output.split("\n"));
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/_internal/pub_generated/test/test_pub.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698