tests/test_list.cpp

changeset 699
35b2b99ee523
parent 680
19379743e5a0
child 702
3390b58ad15a
--- a/tests/test_list.cpp	Sat Apr 22 14:09:46 2023 +0200
+++ b/tests/test_list.cpp	Sat Apr 22 14:21:02 2023 +0200
@@ -177,9 +177,9 @@
     s = 8;
     EXPECT_EQ(cx_linked_list_find(list, loc_next, loc_data, cx_cmp_int, &s), 3);
     s = 10;
-    EXPECT_EQ(cx_linked_list_find(list, loc_next, loc_data, cx_cmp_int, &s), 4);
+    EXPECT_LT(cx_linked_list_find(list, loc_next, loc_data, cx_cmp_int, &s), 0);
     s = -2;
-    EXPECT_EQ(cx_linked_list_find(list, loc_next, loc_data, cx_cmp_int, &s), 4);
+    EXPECT_LT(cx_linked_list_find(list, loc_next, loc_data, cx_cmp_int, &s), 0);
 }
 
 TEST(LinkedList_LowLevel, cx_linked_list_compare) {
@@ -837,7 +837,7 @@
         }
 
         int notinlist = -1;
-        EXPECT_EQ(cxListSize(list), cxListFind(list, &notinlist));
+        EXPECT_LT(cxListFind(list, &notinlist), 0);
     }
 
     void verifySort(CxList *list) const {

mercurial