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

Unified Diff: utils/tests/pub/version_solver_test.dart

Issue 10701146: Make VersionSolver actually return PackageIds. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Style change Created 8 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « utils/pub/version_solver.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/tests/pub/version_solver_test.dart
diff --git a/utils/tests/pub/version_solver_test.dart b/utils/tests/pub/version_solver_test.dart
index e87ffb0ffd882b75b2f5331e42be92e01a3f5db3..cfe5c08b0374e371611635d1a0da842d40bec1e1 100644
--- a/utils/tests/pub/version_solver_test.dart
+++ b/utils/tests/pub/version_solver_test.dart
@@ -270,7 +270,14 @@ testResolve(description, packages, [result, error]) {
var future = resolveVersions(sources, root);
if (result != null) {
- expect(future, completion(equals(result)));
+ expect(future, completion(predicate((actualResult) {
+ for (var id in actualResult) {
+ if (!result.containsKey(id.description)) return false;
+ if (id.version != result.remove(id.description)) return false;
+ }
+ if (!result.isEmpty()) return false;
+ return true;
Bob Nystrom 2012/07/11 22:51:02 return result.isEmpty();
nweiz 2012/07/11 22:55:40 Done.
+ }, description: 'packages to match $result')));
} else if (error == noVersion) {
expect(future, throwsA(new isInstanceOf<NoVersionException>()));
} else if (error == disjointConstraint) {
« no previous file with comments | « utils/pub/version_solver.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698