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

Unified Diff: test/lock_file_test.dart

Issue 1281043004: Make LockFile immutable. (Closed) Base URL: git@github.com:dart-lang/pub.git@master
Patch Set: Code review changes Created 5 years, 4 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 | « lib/src/solver/version_solver.dart ('k') | test/test_pub.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/lock_file_test.dart
diff --git a/test/lock_file_test.dart b/test/lock_file_test.dart
index 5bf089fb70a324adb2474f29fbe4c816ea559c20..8a2144e94e3f330a8221026aad17efd756a47814 100644
--- a/test/lock_file_test.dart
+++ b/test/lock_file_test.dart
@@ -195,33 +195,28 @@ packages:
});
});
- group('serialize()', () {
- var lockfile;
- setUp(() {
- lockfile = new LockFile.empty();
- });
-
- test('dumps the lockfile to YAML', () {
- lockfile.packages['foo'] = new PackageId(
- 'foo', mockSource.name, new Version.parse('1.2.3'), 'foo desc');
- lockfile.packages['bar'] = new PackageId(
- 'bar', mockSource.name, new Version.parse('3.2.1'), 'bar desc');
-
- expect(loadYaml(lockfile.serialize(null, sources)), equals({
- 'packages': {
- 'foo': {
- 'version': '1.2.3',
- 'source': 'mock',
- 'description': 'foo desc'
- },
- 'bar': {
- 'version': '3.2.1',
- 'source': 'mock',
- 'description': 'bar desc'
- }
+ test('serialize() dumps the lockfile to YAML', () {
+ var lockfile = new LockFile([
+ new PackageId(
+ 'foo', mockSource.name, new Version.parse('1.2.3'), 'foo desc'),
+ new PackageId(
+ 'bar', mockSource.name, new Version.parse('3.2.1'), 'bar desc')
+ ], sources);
+
+ expect(loadYaml(lockfile.serialize(null, sources)), equals({
+ 'packages': {
+ 'foo': {
+ 'version': '1.2.3',
+ 'source': 'mock',
+ 'description': 'foo desc'
+ },
+ 'bar': {
+ 'version': '3.2.1',
+ 'source': 'mock',
+ 'description': 'bar desc'
}
- }));
- });
+ }
+ }));
});
});
}
« no previous file with comments | « lib/src/solver/version_solver.dart ('k') | test/test_pub.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698