extend test case

This commit is contained in:
lukas 2022-08-16 00:20:13 -07:00
parent bdfa643e3c
commit 41e1cc0db2
1 changed files with 8 additions and 0 deletions

View File

@ -239,6 +239,14 @@ fn coo_clear_triplets_valid_entries() {
);
coo.clear_triplets();
assert_eq(coo.triplet_iter.collect::<Vec<_>>(), vec![]);
// making sure everyhting works after clearing
coo.push(0, 0, 1);
coo.push(0, 0, 2);
coo.push(2, 2, 3);
assert_eq!(
coo.triplet_iter().collect::<Vec<_>>(),
vec![(0, 0, &1), (0, 0, &2), (2, 2, &3)]
);
}
#[test]