OLD | NEW |
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 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 | 268 |
269 /** | 269 /** |
270 * Describes a map representing a library package with the given [name], | 270 * Describes a map representing a library package with the given [name], |
271 * [version], and [dependencies]. | 271 * [version], and [dependencies]. |
272 */ | 272 */ |
273 Map package(String name, String version, [List dependencies]) { | 273 Map package(String name, String version, [List dependencies]) { |
274 var package = { | 274 var package = { |
275 "name": name, | 275 "name": name, |
276 "version": version, | 276 "version": version, |
277 "author": "Nathan Weizenbaum <nweiz@google.com>", | 277 "author": "Nathan Weizenbaum <nweiz@google.com>", |
278 "homepage": "http://pub.dartlang.org" | 278 "homepage": "http://pub.dartlang.org", |
| 279 "description": "A package, I guess." |
279 }; | 280 }; |
280 if (dependencies != null) { | 281 if (dependencies != null) { |
281 package["dependencies"] = _dependencyListToMap(dependencies); | 282 package["dependencies"] = _dependencyListToMap(dependencies); |
282 } | 283 } |
283 return package; | 284 return package; |
284 } | 285 } |
285 | 286 |
286 /** | 287 /** |
287 * Describes a map representing a dependency on a package in the package | 288 * Describes a map representing a dependency on a package in the package |
288 * repository. | 289 * repository. |
(...skipping 1341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1630 /// calling [completion] is unnecessary. | 1631 /// calling [completion] is unnecessary. |
1631 void expectLater(Future actual, matcher, {String reason, | 1632 void expectLater(Future actual, matcher, {String reason, |
1632 FailureHandler failureHandler, bool verbose: false}) { | 1633 FailureHandler failureHandler, bool verbose: false}) { |
1633 _schedule((_) { | 1634 _schedule((_) { |
1634 return actual.transform((value) { | 1635 return actual.transform((value) { |
1635 expect(value, matcher, reason: reason, failureHandler: failureHandler, | 1636 expect(value, matcher, reason: reason, failureHandler: failureHandler, |
1636 verbose: false); | 1637 verbose: false); |
1637 }); | 1638 }); |
1638 }); | 1639 }); |
1639 } | 1640 } |
OLD | NEW |