[][src]Crate tokio_test

Tokio and Futures based testing utilites

Modules

io

A mock type implementing AsyncRead and AsyncWrite.

task

Futures task based helpers

Macros

assert_err

Asserts that the expression evaluates to Err and returns the error.

assert_ok

Asserts that the expression evaluates to Ok and returns the value.

assert_pending

Asserts a Poll is pending.

assert_ready

Asserts a Poll is ready, returning the value.

assert_ready_eq

Asserts if a poll is ready and check for equality on the value

assert_ready_err

Asserts a Poll<Result<...>> is ready and Err, returning the error.

assert_ready_ok

Asserts a Poll<Result<...>> is ready and Ok, returning the value.

Functions

block_on

Runs the provided future, blocking the current thread until the future completes.