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

Unified Diff: pkg/unittest/unittest.dart

Issue 11229063: Fixed unittest documentation to use new import syntax. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/unittest/unittest.dart
diff --git a/pkg/unittest/unittest.dart b/pkg/unittest/unittest.dart
index 29a18c893c3cfbdcf30db493a63af5c0197e71f9..83b3b497f05785ba4cc0d39591a982da0f9823f5 100644
--- a/pkg/unittest/unittest.dart
+++ b/pkg/unittest/unittest.dart
@@ -5,8 +5,19 @@
/**
* A library for writing dart unit tests.
*
- * To import this library, specify the relative path to
- * pkg/unittest/unittest.dart.
+ * To import this library, use the pub package manager.
+ * Create a pubspec.yaml file in your project and add
+ * a dependancies for unittest with the following lines:
Bob Nystrom 2012/10/23 18:08:55 "dependancies for" -> "dependency on"
butlermatt 2012/10/23 19:50:30 Done.
+ * name: my_app
Bob Nystrom 2012/10/23 18:08:55 You can probably omit this line.
butlermatt 2012/10/23 19:50:30 Done.
+ * dependancies:
Bob Nystrom 2012/10/23 18:08:55 "dependancies" -> "dependencies"
butlermatt 2012/10/23 19:50:30 Done.
+ * unittest:
+ * sdk: unittest
+ *
+ * Then run 'pub install' from your project directory or using
+ * the DartEditor
Bob Nystrom 2012/10/23 18:08:55 Add a ".".
butlermatt 2012/10/23 19:50:30 Done.
+ *
+ * Please see [Pub Getting Started](http://pub.dartlang.org/doc)
+ * for more details about the pub package manager.
*
* ##Concepts##
*
@@ -24,7 +35,7 @@
*
* A trivial test:
*
- * #import('path-to-dart/pkg/unittest/unitest.dart');
+ * import 'package:unittest/unitest.dart';
Bob Nystrom 2012/10/23 18:08:55 Not related to your change, but we might as well f
butlermatt 2012/10/23 19:50:30 Done.
* main() {
* test('this is a test', () {
* int x = 2 + 3;
@@ -34,7 +45,7 @@
*
* Multiple tests:
*
- * #import('path-to-dart/pkg/unittest/unitest.dart');
+ * import 'package:unittest/unitest.dart';
* main() {
* test('this is a test', () {
* int x = 2 + 3;
@@ -48,7 +59,7 @@
*
* Multiple tests, grouped by category:
*
- * #import('path-to-dart/pkg/unittest/unitest.dart');
+ * import 'package:unittest/unitest.dart';
* main() {
* group('group A', () {
* test('test A.1', () {
@@ -74,8 +85,8 @@
* that callback is run. A count argument can be provided to specify the number
* of times the callback should be called (the default is 1).
*
- * #import('path-to-dart/pkg/unittest/unitest.dart');
- * #import('dart:html');
+ * import 'package:unittest/unitest.dart';
+ * import 'dart:html';
Bob Nystrom 2012/10/23 18:08:55 How about changing this to import 'dart:isolate' a
butlermatt 2012/10/23 19:50:30 Done.
* main() {
* test('calllback is executed once', () {
* // wrap the callback of an asynchronous call with [expectAsync0] if
@@ -115,8 +126,8 @@
* arguments or that take named parameters. (this is not implemented yet,
* but will be coming here soon).
*
- * #import('path-to-dart/pkg/unittest/unitest.dart');
- * #import('dart:html');
+ * import 'path-to-dart/pkg/unittest/unitest.dart';
+ * import 'dart:html';
* main() {
* test('calllback is executed', () {
* // indicate ahead of time that an async callback is expected.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698