| 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 pub_upgrade_test; | 5 library pub_upgrade_test; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 | 8 |
| 9 import 'package:unittest/unittest.dart'; | 9 import 'package:unittest/unittest.dart'; |
| 10 | 10 |
| (...skipping 875 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 886 'myapp from root': '0.0.0', | 886 'myapp from root': '0.0.0', |
| 887 'a': '1.0.0' | 887 'a': '1.0.0' |
| 888 }); | 888 }); |
| 889 | 889 |
| 890 testResolve('use latest allowed prerelease if no stable versions match', { | 890 testResolve('use latest allowed prerelease if no stable versions match', { |
| 891 'myapp 0.0.0': { | 891 'myapp 0.0.0': { |
| 892 'a': '<2.0.0' | 892 'a': '<2.0.0' |
| 893 }, | 893 }, |
| 894 'a 1.0.0-dev': {}, | 894 'a 1.0.0-dev': {}, |
| 895 'a 1.1.0-dev': {}, | 895 'a 1.1.0-dev': {}, |
| 896 'a 2.0.0-dev': {}, | 896 'a 1.9.0-dev': {}, |
| 897 'a 3.0.0': {} | 897 'a 3.0.0': {} |
| 898 }, result: { | 898 }, result: { |
| 899 'myapp from root': '0.0.0', | 899 'myapp from root': '0.0.0', |
| 900 'a': '2.0.0-dev' | 900 'a': '1.9.0-dev' |
| 901 }); | 901 }); |
| 902 | 902 |
| 903 testResolve('use an earlier stable version on a < constraint', { | 903 testResolve('use an earlier stable version on a < constraint', { |
| 904 'myapp 0.0.0': { | 904 'myapp 0.0.0': { |
| 905 'a': '<2.0.0' | 905 'a': '<2.0.0' |
| 906 }, | 906 }, |
| 907 'a 1.0.0': {}, | 907 'a 1.0.0': {}, |
| 908 'a 1.1.0': {}, | 908 'a 1.1.0': {}, |
| 909 'a 2.0.0-dev': {}, | 909 'a 2.0.0-dev': {}, |
| 910 'a 2.0.0': {} | 910 'a 2.0.0': {} |
| (...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1510 } | 1510 } |
| 1511 | 1511 |
| 1512 var source = "mock1"; | 1512 var source = "mock1"; |
| 1513 if (match[7] != null) { | 1513 if (match[7] != null) { |
| 1514 source = match[7]; | 1514 source = match[7]; |
| 1515 if (source == "root") source = null; | 1515 if (source == "root") source = null; |
| 1516 } | 1516 } |
| 1517 | 1517 |
| 1518 return new PackageId(name, source, parsedVersion, description); | 1518 return new PackageId(name, source, parsedVersion, description); |
| 1519 } | 1519 } |
| OLD | NEW |