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

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

Issue 62103010: Properly handle leading zeros in pub version numbers. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: code review Created 7 years, 1 month 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/lib/src/version.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 ee00e6ebb048680cc375f225f91ae7d9999a829b..f2c8c2c35303ffe20086ff886afeae5fec7a4471 100644
--- a/sdk/lib/_internal/pub/test/version_test.dart
+++ b/sdk/lib/_internal/pub/test/version_test.dart
@@ -80,6 +80,16 @@ main() {
}
}
});
+
+ test('equality', () {
+ expect(new Version.parse('01.2.3'), equals(new Version.parse('1.2.3')));
+ expect(new Version.parse('1.02.3'), equals(new Version.parse('1.2.3')));
+ expect(new Version.parse('1.2.03'), equals(new Version.parse('1.2.3')));
+ expect(new Version.parse('1.2.3-01'),
+ equals(new Version.parse('1.2.3-1')));
+ expect(new Version.parse('1.2.3+01'),
+ equals(new Version.parse('1.2.3+1')));
+ });
});
test('allows()', () {
« no previous file with comments | « sdk/lib/_internal/pub/lib/src/version.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698