diff --git a/src/swizzle.rs b/src/swizzle.rs index aa7f580..286daa0 100644 --- a/src/swizzle.rs +++ b/src/swizzle.rs @@ -96,24 +96,3 @@ macro_rules! sub_literal { }; ($result:expr, $p:expr, $i:expr) => {}; } - -#[cfg(test)] -mod tests { - use crate::Matrix; - - #[test] - fn test_swizzle() { - let identity = Matrix::::identity(); - - assert_eq!( - swizzle!(identity, a, x, b, (1 + 0), { 2 - 3 }), - Matrix::mat([ - [0, 0, 0, 1], // a - [1, 0, 0, 0], // x - [0, 0, 1, 0], // b - [0, 1, 0, 0], // row 1 - [-1, -1, -1, -1] // fill(-1) - ]) - ); - } -} diff --git a/tests/common/mod.rs b/tests/common/mod.rs index 936c7da..dadbb35 100644 --- a/tests/common/mod.rs +++ b/tests/common/mod.rs @@ -29,6 +29,7 @@ impl Approx for Matrix { match (&$left, &$right) { diff --git a/tests/swizzle.rs b/tests/swizzle.rs new file mode 100644 index 0000000..98cd05f --- /dev/null +++ b/tests/swizzle.rs @@ -0,0 +1,17 @@ +use vector_victor::{swizzle, Matrix}; + +#[test] +fn test_swizzle() { + let identity = Matrix::::identity(); + + assert_eq!( + swizzle!(identity, a, x, b, (1 + 0), { 2 - 3 }), + Matrix::mat([ + [0, 0, 0, 1], // a + [1, 0, 0, 0], // x + [0, 0, 1, 0], // b + [0, 1, 0, 0], // row 1 + [-1, -1, -1, -1] // fill(-1) + ]) + ); +}