diff options
Diffstat (limited to 'build-tests')
-rw-r--r-- | build-tests/Cargo.toml | 27 | ||||
-rw-r--r-- | build-tests/README.md | 2 | ||||
-rw-r--r-- | build-tests/src/lib.rs | 8 | ||||
-rw-r--r-- | build-tests/tests/fail/executor_without_current_thread.rs | 3 | ||||
-rw-r--r-- | build-tests/tests/fail/executor_without_current_thread.stderr | 7 | ||||
-rw-r--r-- | build-tests/tests/fail/macros_invalid_input.rs | 25 | ||||
-rw-r--r-- | build-tests/tests/fail/macros_invalid_input.stderr | 41 | ||||
-rw-r--r-- | build-tests/tests/fail/net_without_tcp_missing_tcp.rs | 4 | ||||
-rw-r--r-- | build-tests/tests/fail/net_without_tcp_missing_tcp.stderr | 7 | ||||
-rw-r--r-- | build-tests/tests/fail/net_without_udp_missing_udp.rs | 4 | ||||
-rw-r--r-- | build-tests/tests/fail/net_without_udp_missing_udp.stderr | 7 | ||||
-rw-r--r-- | build-tests/tests/fail/net_without_uds_missing_uds.rs | 4 | ||||
-rw-r--r-- | build-tests/tests/fail/net_without_uds_missing_uds.stderr | 7 | ||||
-rw-r--r-- | build-tests/tests/fail/tokio_without_net_missing_net.rs | 3 | ||||
-rw-r--r-- | build-tests/tests/fail/tokio_without_net_missing_net.stderr | 7 | ||||
-rw-r--r-- | build-tests/tests/features.rs | 62 |
16 files changed, 0 insertions, 218 deletions
diff --git a/build-tests/Cargo.toml b/build-tests/Cargo.toml deleted file mode 100644 index dfd4f8b4..00000000 --- a/build-tests/Cargo.toml +++ /dev/null @@ -1,27 +0,0 @@ -[package] -name = "build-tests" -version = "0.1.0" -authors = ["Tokio Contributors <team@tokio.rs>"] -edition = "2018" -publish = false - -[features] -executor-without-current-thread = ["tokio-executor"] -macros-invalid-input = ["tokio/rt-full"] -net-no-features = ["tokio-net"] -net-with-tcp = ["tokio-net/tcp"] -net-with-udp = ["tokio-net/udp"] -net-with-uds = ["tokio-net/uds"] -net-with-process = ["tokio-net/process"] -tokio-no-features = ["tokio"] -tokio-with-net = ["tokio/net"] - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -tokio-executor = { path = "../tokio-executor", optional = true } -tokio-net = { path = "../tokio-net", optional = true } -tokio = { path = "../tokio", optional = true, default-features = false } - -[dev-dependencies] -trybuild = "1.0" diff --git a/build-tests/README.md b/build-tests/README.md deleted file mode 100644 index f491e2bc..00000000 --- a/build-tests/README.md +++ /dev/null @@ -1,2 +0,0 @@ -Tests the various combination of feature flags. This is broken out to a separate -crate to work around limitations with cargo features. diff --git a/build-tests/src/lib.rs b/build-tests/src/lib.rs deleted file mode 100644 index 7f38a440..00000000 --- a/build-tests/src/lib.rs +++ /dev/null @@ -1,8 +0,0 @@ -#[cfg(feature = "tokio-executor")] -pub use tokio_executor; - -#[cfg(feature = "tokio-net")] -pub use tokio_net; - -#[cfg(feature = "tokio")] -pub use tokio; diff --git a/build-tests/tests/fail/executor_without_current_thread.rs b/build-tests/tests/fail/executor_without_current_thread.rs deleted file mode 100644 index 469bd966..00000000 --- a/build-tests/tests/fail/executor_without_current_thread.rs +++ /dev/null @@ -1,3 +0,0 @@ -use build_tests::tokio_executor::current_thread; - -fn main() {} diff --git a/build-tests/tests/fail/executor_without_current_thread.stderr b/build-tests/tests/fail/executor_without_current_thread.stderr deleted file mode 100644 index 13c2156f..00000000 --- a/build-tests/tests/fail/executor_without_current_thread.stderr +++ /dev/null @@ -1,7 +0,0 @@ -error[E0432]: unresolved import `build_tests::tokio_executor::current_thread` - --> $DIR/executor_without_current_thread.rs:1:5 - | -1 | use build_tests::tokio_executor::current_thread; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `current_thread` in `tokio_executor` - -For more information about this error, try `rustc --explain E0432`. diff --git a/build-tests/tests/fail/macros_invalid_input.rs b/build-tests/tests/fail/macros_invalid_input.rs deleted file mode 100644 index 4716f343..00000000 --- a/build-tests/tests/fail/macros_invalid_input.rs +++ /dev/null @@ -1,25 +0,0 @@ -use build_tests::tokio; - -#[tokio::main] -fn main_is_not_async() {} - -#[tokio::main(foo)] -async fn main_attr_has_unknown_args() {} - -#[tokio::main(threadpool::bar)] -async fn main_attr_has_path_args() {} - -#[tokio::test] -fn test_is_not_async() {} - -#[tokio::test] -async fn test_fn_has_args(_x: u8) {} - -#[tokio::test(foo)] -async fn test_attr_has_args() {} - -#[tokio::test] -#[test] -async fn test_has_second_test_attr() {} - -fn main() {} diff --git a/build-tests/tests/fail/macros_invalid_input.stderr b/build-tests/tests/fail/macros_invalid_input.stderr deleted file mode 100644 index 12373486..00000000 --- a/build-tests/tests/fail/macros_invalid_input.stderr +++ /dev/null @@ -1,41 +0,0 @@ -error: the async keyword is missing from the function declaration - --> $DIR/macros_invalid_input.rs:4:1 - | -4 | fn main_is_not_async() {} - | ^^ - -error: Unknown attribute foo is specified; expected `current_thread` or `threadpool` - --> $DIR/macros_invalid_input.rs:6:15 - | -6 | #[tokio::main(foo)] - | ^^^ - -error: Must have specified ident - --> $DIR/macros_invalid_input.rs:9:15 - | -9 | #[tokio::main(threadpool::bar)] - | ^^^^^^^^^^^^^^^ - -error: the async keyword is missing from the function declaration - --> $DIR/macros_invalid_input.rs:13:1 - | -13 | fn test_is_not_async() {} - | ^^ - -error: the test function cannot accept arguments - --> $DIR/macros_invalid_input.rs:16:27 - | -16 | async fn test_fn_has_args(_x: u8) {} - | ^^^^^^ - -error: Unknown attribute foo is specified; expected `current_thread` or `threadpool` - --> $DIR/macros_invalid_input.rs:18:15 - | -18 | #[tokio::test(foo)] - | ^^^ - -error: second test attribute is supplied - --> $DIR/macros_invalid_input.rs:22:1 - | -22 | #[test] - | ^^^^^^^ diff --git a/build-tests/tests/fail/net_without_tcp_missing_tcp.rs b/build-tests/tests/fail/net_without_tcp_missing_tcp.rs deleted file mode 100644 index c407e4ab..00000000 --- a/build-tests/tests/fail/net_without_tcp_missing_tcp.rs +++ /dev/null @@ -1,4 +0,0 @@ -use build_tests::tokio_net::tcp; - -fn main() {} - diff --git a/build-tests/tests/fail/net_without_tcp_missing_tcp.stderr b/build-tests/tests/fail/net_without_tcp_missing_tcp.stderr deleted file mode 100644 index 84e5a37b..00000000 --- a/build-tests/tests/fail/net_without_tcp_missing_tcp.stderr +++ /dev/null @@ -1,7 +0,0 @@ -error[E0432]: unresolved import `build_tests::tokio_net::tcp` - --> $DIR/net_without_tcp_missing_tcp.rs:1:5 - | -1 | use build_tests::tokio_net::tcp; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `tcp` in `tokio_net` - -For more information about this error, try `rustc --explain E0432`. diff --git a/build-tests/tests/fail/net_without_udp_missing_udp.rs b/build-tests/tests/fail/net_without_udp_missing_udp.rs deleted file mode 100644 index 56b726d2..00000000 --- a/build-tests/tests/fail/net_without_udp_missing_udp.rs +++ /dev/null @@ -1,4 +0,0 @@ -use build_tests::tokio_net::udp; - -fn main() {} - diff --git a/build-tests/tests/fail/net_without_udp_missing_udp.stderr b/build-tests/tests/fail/net_without_udp_missing_udp.stderr deleted file mode 100644 index 9ab2e8ba..00000000 --- a/build-tests/tests/fail/net_without_udp_missing_udp.stderr +++ /dev/null @@ -1,7 +0,0 @@ -error[E0432]: unresolved import `build_tests::tokio_net::udp` - --> $DIR/net_without_udp_missing_udp.rs:1:5 - | -1 | use build_tests::tokio_net::udp; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `udp` in `tokio_net` - -For more information about this error, try `rustc --explain E0432`. diff --git a/build-tests/tests/fail/net_without_uds_missing_uds.rs b/build-tests/tests/fail/net_without_uds_missing_uds.rs deleted file mode 100644 index fb0dece2..00000000 --- a/build-tests/tests/fail/net_without_uds_missing_uds.rs +++ /dev/null @@ -1,4 +0,0 @@ -use build_tests::tokio_net::uds; - -fn main() {} - diff --git a/build-tests/tests/fail/net_without_uds_missing_uds.stderr b/build-tests/tests/fail/net_without_uds_missing_uds.stderr deleted file mode 100644 index 7d9013e5..00000000 --- a/build-tests/tests/fail/net_without_uds_missing_uds.stderr +++ /dev/null @@ -1,7 +0,0 @@ -error[E0432]: unresolved import `build_tests::tokio_net::uds` - --> $DIR/net_without_uds_missing_uds.rs:1:5 - | -1 | use build_tests::tokio_net::uds; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `uds` in `tokio_net` - -For more information about this error, try `rustc --explain E0432`. diff --git a/build-tests/tests/fail/tokio_without_net_missing_net.rs b/build-tests/tests/fail/tokio_without_net_missing_net.rs deleted file mode 100644 index db5debe9..00000000 --- a/build-tests/tests/fail/tokio_without_net_missing_net.rs +++ /dev/null @@ -1,3 +0,0 @@ -use build_tests::tokio::net; - -fn main() {} diff --git a/build-tests/tests/fail/tokio_without_net_missing_net.stderr b/build-tests/tests/fail/tokio_without_net_missing_net.stderr deleted file mode 100644 index 234fcbb6..00000000 --- a/build-tests/tests/fail/tokio_without_net_missing_net.stderr +++ /dev/null @@ -1,7 +0,0 @@ -error[E0432]: unresolved import `build_tests::tokio::net` - --> $DIR/tokio_without_net_missing_net.rs:1:5 - | -1 | use build_tests::tokio::net; - | ^^^^^^^^^^^^^^^^^^^^^^^ no `net` in `tokio` - -For more information about this error, try `rustc --explain E0432`. diff --git a/build-tests/tests/features.rs b/build-tests/tests/features.rs deleted file mode 100644 index bc28fc85..00000000 --- a/build-tests/tests/features.rs +++ /dev/null @@ -1,62 +0,0 @@ -#![allow(unused_imports)] - -#[test] -#[cfg(feature = "tokio-net")] -fn net_default() { - use build_tests::tokio_net::driver::{set_default, Handle, Reactor, Registration}; - use build_tests::tokio_net::util::PollEvented; -} - -#[test] -#[cfg(feature = "net-with-tcp")] -fn net_with_tcp() { - use build_tests::tokio_net::tcp; -} - -#[test] -#[cfg(feature = "net-with-udp")] -fn net_with_udp() { - use build_tests::tokio_net::udp; -} - -#[test] -#[cfg(feature = "net-with-uds")] -fn net_with_uds() { - use build_tests::tokio_net::uds; -} - -#[test] -#[cfg(feature = "net-with-process")] -fn net_with_process() { - use build_tests::tokio_net::process; -} - -#[test] -#[cfg(feature = "tokio-with-net")] -fn tokio_with_net() { - // net is present - use build_tests::tokio::net; -} - -#[test] -fn compile_fail() { - let t = trybuild::TestCases::new(); - - #[cfg(feature = "executor-without-current-thread")] - t.compile_fail("tests/fail/executor_without_current_thread.rs"); - - #[cfg(feature = "macros-invalid-input")] - t.compile_fail("tests/fail/macros_invalid_input.rs"); - - #[cfg(feature = "net-no-features")] - { - t.compile_fail("tests/fail/net_without_tcp_missing_tcp.rs"); - t.compile_fail("tests/fail/net_without_udp_missing_udp.rs"); - t.compile_fail("tests/fail/net_without_uds_missing_uds.rs"); - } - - #[cfg(feature = "tokio-no-features")] - t.compile_fail("tests/fail/tokio_without_net_missing_net.rs"); - - drop(t); -} |