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

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

Issue 130173010: pkg/unittest: Run each test in a Zone (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: long line Created 6 years, 11 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
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 08dd45868ee6b3a1da9fbabcaa76c83378ead782..16b5cadadd79e13ed20b4a9a3677aadd92f8baa4 100644
--- a/pkg/unittest/lib/src/spread_args_helper.dart
+++ b/pkg/unittest/lib/src/spread_args_helper.dart
@@ -120,4 +120,15 @@ class _SpreadArgsHelper {
},
after, testCase);
}
+
+ _guardAsync(Function tryBody, Function finallyBody, TestCase testCase) {
Siggi Cherem (dart-lang) 2014/02/04 02:20:05 I thought we were going to get rid of this too (si
kevmoo 2014/02/04 02:26:18 This is still used by the expectAsync logic. I'm l
Siggi Cherem (dart-lang) 2014/02/04 02:42:01 I meant, I thought you were going to get rid of it
+ assert(testCase != null);
+ try {
+ return tryBody();
+ } catch (e, trace) {
+ _registerException(testCase, e, trace);
+ } finally {
+ if (finallyBody != null) finallyBody();
+ }
+ }
}

Powered by Google App Engine
This is Rietveld 408576698