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

Unified Diff: lib/test.dart

Issue 1369613002: setUp/tearDown may be called repeatedly in a group. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Code review changes Created 5 years, 3 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 | « lib/src/backend/group.dart ('k') | test/backend/declarer_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/test.dart
diff --git a/lib/test.dart b/lib/test.dart
index c74ac9a0a434fa7f70da35e8155bce3f4b2b033e..05bb8fed34f7960a369e7000b129e506d2deb944 100644
--- a/lib/test.dart
+++ b/lib/test.dart
@@ -169,6 +169,9 @@ void group(String description, void body(), {String testOn, Timeout timeout,
/// If this is called within a test group, it applies only to tests in that
/// group. [callback] will be run after any set-up callbacks in parent groups or
/// at the top level.
+///
+/// Each callback at the top level or in a given group will be run in the order
+/// they were declared.
void setUp(callback()) => _declarer.setUp(callback);
/// Registers a function to be run after tests.
@@ -179,6 +182,9 @@ void setUp(callback()) => _declarer.setUp(callback);
/// If this is called within a test group, it applies only to tests in that
/// group. [callback] will be run before any tear-down callbacks in parent
/// groups or at the top level.
+///
+/// Each callback at the top level or in a given group will be run in the
+/// reverse of the order they were declared.
void tearDown(callback()) => _declarer.tearDown(callback);
/// Registers an exception that was caught for the current test.
« no previous file with comments | « lib/src/backend/group.dart ('k') | test/backend/declarer_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698