Skip to main content

for_all_scalars

Macro for_all_scalars 

Source
macro_rules! for_all_scalars {
    ($fn:ident) => { ... };
}
Expand description

Invoke a generic test function once for each concrete scalar implementation. Inside a #[test] function, write:

ⓘ
fn my_check<S: Scalar + ScalarTestHelper>() { /* … */ }
#[test] fn my_test() { for_all_scalars!(my_check); }