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

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

Issue 12836007: Fix for returned Futures in unittest (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: another case where I went too far Created 7 years, 9 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 | pkg/unittest/test/unittest_test.dart » ('j') | pkg/unittest/test/unittest_test.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/unittest/lib/src/test_case.dart
diff --git a/pkg/unittest/lib/src/test_case.dart b/pkg/unittest/lib/src/test_case.dart
index 7eb835f735076af8f28f34c8420b26bfee9f7b84..f8eb233530ddb98ad409d0c9db82ed12c344c48c 100644
--- a/pkg/unittest/lib/src/test_case.dart
+++ b/pkg/unittest/lib/src/test_case.dart
@@ -82,9 +82,8 @@ class TestCase {
var f = testFunction();
--_callbackFunctionsOutstanding;
if (f is Future) {
- f.then((_) => _finishTest())
+ return f.then((_) => _finishTest())
.catchError((e) => fail("${e.error}"));
- return f;
} else {
_finishTest();
return null;
« no previous file with comments | « no previous file | pkg/unittest/test/unittest_test.dart » ('j') | pkg/unittest/test/unittest_test.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698