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

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

Issue 133313004: pkg/unittest: Run tests in zones (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: nit Created 6 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 | « pkg/unittest/lib/html_config.dart ('k') | pkg/unittest/lib/unittest.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/unittest/lib/src/spread_args_helper.dart
diff --git a/pkg/unittest/lib/src/spread_args_helper.dart b/pkg/unittest/lib/src/spread_args_helper.dart
index c5298e43a882849c8cbf2bfaabd680a6b42a4690..41411b93780f4f2d68f4f6941dad6186b668f4f4 100644
--- a/pkg/unittest/lib/src/spread_args_helper.dart
+++ b/pkg/unittest/lib/src/spread_args_helper.dart
@@ -119,4 +119,15 @@ class _SpreadArgsHelper {
},
after, testCase);
}
+
+ _guardAsync(Function tryBody, Function finallyBody, TestCase testCase) {
+ assert(testCase != null);
+ try {
+ return tryBody();
+ } catch (e, trace) {
+ _registerException(testCase, e, trace);
+ } finally {
+ if (finallyBody != null) finallyBody();
+ }
+ }
}
« no previous file with comments | « pkg/unittest/lib/html_config.dart ('k') | pkg/unittest/lib/unittest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698