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

Side by Side Diff: utils/tests/pub/test_pub.dart

Issue 11609005: Fix analyzer errors/warnings for Pub. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years 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
« utils/pub/path.dart ('K') | « utils/pub/yaml/yaml_map.dart ('k') | no next file » | 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 /** 5 /**
6 * Test infrastructure for testing pub. Unlike typical unit tests, most pub 6 * Test infrastructure for testing pub. Unlike typical unit tests, most pub
7 * tests are integration tests that stage some stuff on the file system, run 7 * tests are integration tests that stage some stuff on the file system, run
8 * pub, and then validate the results. This library provides an API to build 8 * pub, and then validate the results. This library provides an API to build
9 * tests like that. 9 * tests like that.
10 */ 10 */
(...skipping 1406 matching lines...) Expand 10 before | Expand all | Expand 10 after
1417 var process = _process.value; 1417 var process = _process.value;
1418 process.kill(); 1418 process.kill();
1419 process.stdout.close(); 1419 process.stdout.close();
1420 process.stderr.close(); 1420 process.stderr.close();
1421 }); 1421 });
1422 } 1422 }
1423 1423
1424 /// Reads the next line of stdout from the process. 1424 /// Reads the next line of stdout from the process.
1425 Future<String> nextLine() { 1425 Future<String> nextLine() {
1426 return _scheduleValue((_) { 1426 return _scheduleValue((_) {
1427 return timeout(_stdout.chain(readLine), _SCHEDULE_TIMEOUT, 1427 return timeout(_stdout.chain((stream) => readLine(stream)),
1428 _SCHEDULE_TIMEOUT,
1428 "waiting for the next stdout line from process $name"); 1429 "waiting for the next stdout line from process $name");
1429 }); 1430 });
1430 } 1431 }
1431 1432
1432 /// Reads the next line of stderr from the process. 1433 /// Reads the next line of stderr from the process.
1433 Future<String> nextErrLine() { 1434 Future<String> nextErrLine() {
1434 return _scheduleValue((_) { 1435 return _scheduleValue((_) {
1435 return timeout(_stderr.chain(readLine), _SCHEDULE_TIMEOUT, 1436 return timeout(_stderr.chain((stream) => readLine(stream)),
1437 _SCHEDULE_TIMEOUT,
1436 "waiting for the next stderr line from process $name"); 1438 "waiting for the next stderr line from process $name");
1437 }); 1439 });
1438 } 1440 }
1439 1441
1440 /// Reads the remaining stdout from the process. This should only be called 1442 /// Reads the remaining stdout from the process. This should only be called
1441 /// after kill() or shouldExit(). 1443 /// after kill() or shouldExit().
1442 Future<String> remainingStdout() { 1444 Future<String> remainingStdout() {
1443 if (!_endScheduled) { 1445 if (!_endScheduled) {
1444 throw new StateError("remainingStdout() should only be called after " 1446 throw new StateError("remainingStdout() should only be called after "
1445 "kill() or shouldExit()."); 1447 "kill() or shouldExit().");
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
1664 /// calling [completion] is unnecessary. 1666 /// calling [completion] is unnecessary.
1665 void expectLater(Future actual, matcher, {String reason, 1667 void expectLater(Future actual, matcher, {String reason,
1666 FailureHandler failureHandler, bool verbose: false}) { 1668 FailureHandler failureHandler, bool verbose: false}) {
1667 _schedule((_) { 1669 _schedule((_) {
1668 return actual.transform((value) { 1670 return actual.transform((value) {
1669 expect(value, matcher, reason: reason, failureHandler: failureHandler, 1671 expect(value, matcher, reason: reason, failureHandler: failureHandler,
1670 verbose: false); 1672 verbose: false);
1671 }); 1673 });
1672 }); 1674 });
1673 } 1675 }
OLDNEW
« utils/pub/path.dart ('K') | « utils/pub/yaml/yaml_map.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698