From 41e1cc0db223bdbd4fc5547212760d68fd262f30 Mon Sep 17 00:00:00 2001 From: lukas Date: Tue, 16 Aug 2022 00:20:13 -0700 Subject: [PATCH] extend test case --- nalgebra-sparse/tests/unit_tests/coo.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/nalgebra-sparse/tests/unit_tests/coo.rs b/nalgebra-sparse/tests/unit_tests/coo.rs index b9c22885..16ee5647 100644 --- a/nalgebra-sparse/tests/unit_tests/coo.rs +++ b/nalgebra-sparse/tests/unit_tests/coo.rs @@ -239,6 +239,14 @@ fn coo_clear_triplets_valid_entries() { ); coo.clear_triplets(); assert_eq(coo.triplet_iter.collect::>(), 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![(0, 0, &1), (0, 0, &2), (2, 2, &3)] + ); } #[test]