OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 library lock_file_test; | 5 library lock_file_test; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 | 8 |
9 import 'package:pub/src/lock_file.dart'; | 9 import 'package:pub/src/lock_file.dart'; |
10 import 'package:pub/src/package.dart'; | 10 import 'package:pub/src/package.dart'; |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 | 204 |
205 test('serialize() dumps the lockfile to YAML', () { | 205 test('serialize() dumps the lockfile to YAML', () { |
206 var lockfile = new LockFile([ | 206 var lockfile = new LockFile([ |
207 new PackageId( | 207 new PackageId( |
208 'foo', mockSource.name, new Version.parse('1.2.3'), 'foo desc'), | 208 'foo', mockSource.name, new Version.parse('1.2.3'), 'foo desc'), |
209 new PackageId( | 209 new PackageId( |
210 'bar', mockSource.name, new Version.parse('3.2.1'), 'bar desc') | 210 'bar', mockSource.name, new Version.parse('3.2.1'), 'bar desc') |
211 ], sources); | 211 ], sources); |
212 | 212 |
213 expect(loadYaml(lockfile.serialize(null)), equals({ | 213 expect(loadYaml(lockfile.serialize(null)), equals({ |
| 214 'sdk': 'any', |
214 'packages': { | 215 'packages': { |
215 'foo': { | 216 'foo': { |
216 'version': '1.2.3', | 217 'version': '1.2.3', |
217 'source': 'mock', | 218 'source': 'mock', |
218 'description': 'foo desc' | 219 'description': 'foo desc' |
219 }, | 220 }, |
220 'bar': { | 221 'bar': { |
221 'version': '3.2.1', | 222 'version': '3.2.1', |
222 'source': 'mock', | 223 'source': 'mock', |
223 'description': 'bar desc' | 224 'description': 'bar desc' |
224 } | 225 } |
225 } | 226 } |
226 })); | 227 })); |
227 }); | 228 }); |
228 }); | 229 }); |
229 } | 230 } |
OLD | NEW |