diff --git a/tests/lib.rs b/tests/lib.rs index add7a468..8ee85f07 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -1,8 +1,4 @@ -#[cfg(any( - not(feature = "debug"), - not(feature = "compare"), - not(feature = "rand") -))] +#[cfg(not(all(feature = "debug", feature = "compare", feature = "rand")))] compile_error!( "Please enable the `debug`, `compare`, and `rand` features in order to compile and run the tests. Example: `cargo test --features debug,compare,rand`" @@ -10,18 +6,25 @@ compile_error!( #[cfg(feature = "abomonation-serialize")] extern crate abomonation; +#[cfg(all(feature = "debug", feature = "compare", feature = "rand"))] #[macro_use] extern crate approx; extern crate nalgebra as na; extern crate num_traits as num; +#[cfg(feature = "rand")] extern crate rand_package as rand; +#[cfg(all(feature = "debug", feature = "compare", feature = "rand"))] mod core; +#[cfg(all(feature = "debug", feature = "compare", feature = "rand"))] mod geometry; +#[cfg(all(feature = "debug", feature = "compare", feature = "rand"))] mod linalg; +#[cfg(all(feature = "debug", feature = "compare", feature = "rand"))] #[cfg(feature = "proptest-support")] mod proptest; +//#[cfg(all(feature = "debug", feature = "compare", feature = "rand"))] //#[cfg(feature = "sparse")] //mod sparse;