From 4c039573f2c1e698cc06824662c4b1c580758d70 Mon Sep 17 00:00:00 2001 From: Andreas Longva Date: Wed, 1 Dec 2021 11:26:51 +0100 Subject: [PATCH] Make nalgebra-sparse unit tests require io feature --- nalgebra-sparse/tests/unit.rs | 11 +++++++++-- nalgebra-sparse/tests/unit_tests/mod.rs | 1 - 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/nalgebra-sparse/tests/unit.rs b/nalgebra-sparse/tests/unit.rs index 73a95cd7..1e61467c 100644 --- a/nalgebra-sparse/tests/unit.rs +++ b/nalgebra-sparse/tests/unit.rs @@ -1,6 +1,13 @@ //! Unit tests -#[cfg(any(not(feature = "proptest-support"), not(feature = "compare")))] -compile_error!("Tests must be run with features `proptest-support` and `compare`"); +#[cfg(not(all( +feature = "proptest-support", +feature = "compare", +feature = "io", +)))] +compile_error!( + "Please enable the `proptest-support`, `compare` and `io` features in order to compile and run the tests. + Example: `cargo test -p nalgebra-sparse --features proptest-support,compare,io`" +); mod unit_tests; diff --git a/nalgebra-sparse/tests/unit_tests/mod.rs b/nalgebra-sparse/tests/unit_tests/mod.rs index e97731e1..7090a493 100644 --- a/nalgebra-sparse/tests/unit_tests/mod.rs +++ b/nalgebra-sparse/tests/unit_tests/mod.rs @@ -3,7 +3,6 @@ mod convert_serial; mod coo; mod csc; mod csr; -#[cfg(feature = "io")] mod matrix_market; mod ops; mod pattern;