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

Unified Diff: pkg/unittest/test/async_exception_with_future_test.dart

Issue 416133002: Abort unit tests in the event of async failure while awaiting a future. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 5 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/test/async_exception_with_future_test.dart
diff --git a/pkg/unittest/test/async_exception_test.dart b/pkg/unittest/test/async_exception_with_future_test.dart
similarity index 75%
copy from pkg/unittest/test/async_exception_test.dart
copy to pkg/unittest/test/async_exception_with_future_test.dart
index 85744165d797b30e1a00f576a4dfaaa4d3624727..086e044e70165640d150d84224d1e931e8897bca 100644
--- a/pkg/unittest/test/async_exception_test.dart
+++ b/pkg/unittest/test/async_exception_with_future_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
@@ -11,12 +11,12 @@ import 'package:unittest/unittest.dart';
part 'utils.dart';
-var testName = 'async exception test';
+var testName = 'async exception with future test';
var testFunction = (_) {
test(testName, () {
- expectAsync(() {});
_defer(() { throw "error!"; });
+ return new Completer().future;
kevmoo 2014/07/29 19:59:02 Add a note that the goal is to terminate the test
Paul Berry 2014/07/29 21:54:38 Done.
});
};
kevmoo 2014/07/29 19:59:01 Could you also test that teardown is still called?
Paul Berry 2014/07/29 21:54:38 Done.

Powered by Google App Engine
This is Rietveld 408576698