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

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

Issue 11369066: Show better error messages in network failures. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Clean up string interpolation a bit. Created 8 years, 1 month 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/tests/pub/update/hosted/fail_gracefully_on_missing_package_test.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 e3100e77182a2c1750c65e94f2cf05edae1ba49e..8bec240c8c17800c40d3d3319d7405e39d014cbe 100644
--- a/utils/tests/pub/version_solver_test.dart
+++ b/utils/tests/pub/version_solver_test.dart
@@ -13,6 +13,7 @@ import '../../pub/pubspec.dart';
import '../../pub/root_source.dart';
import '../../pub/source.dart';
import '../../pub/source_registry.dart';
+import '../../pub/system_cache.dart';
import '../../pub/utils.dart';
import '../../pub/version.dart';
import '../../pub/version_solver.dart';
@@ -353,14 +354,14 @@ testResolve(description, packages, {lockfile, result, error}) {
var isCouldNotSolveException = predicate((x)=> x is CouldNotSolveException,
"is a CouldNotSolveException");
- var sources = new SourceRegistry();
+ var cache = new SystemCache('.');
source1 = new MockSource('mock1');
source2 = new MockSource('mock2');
versionlessSource = new MockVersionlessSource();
- sources.register(source1);
- sources.register(source2);
- sources.register(versionlessSource);
- sources.setDefault(source1.name);
+ cache.register(source1);
+ cache.register(source2);
+ cache.register(versionlessSource);
+ cache.sources.setDefault(source1.name);
// Build the test package graph.
var root;
@@ -380,7 +381,7 @@ testResolve(description, packages, {lockfile, result, error}) {
// remote server.
root = package;
rootSource = new RootSource(root);
- sources.register(rootSource);
+ cache.register(rootSource);
} else {
source.addPackage(package);
}
@@ -409,7 +410,7 @@ testResolve(description, packages, {lockfile, result, error}) {
}
// Resolve the versions.
- var future = resolveVersions(sources, root, realLockFile);
+ var future = resolveVersions(cache.sources, root, realLockFile);
if (result != null) {
expect(future, completion(predicate((actualResult) {
« no previous file with comments | « utils/tests/pub/update/hosted/fail_gracefully_on_missing_package_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698