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

Side by Side Diff: packages/path/test/path_test.dart

Issue 1400473008: Roll Observatory packages and add a roll script (Closed) Base URL: git@github.com:dart-lang/observatory_pub_packages.git@master
Patch Set: Created 5 years, 2 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 unified diff | Download patch
« no previous file with comments | « packages/path/test/io_test.dart ('k') | packages/path/test/posix_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4
5 import 'package:unittest/unittest.dart';
6 import 'package:path/path.dart' as path;
7
8 main() {
9 group('path.Style', () {
10 test('name', () {
11 expect(path.Style.posix.name, 'posix');
12 expect(path.Style.windows.name, 'windows');
13 });
14
15 test('separator', () {
16 expect(path.Style.posix.separator, '/');
17 expect(path.Style.windows.separator, '\\');
18 });
19
20 test('toString()', () {
21 expect(path.Style.posix.toString(), 'posix');
22 expect(path.Style.windows.toString(), 'windows');
23 });
24 });
25
26 group('new Context()', () {
27 test('uses the given current directory', () {
28 var context = new path.Context(current: '/a/b/c');
29 expect(context.current, '/a/b/c');
30 });
31
32 test('uses the given style', () {
33 var context = new path.Context(style: path.Style.windows);
34 expect(context.style, path.Style.windows);
35 });
36 });
37
38 test('posix is a default Context for the POSIX style', () {
39 expect(path.posix.style, path.Style.posix);
40 expect(path.posix.current, ".");
41 });
42
43 test('windows is a default Context for the Windows style', () {
44 expect(path.windows.style, path.Style.windows);
45 expect(path.windows.current, ".");
46 });
47
48 test('url is a default Context for the URL style', () {
49 expect(path.url.style, path.Style.url);
50 expect(path.url.current, ".");
51 });
52 }
OLDNEW
« no previous file with comments | « packages/path/test/io_test.dart ('k') | packages/path/test/posix_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698