-
Notifications
You must be signed in to change notification settings - Fork 6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add asyncExpectThrows<T>() to async_helper.
This lets you test that a callback returns a Future that completes to a given error. Like Expect.throws(), but async. At first, I added support for this directly to Expect.throws(), but I think it's better to minimize the amount of dynamic logic going on in the language test framework. I was worried about having to duplicate all of the Expect.throws___() convenience functions but now that we have generic methods, those functions aren't that much more convenient. Change-Id: I8b288945611fa16f8d27056f3cf79181fc22d256 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97881 Reviewed-by: William Hesse <whesse@google.com>
- Loading branch information
1 parent
994f535
commit ffee99d
Showing
2 changed files
with
72 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters