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

Side by Side Diff: sdk/lib/_internal/pub/test/implicit_barback_dependency_test.dart

Issue 602253002: Use pub_semver package in pub. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 2 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 import 'package:pub_semver/pub_semver.dart';
6
5 import 'descriptor.dart' as d; 7 import 'descriptor.dart' as d;
6 import 'test_pub.dart'; 8 import 'test_pub.dart';
7 import '../lib/src/barback.dart' as barback; 9 import '../lib/src/barback.dart' as barback;
8 import '../lib/src/version.dart';
9 10
10 main() { 11 main() {
11 initConfig(); 12 initConfig();
12 13
13 var constraint = barback.pubConstraints["barback"]; 14 var constraint = barback.pubConstraints["barback"];
14 var current = constraint.min.toString(); 15 var current = constraint.min.toString();
15 var previous = new Version(constraint.min.major, constraint.min.minor - 1, 0) 16 var previous = new Version(constraint.min.major, constraint.min.minor - 1, 0)
16 .toString(); 17 .toString();
17 var nextPatch = constraint.min.nextPatch.toString(); 18 var nextPatch = constraint.min.nextPatch.toString();
18 var max = constraint.max.toString(); 19 var max = constraint.max.toString();
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 }); 150 });
150 151
151 d.appDir({"barback": previous}).create(); 152 d.appDir({"barback": previous}).create();
152 153
153 pubGet(error: """ 154 pubGet(error: """
154 Incompatible version constraints on barback: 155 Incompatible version constraints on barback:
155 - myapp 0.0.0 depends on version $previous 156 - myapp 0.0.0 depends on version $previous
156 - pub itself depends on version >=$current <$max"""); 157 - pub itself depends on version >=$current <$max""");
157 }); 158 });
158 } 159 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/pub/lib/src/version.dart ('k') | sdk/lib/_internal/pub/test/implicit_dependency_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698