summaryrefslogtreecommitdiffstats
path: root/ui-tests/tests/features.rs
blob: c760b8691ea3ae30277595f138781061d982fb71 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#![allow(unused_imports)]

#[test]
#[cfg(feature = "tokio-net")]
fn net_default() {
    use ui_tests::tokio_net::driver::{set_default, Handle, Reactor, Registration};
    use ui_tests::tokio_net::util::PollEvented;
}

#[test]
#[cfg(feature = "net-with-tcp")]
fn net_with_tcp() {
    use ui_tests::tokio_net::tcp;
}

#[test]
#[cfg(feature = "tokio-with-net")]
fn tokio_with_net() {
    // net is present
    use ui_tests::tokio::net;
}
#[test]
fn compile_fail() {
    let t = trybuild::TestCases::new();

    #[cfg(feature = "executor-without-current-thread")]
    t.compile_fail("tests/ui/executor_without_current_thread.rs");

    #[cfg(feature = "net-no-features")]
    t.compile_fail("tests/ui/net_without_tcp_missing_tcp.rs");

    #[cfg(feature = "tokio-no-features")]
    t.compile_fail("tests/ui/tokio_without_net_missing_net.rs");

    drop(t);
}