Unit testing _one crate_ compiled under two different configs

You could have two "proxy" crates, that both depend on num-algo and reexport it, but specify different features in their Cargo.tomls. See also this thread:

then you could call the functions as

assert!(num::abs(cpu_proxy_crate::num_algo::foo(42) - pu_proxy_crate::num_algo::foo(42)) < 0.0000001 );
1 Like