Sha256: 627024ccadfe95194469d5bae2cc29b897b0118a664d7222408a2e234a10e939

Contents?: true

Size: 722 Bytes

Versions: 25

Compression:

Stored size: 722 Bytes

Contents

use futures::{
    executor::block_on,
    future::{self, FutureExt},
    join, ready,
    task::Poll,
    try_join,
};

#[test]
fn ready() {
    block_on(future::poll_fn(|_| {
        ready!(Poll::Ready(()),);
        Poll::Ready(())
    }))
}

#[test]
fn poll() {
    use futures::poll;

    block_on(async {
        let _ = poll!(async {}.boxed(),);
    })
}

#[test]
fn join() {
    block_on(async {
        let future1 = async { 1 };
        let future2 = async { 2 };
        join!(future1, future2,);
    })
}

#[test]
fn try_join() {
    block_on(async {
        let future1 = async { 1 }.never_error();
        let future2 = async { 2 }.never_error();
        try_join!(future1, future2,)
    })
    .unwrap();
}

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
wasmtime-28.0.0 ./ext/cargo-vendor/futures-0.3.31/tests/macro_comma_support.rs
wasmtime-27.0.0 ./ext/cargo-vendor/futures-0.3.31/tests/macro_comma_support.rs
wasmtime-26.0.0 ./ext/cargo-vendor/futures-0.3.31/tests/macro_comma_support.rs
wasmtime-25.0.2 ./ext/cargo-vendor/futures-0.3.30/tests/macro_comma_support.rs
wasmtime-25.0.1 ./ext/cargo-vendor/futures-0.3.30/tests/macro_comma_support.rs
wasmtime-25.0.0 ./ext/cargo-vendor/futures-0.3.30/tests/macro_comma_support.rs
wasmtime-24.0.0 ./ext/cargo-vendor/futures-0.3.30/tests/macro_comma_support.rs
wasmtime-23.0.2 ./ext/cargo-vendor/futures-0.3.30/tests/macro_comma_support.rs
wasmtime-22.0.0 ./ext/cargo-vendor/futures-0.3.30/tests/macro_comma_support.rs
wasmtime-21.0.1 ./ext/cargo-vendor/futures-0.3.30/tests/macro_comma_support.rs
wasmtime-20.0.2 ./ext/cargo-vendor/futures-0.3.30/tests/macro_comma_support.rs
wasmtime-20.0.0 ./ext/cargo-vendor/futures-0.3.30/tests/macro_comma_support.rs
wasmtime-18.0.3 ./ext/cargo-vendor/futures-0.3.30/tests/macro_comma_support.rs
wasmtime-17.0.1 ./ext/cargo-vendor/futures-0.3.30/tests/macro_comma_support.rs
wasmtime-17.0.0 ./ext/cargo-vendor/futures-0.3.30/tests/macro_comma_support.rs
wasmtime-16.0.0 ./ext/cargo-vendor/futures-0.3.30/tests/macro_comma_support.rs
wasmtime-15.0.1 ./ext/cargo-vendor/futures-0.3.30/tests/macro_comma_support.rs
wasmtime-15.0.0 ./ext/cargo-vendor/futures-0.3.30/tests/macro_comma_support.rs
wasmtime-14.0.4 ./ext/cargo-vendor/futures-0.3.28/tests/macro_comma_support.rs
wasmtime-14.0.3 ./ext/cargo-vendor/futures-0.3.28/tests/macro_comma_support.rs