macro_rules! scalar_tests {
($name:ident, $test_fn:ident) => { ... };
}Expand description
Macro to generate f64 and Complex64 test variants from a generic test function.
ยงExample
fn test_operation_generic<T: tensor4all_tcicore::Scalar>() {
let value = T::from_f64(2.0);
assert_eq!(value.abs_sq(), 4.0);
}
tensor4all_tcicore::scalar_tests!(test_operation, test_operation_generic);