Crate tokio_test
source ·Expand description
Tokio and Futures based testing utilities
Modules§
- A mock type implementing
AsyncRead
andAsyncWrite
. - A mock stream implementing
Stream
. - Futures task based helpers to easily test futures and manually written futures.
Macros§
- Asserts that an exact duration has elapsed since the start instant ±1ms.
- Asserts that the expression evaluates to
Err
and returns the error. - Asserts that the expression evaluates to
Ok
and returns the value. - Asserts a
Poll
is pending. - Asserts a
Poll
is ready, returning the value. - Asserts if a poll is ready and check for equality on the value
- Asserts a
Poll<Result<...>>
is ready andErr
, returning the error. - Asserts a
Poll<Result<...>>
is ready andOk
, returning the value.
Functions§
- Runs the provided future, blocking the current thread until the future completes.