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

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

Issue 69723004: Get rid of DART_SDK in pub. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Revise. 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/test/real_version_test.dart ('k') | sdk/lib/_internal/pub/test/test_pub.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/pub/test/sdk_test.dart
diff --git a/sdk/lib/_internal/pub/test/sdk_test.dart b/sdk/lib/_internal/pub/test/sdk_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..6cec3e9f17c3cff28ed6cfe448e1461acc94570b
--- /dev/null
+++ b/sdk/lib/_internal/pub/test/sdk_test.dart
@@ -0,0 +1,26 @@
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library pub_tests;
+
+import 'package:unittest/unittest.dart';
+
+import '../lib/src/sdk.dart' as sdk;
+import '../lib/src/version.dart';
+
+main() {
+ group("parseVersion()", () {
+ test("parses a release-style version", () {
+ expect(sdk.parseVersion("0.1.2.0_r17645"),
+ equals(new Version.parse("0.1.2+0.r17645")));
+ });
+
+ test("parses a dev-only style version", () {
+ // The "version" file generated on developer builds is a little funky and
+ // we need to make sure we don't choke on it.
+ expect(sdk.parseVersion("0.1.2.0_r16279_bobross"),
+ equals(new Version.parse("0.1.2+0.r16279.bobross")));
+ });
+ });
+}
« no previous file with comments | « sdk/lib/_internal/pub/test/real_version_test.dart ('k') | sdk/lib/_internal/pub/test/test_pub.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698