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

Unified Diff: sdk/lib/_internal/pub/test/version_test.dart

Issue 173113004: Improve the "pub lish" warnings about dependency constraints. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: code review Created 6 years, 10 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 | « sdk/lib/_internal/pub/test/validator/dependency_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/pub/test/version_test.dart
diff --git a/sdk/lib/_internal/pub/test/version_test.dart b/sdk/lib/_internal/pub/test/version_test.dart
index 0e7452a6524e2cf5db919df1b986e9084d3e4ff5..8e6a8254e4d115b485824b028d4f322c8d40dc71 100644
--- a/sdk/lib/_internal/pub/test/version_test.dart
+++ b/sdk/lib/_internal/pub/test/version_test.dart
@@ -207,18 +207,21 @@ main() {
group('constructor', () {
test('takes a min and max', () {
var range = new VersionRange(min: v123, max: v124);
+ expect(range.isAny, isFalse);
expect(range.min, equals(v123));
expect(range.max, equals(v124));
});
test('allows omitting max', () {
var range = new VersionRange(min: v123);
+ expect(range.isAny, isFalse);
expect(range.min, equals(v123));
expect(range.max, isNull);
});
test('allows omitting min and max', () {
var range = new VersionRange();
+ expect(range.isAny, isTrue);
expect(range.min, isNull);
expect(range.max, isNull);
});
@@ -367,6 +370,7 @@ main() {
test('empty', () {
expect(VersionConstraint.empty.isEmpty, isTrue);
+ expect(VersionConstraint.empty.isAny, isFalse);
expect(VersionConstraint.empty, doesNotAllow([
new Version.parse('0.0.0-blah'),
new Version.parse('1.2.3'),
« no previous file with comments | « sdk/lib/_internal/pub/test/validator/dependency_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698