#![feature(prelude_import)]
#[prelude_import]
use std::prelude::rust_2021::*;
#[macro_use]
extern crate std;
extern crate test;
#[cfg(test)]
#[rustc_test_marker = "empty"]
pub const empty: test::TestDescAndFn = test::TestDescAndFn {
desc: test::TestDesc {
name: test::StaticTestName("empty"),
ignore: false,
ignore_message: ::core::option::Option::None,
source_file: "async-entry/tests/it.rs",
start_line: 2usize,
start_col: 10usize,
end_line: 2usize,
end_col: 15usize,
compile_fail: false,
no_run: false,
should_panic: test::ShouldPanic::No,
test_type: test::TestType::IntegrationTest,
},
testfn: test::StaticTestFn(|| test::assert_test_result(empty())),
};
fn empty() {
let body = async {};
#[allow(unused_mut)]
let mut rt = monoio::RuntimeBuilder::<monoio::FusionDriver>::new()
.enable_all()
.build()
.expect("Failed building the Runtime");
#[allow(clippy::expect_used)]
rt.block_on(body);
}
extern crate test;
#[cfg(test)]
#[rustc_test_marker = "empty_with_parentheses"]
pub const empty_with_parentheses: test::TestDescAndFn = test::TestDescAndFn {
desc: test::TestDesc {
name: test::StaticTestName("empty_with_parentheses"),
ignore: false,
ignore_message: ::core::option::Option::None,
source_file: "async-entry/tests/it.rs",
start_line: 5usize,
start_col: 10usize,
end_line: 5usize,
end_col: 32usize,
compile_fail: false,
no_run: false,
should_panic: test::ShouldPanic::No,
test_type: test::TestType::IntegrationTest,
},
testfn: test::StaticTestFn(|| test::assert_test_result(empty_with_parentheses())),
};
fn empty_with_parentheses() {
let body = async {};
#[allow(unused_mut)]
let mut rt = monoio::RuntimeBuilder::<monoio::FusionDriver>::new()
.enable_all()
.build()
.expect("Failed building the Runtime");
#[allow(clippy::expect_used)]
rt.block_on(body);
}
extern crate test;
#[cfg(test)]
#[rustc_test_marker = "empty_tail_expr"]
pub const empty_tail_expr: test::TestDescAndFn = test::TestDescAndFn {
desc: test::TestDesc {
name: test::StaticTestName("empty_tail_expr"),
ignore: false,
ignore_message: ::core::option::Option::None,
source_file: "async-entry/tests/it.rs",
start_line: 8usize,
start_col: 10usize,
end_line: 8usize,
end_col: 25usize,
compile_fail: false,
no_run: false,
should_panic: test::ShouldPanic::No,
test_type: test::TestType::IntegrationTest,
},
testfn: test::StaticTestFn(|| test::assert_test_result(empty_tail_expr())),
};
fn empty_tail_expr() -> anyhow::Result<()> {
let body = async { Ok(()) };
#[allow(unused_mut)]
let mut rt = monoio::RuntimeBuilder::<monoio::FusionDriver>::new()
.enable_all()
.build()
.expect("Failed building the Runtime");
#[allow(clippy::expect_used)]
rt.block_on(body)
}
extern crate test;
#[cfg(test)]
#[rustc_test_marker = "empty_return_expr"]
pub const empty_return_expr: test::TestDescAndFn = test::TestDescAndFn {
desc: test::TestDesc {
name: test::StaticTestName("empty_return_expr"),
ignore: false,
ignore_message: ::core::option::Option::None,
source_file: "async-entry/tests/it.rs",
start_line: 13usize,
start_col: 10usize,
end_line: 13usize,
end_col: 27usize,
compile_fail: false,
no_run: false,
should_panic: test::ShouldPanic::No,
test_type: test::TestType::IntegrationTest,
},
testfn: test::StaticTestFn(|| test::assert_test_result(empty_return_expr())),
};
fn empty_return_expr() -> anyhow::Result<()> {
let body = async {
return Ok(());
};
#[allow(unused_mut)]
let mut rt = monoio::RuntimeBuilder::<monoio::FusionDriver>::new()
.enable_all()
.build()
.expect("Failed building the Runtime");
#[allow(clippy::expect_used)]
return rt.block_on(body);
}
extern crate test;
#[cfg(test)]
#[rustc_test_marker = "empty_trace_span"]
pub const empty_trace_span: test::TestDescAndFn = test::TestDescAndFn {
desc: test::TestDesc {
name: test::StaticTestName("empty_trace_span"),
ignore: false,
ignore_message: ::core::option::Option::None,
source_file: "async-entry/tests/it.rs",
start_line: 18usize,
start_col: 10usize,
end_line: 18usize,
end_col: 26usize,
compile_fail: false,
no_run: false,
should_panic: test::ShouldPanic::No,
test_type: test::TestType::IntegrationTest,
},
testfn: test::StaticTestFn(|| test::assert_test_result(empty_trace_span())),
};
fn empty_trace_span() {
let body = async {};
use tracing::Instrument;
let body_span = {
use ::tracing::__macro_support::Callsite as _;
static CALLSITE: ::tracing::__macro_support::MacroCallsite = {
use ::tracing::__macro_support::MacroCallsite;
static META: ::tracing::Metadata<'static> = {
::tracing_core::metadata::Metadata::new(
"empty_trace_span",
"it",
::tracing::Level::INFO,
Some("async-entry/tests/it.rs"),
Some(17u32),
Some("it"),
::tracing_core::field::FieldSet::new(
&[],
::tracing_core::callsite::Identifier(&CALLSITE),
),
::tracing::metadata::Kind::SPAN,
)
};
MacroCallsite::new(&META)
};
let mut interest = ::tracing::subscriber::Interest::never();
if ::tracing::Level::INFO <= ::tracing::level_filters::STATIC_MAX_LEVEL
&& ::tracing::Level::INFO <= ::tracing::level_filters::LevelFilter::current()
&& {
interest = CALLSITE.interest();
!interest.is_never()
}
&& CALLSITE.is_enabled(interest)
{
let meta = CALLSITE.metadata();
::tracing::Span::new(meta, &{ meta.fields().value_set(&[]) })
} else {
let span = CALLSITE.disabled_span();
{};
span
}
};
let body = body.instrument(body_span);
#[allow(unused_mut)]
let mut rt = monoio::RuntimeBuilder::<monoio::FusionDriver>::new()
.enable_all()
.build()
.expect("Failed building the Runtime");
#[allow(clippy::expect_used)]
rt.block_on(body);
}
extern crate test;
#[cfg(test)]
#[rustc_test_marker = "empty_trace_lib"]
pub const empty_trace_lib: test::TestDescAndFn = test::TestDescAndFn {
desc: test::TestDesc {
name: test::StaticTestName("empty_trace_lib"),
ignore: false,
ignore_message: ::core::option::Option::None,
source_file: "async-entry/tests/it.rs",
start_line: 21usize,
start_col: 10usize,
end_line: 21usize,
end_col: 25usize,
compile_fail: false,
no_run: false,
should_panic: test::ShouldPanic::No,
test_type: test::TestType::IntegrationTest,
},
testfn: test::StaticTestFn(|| test::assert_test_result(empty_trace_lib())),
};
fn empty_trace_lib() {
let body = async {};
use tracing::Instrument;
let body_span = {
use ::tracing::__macro_support::Callsite as _;
static CALLSITE: ::tracing::__macro_support::MacroCallsite = {
use ::tracing::__macro_support::MacroCallsite;
static META: ::tracing::Metadata<'static> = {
::tracing_core::metadata::Metadata::new(
"empty_trace_lib",
"it",
::tracing::Level::INFO,
Some("async-entry/tests/it.rs"),
Some(20u32),
Some("it"),
::tracing_core::field::FieldSet::new(
&[],
::tracing_core::callsite::Identifier(&CALLSITE),
),
::tracing::metadata::Kind::SPAN,
)
};
MacroCallsite::new(&META)
};
let mut interest = ::tracing::subscriber::Interest::never();
if ::tracing::Level::INFO <= ::tracing::level_filters::STATIC_MAX_LEVEL
&& ::tracing::Level::INFO <= ::tracing::level_filters::LevelFilter::current()
&& {
interest = CALLSITE.interest();
!interest.is_never()
}
&& CALLSITE.is_enabled(interest)
{
let meta = CALLSITE.metadata();
::tracing::Span::new(meta, &{ meta.fields().value_set(&[]) })
} else {
let span = CALLSITE.disabled_span();
{};
span
}
};
let body = body.instrument(body_span);
#[allow(unused_mut)]
let mut rt = monoio::RuntimeBuilder::<monoio::FusionDriver>::new()
.enable_all()
.build()
.expect("Failed building the Runtime");
#[allow(clippy::expect_used)]
rt.block_on(body);
}
fn g() {}
extern crate test;
#[cfg(test)]
#[rustc_test_marker = "with_init"]
pub const with_init: test::TestDescAndFn = test::TestDescAndFn {
desc: test::TestDesc {
name: test::StaticTestName("with_init"),
ignore: false,
ignore_message: ::core::option::Option::None,
source_file: "async-entry/tests/it.rs",
start_line: 26usize,
start_col: 10usize,
end_line: 26usize,
end_col: 19usize,
compile_fail: false,
no_run: false,
should_panic: test::ShouldPanic::No,
test_type: test::TestType::IntegrationTest,
},
testfn: test::StaticTestFn(|| test::assert_test_result(with_init())),
};
fn with_init() {
let _g = g();
let body = async {};
#[allow(unused_mut)]
let mut rt = monoio::RuntimeBuilder::<monoio::FusionDriver>::new()
.enable_all()
.build()
.expect("Failed building the Runtime");
#[allow(clippy::expect_used)]
rt.block_on(body);
}
extern crate test;
#[cfg(test)]
#[rustc_test_marker = "current_thread"]
pub const current_thread: test::TestDescAndFn = test::TestDescAndFn {
desc: test::TestDesc {
name: test::StaticTestName("current_thread"),
ignore: false,
ignore_message: ::core::option::Option::None,
source_file: "async-entry/tests/it.rs",
start_line: 29usize,
start_col: 10usize,
end_line: 29usize,
end_col: 24usize,
compile_fail: false,
no_run: false,
should_panic: test::ShouldPanic::No,
test_type: test::TestType::IntegrationTest,
},
testfn: test::StaticTestFn(|| test::assert_test_result(current_thread())),
};
fn current_thread() {
let body = async {};
#[allow(unused_mut)]
let mut rt = monoio::RuntimeBuilder::<monoio::FusionDriver>::new()
.enable_all()
.build()
.expect("Failed building the Runtime");
#[allow(clippy::expect_used)]
rt.block_on(body);
}
extern crate test;
#[cfg(test)]
#[rustc_test_marker = "multi_thread"]
pub const multi_thread: test::TestDescAndFn = test::TestDescAndFn {
desc: test::TestDesc {
name: test::StaticTestName("multi_thread"),
ignore: false,
ignore_message: ::core::option::Option::None,
source_file: "async-entry/tests/it.rs",
start_line: 32usize,
start_col: 10usize,
end_line: 32usize,
end_col: 22usize,
compile_fail: false,
no_run: false,
should_panic: test::ShouldPanic::No,
test_type: test::TestType::IntegrationTest,
},
testfn: test::StaticTestFn(|| test::assert_test_result(multi_thread())),
};
fn multi_thread() {
let body = async {};
#[allow(unused_mut)]
let mut rt = monoio::RuntimeBuilder::<monoio::FusionDriver>::new()
.enable_all()
.build()
.expect("Failed building the Runtime");
#[allow(clippy::expect_used)]
rt.block_on(body);
}
extern crate test;
#[cfg(test)]
#[rustc_test_marker = "multi_thread_0"]
pub const multi_thread_0: test::TestDescAndFn = test::TestDescAndFn {
desc: test::TestDesc {
name: test::StaticTestName("multi_thread_0"),
ignore: false,
ignore_message: ::core::option::Option::None,
source_file: "async-entry/tests/it.rs",
start_line: 35usize,
start_col: 10usize,
end_line: 35usize,
end_col: 24usize,
compile_fail: false,
no_run: false,
should_panic: test::ShouldPanic::No,
test_type: test::TestType::IntegrationTest,
},
testfn: test::StaticTestFn(|| test::assert_test_result(multi_thread_0())),
};
fn multi_thread_0() {
let body = async {};
#[allow(unused_mut)]
let mut rt = monoio::RuntimeBuilder::<monoio::FusionDriver>::new()
.enable_all()
.build()
.expect("Failed building the Runtime");
#[allow(clippy::expect_used)]
rt.block_on(body);
}
extern crate test;
#[cfg(test)]
#[rustc_test_marker = "multi_thread_n"]
pub const multi_thread_n: test::TestDescAndFn = test::TestDescAndFn {
desc: test::TestDesc {
name: test::StaticTestName("multi_thread_n"),
ignore: false,
ignore_message: ::core::option::Option::None,
source_file: "async-entry/tests/it.rs",
start_line: 38usize,
start_col: 10usize,
end_line: 38usize,
end_col: 24usize,
compile_fail: false,
no_run: false,
should_panic: test::ShouldPanic::No,
test_type: test::TestType::IntegrationTest,
},
testfn: test::StaticTestFn(|| test::assert_test_result(multi_thread_n())),
};
fn multi_thread_n() {
let body = async {};
#[allow(unused_mut)]
let mut rt = monoio::RuntimeBuilder::<monoio::FusionDriver>::new()
.enable_all()
.build()
.expect("Failed building the Runtime");
#[allow(clippy::expect_used)]
rt.block_on(body);
}
extern crate test;
#[cfg(test)]
#[rustc_test_marker = "multi_thread_n_without_flavor"]
pub const multi_thread_n_without_flavor: test::TestDescAndFn = test::TestDescAndFn {
desc: test::TestDesc {
name: test::StaticTestName("multi_thread_n_without_flavor"),
ignore: false,
ignore_message: ::core::option::Option::None,
source_file: "async-entry/tests/it.rs",
start_line: 41usize,
start_col: 10usize,
end_line: 41usize,
end_col: 39usize,
compile_fail: false,
no_run: false,
should_panic: test::ShouldPanic::No,
test_type: test::TestType::IntegrationTest,
},
testfn: test::StaticTestFn(|| test::assert_test_result(multi_thread_n_without_flavor())),
};
fn multi_thread_n_without_flavor() {
let body = async {};
#[allow(unused_mut)]
let mut rt = monoio::RuntimeBuilder::<monoio::FusionDriver>::new()
.enable_all()
.build()
.expect("Failed building the Runtime");
#[allow(clippy::expect_used)]
rt.block_on(body);
}
extern crate test;
#[cfg(test)]
#[rustc_test_marker = "start_paused"]
pub const start_paused: test::TestDescAndFn = test::TestDescAndFn {
desc: test::TestDesc {
name: test::StaticTestName("start_paused"),
ignore: false,
ignore_message: ::core::option::Option::None,
source_file: "async-entry/tests/it.rs",
start_line: 44usize,
start_col: 10usize,
end_line: 44usize,
end_col: 22usize,
compile_fail: false,
no_run: false,
should_panic: test::ShouldPanic::No,
test_type: test::TestType::IntegrationTest,
},
testfn: test::StaticTestFn(|| test::assert_test_result(start_paused())),
};
fn start_paused() {
let body = async {};
#[allow(unused_mut)]
let mut rt = monoio::RuntimeBuilder::<monoio::FusionDriver>::new()
.enable_all()
.build()
.expect("Failed building the Runtime");
#[allow(clippy::expect_used)]
rt.block_on(body);
}
#[rustc_main]
#[coverage(off)]
pub fn main() -> () {
extern crate test;
test::test_main_static(&[
¤t_thread,
&empty,
&empty_return_expr,
&empty_tail_expr,
&empty_trace_lib,
&empty_trace_span,
&empty_with_parentheses,
&multi_thread,
&multi_thread_0,
&multi_thread_n,
&multi_thread_n_without_flavor,
&start_paused,
&with_init,
])
}