#[internal_test]Expand description
Internal test attribute macro for switchy_async - uses crate path for internal usage.
This macro is used within the switchy_async crate itself for internal testing. It sets up
a simulator runtime and runs the test function within it, using crate as the path.
Supports optional parameters:
real_time- Use real time instead of simulated timereal_fs- Use real filesystem instead of simulated filesystemno_simulator- Skip test when simulator feature is enabled, run normally otherwise
§Examples
ⓘ
use switchy_async_macros::internal_test;
#[internal_test]
async fn my_internal_test() {
// Test code here
}
#[internal_test(real_time)]
async fn test_with_real_time() {
// Uses real time
}§Errors
- Expands to
compile_error!when attribute arguments contain unsupported flags or the annotated function cannot be parsed.
§Panics
- Generated test wrappers call
Builder::build().unwrap()and panic if runtime construction fails.