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 'package:unittest/unittest.dart'; | 7 import 'package:unittest/unittest.dart'; |
8 import 'package:yaml/yaml.dart'; | 8 import 'package:yaml/yaml.dart'; |
9 | 9 |
10 import '../lib/src/lock_file.dart'; | 10 import '../lib/src/lock_file.dart'; |
11 import '../lib/src/package.dart'; | 11 import '../lib/src/package.dart'; |
12 import '../lib/src/source.dart'; | 12 import '../lib/src/source.dart'; |
13 import '../lib/src/source_registry.dart'; | 13 import '../lib/src/source_registry.dart'; |
14 import '../lib/src/utils.dart'; | |
15 import '../lib/src/version.dart'; | 14 import '../lib/src/version.dart'; |
16 import 'test_pub.dart'; | 15 import 'test_pub.dart'; |
17 | 16 |
18 class MockSource extends Source { | 17 class MockSource extends Source { |
19 final String name = 'mock'; | 18 final String name = 'mock'; |
20 final bool shouldCache = false; | 19 final bool shouldCache = false; |
21 | 20 |
22 dynamic parseDescription(String filePath, String description, | 21 dynamic parseDescription(String filePath, String description, |
23 {bool fromLockFile: false}) { | 22 {bool fromLockFile: false}) { |
24 if (!description.endsWith(' desc')) throw new FormatException(); | 23 if (!description.endsWith(' desc')) throw new FormatException(); |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 'version': '3.2.1', | 183 'version': '3.2.1', |
185 'source': 'mock', | 184 'source': 'mock', |
186 'description': 'bar desc' | 185 'description': 'bar desc' |
187 } | 186 } |
188 } | 187 } |
189 })); | 188 })); |
190 }); | 189 }); |
191 }); | 190 }); |
192 }); | 191 }); |
193 } | 192 } |
OLD | NEW |