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

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

Issue 11791031: Some minor small fixes to unittest (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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
« no previous file with comments | « pkg/unittest/lib/src/config.dart ('k') | pkg/unittest/lib/src/future_matchers.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/unittest/lib/src/core_matchers.dart
diff --git a/pkg/unittest/lib/src/core_matchers.dart b/pkg/unittest/lib/src/core_matchers.dart
index 7855ed9207064b542d79a03d8c58daa75004d0b1..74e8366b6276f7cfb521cf002bee095833a825e9 100644
--- a/pkg/unittest/lib/src/core_matchers.dart
+++ b/pkg/unittest/lib/src/core_matchers.dart
@@ -284,10 +284,10 @@ class Throws extends BaseMatcher {
if (item is Future) {
// Queue up an asynchronous expectation that validates when the future
// completes.
- item.then((value) {
+ item.then(wrapAsync((value) {
expect(false, isTrue, reason:
"Expected future to fail, but succeeded with '$value'.");
- });
+ }));
item.catchError((e) {
var reason;
« no previous file with comments | « pkg/unittest/lib/src/config.dart ('k') | pkg/unittest/lib/src/future_matchers.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698