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

Unified 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, 5 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
« no previous file with comments | « packages/cli_util/pubspec.yaml ('k') | packages/cli_util/tool/travis.sh » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: packages/cli_util/test/cli_util_test.dart
diff --git a/packages/cli_util/test/cli_util_test.dart b/packages/cli_util/test/cli_util_test.dart
index b7b78228a0bf5b43afdac3750ac0c1a2bbfbc316..82fb83c54a64761c205b4ab51b82b4fa7c04eb55 100644
--- a/packages/cli_util/test/cli_util_test.dart
+++ b/packages/cli_util/test/cli_util_test.dart
@@ -2,20 +2,38 @@
// 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 'dart:io';
+
import 'package:cli_util/cli_util.dart';
-import 'package:unittest/unittest.dart';
+import 'package:cli_util/src/utils.dart';
+import 'package:test/test.dart';
+
+main() => defineTests();
void defineTests() {
group('getSdkDir', () {
test('arg parsing', () {
+ // ignore: deprecated_member_use
expect(getSdkDir(['--dart-sdk', '/dart/sdk']).path, equals('/dart/sdk'));
+ // ignore: deprecated_member_use
expect(getSdkDir(['--dart-sdk=/dart/sdk']).path, equals('/dart/sdk'));
});
+
+ test('finds the SDK without cli args', () {
+ // ignore: deprecated_member_use
+ expect(getSdkDir(), isNotNull);
+ });
});
-}
-main() {
- groupSep = ' | ';
+ group('getSdkPath', () {
+ test('sdkPath', () {
+ expect(getSdkPath(), isNotNull);
+ });
+ });
- defineTests();
+ group('utils', () {
+ test('isSdkDir', () {
+ expect(isSdkDir(new Directory(getSdkPath())), true);
+ });
+ });
}
« 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