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

Unified Diff: mojo/public/dart/third_party/path/test/path_test.dart

Issue 1346773002: Stop running pub get at gclient sync time and fix build bugs (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 3 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
Index: mojo/public/dart/third_party/path/test/path_test.dart
diff --git a/mojo/public/dart/third_party/path/test/path_test.dart b/mojo/public/dart/third_party/path/test/path_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..19397cf8d3c86e9cc88199812f29f8566b99b464
--- /dev/null
+++ b/mojo/public/dart/third_party/path/test/path_test.dart
@@ -0,0 +1,52 @@
+// 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.
+
+import 'package:unittest/unittest.dart';
+import 'package:path/path.dart' as path;
+
+main() {
+ group('path.Style', () {
+ test('name', () {
+ expect(path.Style.posix.name, 'posix');
+ expect(path.Style.windows.name, 'windows');
+ });
+
+ test('separator', () {
+ expect(path.Style.posix.separator, '/');
+ expect(path.Style.windows.separator, '\\');
+ });
+
+ test('toString()', () {
+ expect(path.Style.posix.toString(), 'posix');
+ expect(path.Style.windows.toString(), 'windows');
+ });
+ });
+
+ group('new Context()', () {
+ test('uses the given current directory', () {
+ var context = new path.Context(current: '/a/b/c');
+ expect(context.current, '/a/b/c');
+ });
+
+ test('uses the given style', () {
+ var context = new path.Context(style: path.Style.windows);
+ expect(context.style, path.Style.windows);
+ });
+ });
+
+ test('posix is a default Context for the POSIX style', () {
+ expect(path.posix.style, path.Style.posix);
+ expect(path.posix.current, ".");
+ });
+
+ test('windows is a default Context for the Windows style', () {
+ expect(path.windows.style, path.Style.windows);
+ expect(path.windows.current, ".");
+ });
+
+ test('url is a default Context for the URL style', () {
+ expect(path.url.style, path.Style.url);
+ expect(path.url.current, ".");
+ });
+}
« no previous file with comments | « mojo/public/dart/third_party/path/test/io_test.dart ('k') | mojo/public/dart/third_party/path/test/posix_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698