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

Unified Diff: utils/tests/pub/version_test.dart

Issue 12038038: Add support for specifying SDK version constraints in pubspecs. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Clean up a bit. Created 7 years, 11 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 | « utils/tests/pub/version_solver_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/tests/pub/version_test.dart
diff --git a/utils/tests/pub/version_test.dart b/utils/tests/pub/version_test.dart
index d3fa7e5d1cb686cff7d88b1240d486e921d805f3..d5b1849870e84d4387d021390f53978a77a05c5c 100644
--- a/utils/tests/pub/version_test.dart
+++ b/utils/tests/pub/version_test.dart
@@ -5,6 +5,7 @@
library version_test;
import '../../../pkg/unittest/lib/unittest.dart';
+import 'test_pub.dart';
import '../../pub/utils.dart';
import '../../pub/version.dart';
@@ -302,8 +303,20 @@ main() {
});
group('VersionConstraint', () {
+ test('any', () {
+ expect(VersionConstraint.any.isAny, isTrue);
+ expect(VersionConstraint.any, allows([
+ new Version.parse('0.0.0-blah'),
+ new Version.parse('1.2.3'),
+ new Version.parse('12345.678.90')]));
+ });
+
test('empty', () {
- expect(new VersionConstraint.empty().isEmpty, isTrue);
+ expect(VersionConstraint.empty.isEmpty, isTrue);
+ expect(VersionConstraint.empty, doesNotAllow([
+ new Version.parse('0.0.0-blah'),
+ new Version.parse('1.2.3'),
+ new Version.parse('12345.678.90')]));
});
group('parse()', () {
« no previous file with comments | « utils/tests/pub/version_solver_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698