Skip to content

Commit

Permalink
Merge pull request #567 from evenfurther/add-tests
Browse files Browse the repository at this point in the history
test(matrix): test Matrix::is_empty()
  • Loading branch information
samueltardieu authored Aug 4, 2024
2 parents eafb4d6 + 9116e1c commit 291f785
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/matrix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -718,3 +718,12 @@ fn items_mut() {

assert_eq!(&*m, &[0, 1, 2, 3, 4, 5, 6, 14, 8]);
}

#[test]
fn is_empty() {
let m = matrix![[0, 1, 2], [3, 4, 5], [6, 7, 8]];
assert!(!m.is_empty());

let m: Matrix<i32> = matrix![];
assert!(m.is_empty());
}

0 comments on commit 291f785

Please sign in to comment.