Add macro sanity tests to macros

This commit is contained in:
Andreas Longva 2021-04-30 17:07:21 +02:00
parent 0bde07f95c
commit 041b8c4b2c
3 changed files with 14 additions and 2 deletions

11
tests/core/macros.rs Normal file
View File

@ -0,0 +1,11 @@
use nalgebra::{dmatrix, dvector, matrix, vector};
#[test]
fn sanity_test() {
// The macros are already tested in `nalgebra-macros`. Here we just test that they compile fine.
let _ = matrix![1, 2, 3; 4, 5, 6];
let _ = dmatrix![1, 2, 3; 4, 5, 6];
let _ = vector![1, 2, 3, 4, 5, 6];
let _ = dvector![1, 2, 3, 4, 5, 6];
}

View File

@ -16,3 +16,6 @@ mod matrixcompare;
#[cfg(feature = "arbitrary")]
pub mod helper;
#[cfg(feature = "macros")]
mod macros;

View File

@ -25,8 +25,6 @@ mod linalg;
#[cfg(feature = "proptest-support")]
mod proptest;
mod macros;
//#[cfg(all(feature = "debug", feature = "compare", feature = "rand"))]
//#[cfg(feature = "sparse")]
//mod sparse;