Add test for empty matrix multiplication.

This commit is contained in:
sebcrozet 2019-09-01 18:27:52 +02:00 committed by Sébastien Crozet
parent 8e759ade83
commit e30db9e8b1
2 changed files with 10 additions and 0 deletions

9
tests/core/empty.rs Normal file
View File

@ -0,0 +1,9 @@
use na::{DMatrix, DVector};
#[test]
fn empty_mul() {
// Issue #644
let m = DMatrix::<f32>::zeros(8, 0);
let v = DVector::<f32>::zeros(0);
assert_eq!(m * v, DVector::zeros(8));
}

View File

@ -8,6 +8,7 @@ mod matrix_slice;
#[cfg(feature = "mint")] #[cfg(feature = "mint")]
mod mint; mod mint;
mod serde; mod serde;
mod empty;
#[cfg(feature = "arbitrary")] #[cfg(feature = "arbitrary")]