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

Unified Diff: test/test_pub.dart

Issue 2044253003: Refactor Source and SourceRegistry. (Closed) Base URL: git@github.com:dart-lang/pub.git@master
Patch Set: Rename LiveSource to BoundSource. Created 4 years, 6 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 | « test/pubspec_test.dart ('k') | test/version_solver_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/test_pub.dart
diff --git a/test/test_pub.dart b/test/test_pub.dart
index 22da90d9b6229b68c749a15900e21b4272f96bfe..cd72413a815ea1ca8b3621065db2ad7824c056c9 100644
--- a/test/test_pub.dart
+++ b/test/test_pub.dart
@@ -53,8 +53,7 @@ Matcher isUnminifiedDart2JSOutput =
contains("// The code supports the following hooks");
/// The entrypoint for pub itself.
-final _entrypoint = new Entrypoint(
- pubRoot, new SystemCache.withSources(isOffline: true));
+final _entrypoint = new Entrypoint(pubRoot, new SystemCache(isOffline: true));
/// Converts [value] into a YAML string.
String yaml(value) => JSON.encode(value);
@@ -476,15 +475,14 @@ void ensureGit() {
void createLockFile(String package, {Iterable<String> sandbox,
Map<String, String> hosted}) {
schedule(() async {
- var cache = new SystemCache.withSources(
- rootDir: p.join(sandboxDir, cachePath));
+ var cache = new SystemCache(rootDir: p.join(sandboxDir, cachePath));
var lockFile = _createLockFile(cache.sources,
sandbox: sandbox, hosted: hosted);
await d.dir(package, [
d.file('pubspec.lock', lockFile.serialize(null)),
- d.file('.packages', lockFile.packagesFile(package))
+ d.file('.packages', lockFile.packagesFile(cache, package))
]).create();
}, "creating lockfile for $package");
}
@@ -494,14 +492,12 @@ void createLockFile(String package, {Iterable<String> sandbox,
void createPackagesFile(String package, {Iterable<String> sandbox,
Map<String, String> hosted}) {
schedule(() async {
- var cache = new SystemCache.withSources(
- rootDir: p.join(sandboxDir, cachePath));
-
+ var cache = new SystemCache(rootDir: p.join(sandboxDir, cachePath));
var lockFile = _createLockFile(cache.sources,
sandbox: sandbox, hosted: hosted);
await d.dir(package, [
- d.file('.packages', lockFile.packagesFile(package))
+ d.file('.packages', lockFile.packagesFile(cache, package))
]).create();
}, "creating .packages for $package");
}
@@ -725,9 +721,7 @@ typedef Validator ValidatorCreator(Entrypoint entrypoint);
Future<Pair<List<String>, List<String>>> schedulePackageValidation(
ValidatorCreator fn) {
return schedule(() {
- var cache = new SystemCache.withSources(
- rootDir: p.join(sandboxDir, cachePath));
-
+ var cache = new SystemCache(rootDir: p.join(sandboxDir, cachePath));
return new Future.sync(() {
var validator = fn(new Entrypoint(p.join(sandboxDir, appPath), cache));
return validator.validate().then((_) {
« no previous file with comments | « test/pubspec_test.dart ('k') | test/version_solver_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698