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(); |
+ } |
+ } |
} |