-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #64 from keertip/tests
add unit tests
- Loading branch information
Showing
3 changed files
with
142 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// Copyright (c) 2015, 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 dartdoc.package_utils_test; | ||
|
||
import 'dart:io'; | ||
|
||
import 'package:unittest/unittest.dart'; | ||
|
||
import '../lib/src/package_utils.dart'; | ||
|
||
tests() { | ||
group('package utils test', () { | ||
|
||
test('get package name', () { | ||
String name = getPackageName(Directory.current.path); | ||
expect(name, 'dartdoc'); | ||
}); | ||
|
||
test('get package version', () { | ||
String version = getPackageVersion(Directory.current.path); | ||
expect(version != null, true); | ||
}); | ||
|
||
test('get package description', () { | ||
String desc = getPackageDescription(Directory.current.path); | ||
expect(desc, 'A documentation generator for Dart.'); | ||
}); | ||
}); | ||
} |