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

Side by Side Diff: packages/cli_util/test/cli_util_test.dart

Issue 2989763002: Update charted to 0.4.8 and roll (Closed)
Patch Set: Removed Cutch from list of reviewers Created 3 years, 4 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/cli_util/pubspec.yaml ('k') | packages/cli_util/tool/travis.sh » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 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. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import 'dart:io';
6
5 import 'package:cli_util/cli_util.dart'; 7 import 'package:cli_util/cli_util.dart';
6 import 'package:unittest/unittest.dart'; 8 import 'package:cli_util/src/utils.dart';
9 import 'package:test/test.dart';
10
11 main() => defineTests();
7 12
8 void defineTests() { 13 void defineTests() {
9 group('getSdkDir', () { 14 group('getSdkDir', () {
10 test('arg parsing', () { 15 test('arg parsing', () {
16 // ignore: deprecated_member_use
11 expect(getSdkDir(['--dart-sdk', '/dart/sdk']).path, equals('/dart/sdk')); 17 expect(getSdkDir(['--dart-sdk', '/dart/sdk']).path, equals('/dart/sdk'));
18 // ignore: deprecated_member_use
12 expect(getSdkDir(['--dart-sdk=/dart/sdk']).path, equals('/dart/sdk')); 19 expect(getSdkDir(['--dart-sdk=/dart/sdk']).path, equals('/dart/sdk'));
13 }); 20 });
21
22 test('finds the SDK without cli args', () {
23 // ignore: deprecated_member_use
24 expect(getSdkDir(), isNotNull);
25 });
26 });
27
28 group('getSdkPath', () {
29 test('sdkPath', () {
30 expect(getSdkPath(), isNotNull);
31 });
32 });
33
34 group('utils', () {
35 test('isSdkDir', () {
36 expect(isSdkDir(new Directory(getSdkPath())), true);
37 });
14 }); 38 });
15 } 39 }
16
17 main() {
18 groupSep = ' | ';
19
20 defineTests();
21 }
OLDNEW
« no previous file with comments | « packages/cli_util/pubspec.yaml ('k') | packages/cli_util/tool/travis.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698