mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-09-06 00:00:10 +02:00
macros: add build tests for #[tokio::main] and #[tokio::test] (#1591)
This commit is contained in:
@@ -37,6 +37,7 @@ fn tokio_with_net() {
|
||||
// net is present
|
||||
use build_tests::tokio::net;
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn compile_fail() {
|
||||
let t = trybuild::TestCases::new();
|
||||
@@ -44,6 +45,9 @@ fn compile_fail() {
|
||||
#[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");
|
||||
|
||||
Reference in New Issue
Block a user