Skip to main content

test

Attribute Macro test 

Source
#[test]
Expand description

Marks a test that runs in the selected runtime. Async tests require the async-test feature. Marks a test that runs inside reth_concurrency::sync::Runtime::run.

Expands to a #[test] whose body moves into a Runtime::run closure, so the test runs inline by default and under simulation with both the fuzz feature and --cfg dst. Other attributes, such as #[should_panic], are kept. Inside proptest!, it replaces #[test] and runs every case, including input generation, in one runtime.

Async tests require the async-test feature. They run on current-thread Tokio natively. In simulation their future and blocking workers run under Shuttle. See reth_concurrency::sync::Runtime::run_async for supported wakeups.