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

Unified Diff: pkg/unittest/lib/unittest.dart

Issue 12340100: Make unit-test not create a fixed-length list of tests. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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/lib/unittest.dart
diff --git a/pkg/unittest/lib/unittest.dart b/pkg/unittest/lib/unittest.dart
index b7280dcb11d1eed6d97861492023b33d8886b98e..f453b7f925340d940be3a1c80020519bb93ad7f6 100644
--- a/pkg/unittest/lib/unittest.dart
+++ b/pkg/unittest/lib/unittest.dart
@@ -113,14 +113,14 @@
* callback should be protected within a call to guardAsync(); this will ensure
* that exceptions are properly handled.
*
- * A variation on this is expectAsyncUntilX(), which takes a callback as the
+ * A variation on this is expectAsyncUntilX(), which takes a callback as the
* first parameter and a predicate function as the second parameter; after each
* time * the callback is called, the predicate function will be called; if it
* returns false the test will still be considered incomplete.
*
* Test functions can return [Future]s, which provide another way of doing
* asynchronous tests. The test framework will handle exceptions thrown by
- * the Future, and will advance to the next test when the Future is complete.
+ * the Future, and will advance to the next test when the Future is complete.
* It is still important to use expectAsync/guardAsync with any parts of the
* test that may be invoked from a top level context (for example, with
* Timer.run()], as the Future exception handler may not capture exceptions
@@ -725,7 +725,7 @@ void filterTests(testFilter) {
} else if (testFilter is Function) {
filterFunction = testFilter;
}
- _tests = _tests.where(filterFunction).toList();
+ _tests.retainMatching(filterFunction);
}
/** Runs all queued tests, one at a time. */
« 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