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

Unified Diff: sdk/lib/_internal/pub/test/lock_file_test.dart

Issue 15347004: Gracefully handle pubspecs with dependencies using unknown sources. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Handle bad sources in dev deps. Created 7 years, 7 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
Index: sdk/lib/_internal/pub/test/lock_file_test.dart
diff --git a/sdk/lib/_internal/pub/test/lock_file_test.dart b/sdk/lib/_internal/pub/test/lock_file_test.dart
index 0f7fe53875149a9ec29380ea88bb1e654c9ee19b..9816b86452b10cf78f73559ed79c1d74103adc14 100644
--- a/sdk/lib/_internal/pub/test/lock_file_test.dart
+++ b/sdk/lib/_internal/pub/test/lock_file_test.dart
@@ -65,13 +65,13 @@ packages:
var bar = lockFile.packages['bar'];
expect(bar.name, equals('bar'));
expect(bar.version, equals(new Version(1, 2, 3)));
- expect(bar.source, equals(mockSource));
+ expect(bar.source, equals(mockSource.name));
expect(bar.description, equals('bar desc'));
var foo = lockFile.packages['foo'];
expect(foo.name, equals('foo'));
expect(foo.version, equals(new Version(2, 3, 4)));
- expect(foo.source, equals(mockSource));
+ expect(foo.source, equals(mockSource.name));
expect(foo.description, equals('foo desc'));
});
@@ -166,9 +166,9 @@ packages:
test('dumps the lockfile to YAML', () {
lockfile.packages['foo'] = new PackageId(
- 'foo', mockSource, new Version.parse('1.2.3'), 'foo desc');
+ 'foo', mockSource.name, new Version.parse('1.2.3'), 'foo desc');
lockfile.packages['bar'] = new PackageId(
- 'bar', mockSource, new Version.parse('3.2.1'), 'bar desc');
+ 'bar', mockSource.name, new Version.parse('3.2.1'), 'bar desc');
expect(loadYaml(lockfile.serialize()), equals({
'packages': {
@@ -189,7 +189,7 @@ packages:
test('lockfile is alphabetized by package name', () {
var testNames = ['baz', 'Qwe', 'Q', 'B', 'Bar', 'bar', 'foo'];
testNames.forEach((name) {
- lockfile.packages[name] = new PackageId(name, mockSource,
+ lockfile.packages[name] = new PackageId(name, mockSource.name,
new Version.parse('5.5.5'), '$name desc');
});

Powered by Google App Engine
This is Rietveld 408576698