Fixes for the unit tests on 32bit host

This commit is contained in:
pancake 2026-03-10 16:44:49 +01:00 committed by pancake
parent 2cf6931a4f
commit ff3aeb5dde
8 changed files with 97 additions and 84 deletions

View file

@ -2,12 +2,12 @@ UNITS_BINDIR := bin
BINS=$(patsubst %.c,$(UNITS_BINDIR)/%,$(wildcard *.c))
# LDFLAGS+=$(shell pkg-config --libs r_core)
-include ../../config-user.mk
LDFLAGS+=-L$(LIBDIR)
LDFLAGS+=-lr_core -lr_main -lm -lr_config -lr_debug -lr_bin -lr_lang -lr_anal -lr_bp -lr_egg -lr_asm -lr_flag -lr_search -lr_syscall -lr_fs -lr_io -lr_socket -lr_cons -lr_magic -lr_muta -lr_arch -lr_esil -lr_reg -lr_util -ldl
CFLAGS+=-I$(INCLUDEDIR)
CFLAGS+=-I../../libr/include
CFLAGS+=-I../../subprojects/sdb/include
CPPFLAGS+=-I$(INCLUDEDIR)
CPPFLAGS+=-I../../libr/include
CPPFLAGS+=-I../../subprojects/sdb/include
CFLAGS+=-g
LDLIBS+=-L$(LIBDIR)
LDLIBS+=-lr_core -lr_main -lm -lr_config -lr_debug -lr_bin -lr_lang -lr_anal -lr_bp -lr_egg -lr_asm -lr_flag -lr_search -lr_syscall -lr_fs -lr_io -lr_socket -lr_cons -lr_magic -lr_muta -lr_arch -lr_esil -lr_reg -lr_util -ldl
ifeq ($(ASAN),1)
ASAN_LD_PRELOAD=LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libasan.so.5
else
@ -21,7 +21,7 @@ asan:
$(UNITS_BINDIR)/%: %.c
mkdir -p "$(UNITS_BINDIR)"
$(CC) $< -o $@ $(CFLAGS) $(LDFLAGS)
$(CC) $(CPPFLAGS) $(CFLAGS) $< -o $@ $(LDFLAGS) $(LDLIBS)
test_debug: $(UNITS_BINDIR)/test_debug
@:

View file

@ -484,9 +484,22 @@ bool test_r_anal_block_query(void) {
mu_end;
}
bool addr_list_cb(ut64 addr, void *user) {
static bool addr_list_contains(RList *list, ut64 addr) {
RListIter *it;
ut64 *item;
r_list_foreach (list, it, item) {
if (*item == addr) {
return true;
}
}
return false;
}
static bool addr_list_cb(ut64 addr, void *user) {
RList *list = user;
r_list_push (list, (void *)addr);
ut64 *item = R_NEW (ut64);
*item = addr;
r_list_push (list, item);
return true;
}
@ -525,21 +538,21 @@ bool test_r_anal_block_successors(void) {
r_anal_switch_op_add_case (sop, 0x55, 5, 0x140);
blocks[2]->switch_op = sop;
RList *result = r_list_new ();
RList *result = r_list_newf (free);
r_anal_block_successor_addrs_foreach (blocks[0], addr_list_cb, result);
mu_assert_eq (r_list_length (result), 2, "jump/fail successors count");
mu_assert ("jmp successor", r_list_contains (result, (void *)0x30));
mu_assert ("fail successor", r_list_contains (result, (void *)0x50));
mu_assert ("jmp successor", addr_list_contains (result, 0x30));
mu_assert ("fail successor", addr_list_contains (result, 0x50));
r_list_purge (result);
r_anal_block_successor_addrs_foreach (blocks[2], addr_list_cb, result);
mu_assert_eq (r_list_length (result), 6, "switch successors count");
mu_assert ("jmp successor", r_list_contains (result, (void *)0x10));
mu_assert ("case successor", r_list_contains (result, (void *)0x100));
mu_assert ("case successor", r_list_contains (result, (void *)0x110));
mu_assert ("case successor", r_list_contains (result, (void *)0x120));
mu_assert ("case successor", r_list_contains (result, (void *)0x130));
mu_assert ("case successor", r_list_contains (result, (void *)0x140));
mu_assert ("jmp successor", addr_list_contains (result, 0x10));
mu_assert ("case successor", addr_list_contains (result, 0x100));
mu_assert ("case successor", addr_list_contains (result, 0x110));
mu_assert ("case successor", addr_list_contains (result, 0x120));
mu_assert ("case successor", addr_list_contains (result, 0x130));
mu_assert ("case successor", addr_list_contains (result, 0x140));
r_list_free (result);
result = r_anal_block_recurse_list (blocks[0]);

View file

@ -41,7 +41,7 @@ static bool test_r_crbtree_in_ascending_order_iteration2(void) {
RRBTree *tree = create_test_tree ();
int s = 17;
RRBNode *node = r_crbtree_find_node (tree, &s, cmp_cb, NULL);
mu_assert_neq (node, NULL, "Finding node failed");
mu_assert_notnull (node, "Finding node failed");
int *data = node->data;
node = r_rbnode_next (node);
bool t = true;
@ -80,7 +80,7 @@ static bool test_r_crbtree_in_descending_order_iteration2(void) {
RRBTree *tree = create_test_tree ();
int s = 17;
RRBNode *node = r_crbtree_find_node (tree, &s, cmp_cb, NULL);
mu_assert_neq (node, NULL, "Finding node failed");
mu_assert_notnull (node, "Finding node failed");
int *data = node->data;
node = r_rbnode_prev (node);
bool t = true;
@ -99,7 +99,7 @@ static bool test_r_crbtree_delete(void) {
RRBTree *tree = create_test_tree ();
int s = 17;
r_crbtree_delete (tree, &s, cmp_cb, NULL);
mu_assert_eq (r_crbtree_find (tree, &s, cmp_cb, NULL), NULL, "deletion failed");
mu_assert_null (r_crbtree_find (tree, &s, cmp_cb, NULL), "deletion failed");
r_crbtree_free (tree);
mu_end;
}

View file

@ -148,7 +148,7 @@ bool test_pdb_tpi_cpp(void) {
mu_assert_streq (name, "TEST_CLASS", "wrong class name");
RList *members = NULL;
type_info->get_members (tpi_stream, type_info, &members);
mu_assert_eq (!members, NULL, "no members");
mu_assert_notnull (members, "no members");
mu_assert_eq (members->length, 2, "wrong class member count");
SType *stype = NULL;
int result = type_info->get_vshape (tpi_stream, type_info, (void **)&stype);
@ -181,7 +181,7 @@ bool test_pdb_tpi_cpp(void) {
type_info->get_class_type (tpi_stream, type_info, (void **)&type);
mu_assert_eq (type->tpi_idx, 0x1079, "incorrect mfunction class type");
type_info->get_this_type (tpi_stream, type_info, (void **)&type);
mu_assert_eq (type, 0, "incorrect mfunction this type");
mu_assert_null (type, "incorrect mfunction this type");
type_info->get_arglist (tpi_stream, type_info, (void **)&type);
mu_assert_eq (type->tpi_idx, 0x1027, "incorrect mfunction arglist");
} else if (type->tpi_idx == 0x113F) {
@ -414,7 +414,7 @@ bool test_pdb_tpi_rust(void) {
type_info->get_class_type (tpi_stream, type_info, (void **)&type);
mu_assert_eq (type->tpi_idx, 0x107F, "incorrect mfunction class type");
type_info->get_this_type (tpi_stream, type_info, (void **)&type);
mu_assert_eq (type, 0, "incorrect mfunction this type");
mu_assert_null (type, "incorrect mfunction this type");
type_info->get_arglist (tpi_stream, type_info, (void **)&type);
mu_assert_eq (type->tpi_idx, 0x1000, "incorrect mfunction arglist");
} else if (type->tpi_idx == 0x13BF) {

View file

@ -16,7 +16,7 @@ static bool test_r2pipe(void) {
static bool test_r2pipe_404(void) {
R2Pipe *r = r2pipe_open ("rodoro2 -N -q0 -");
mu_assert_eq (r, NULL, "r2pipe can spawn");
mu_assert_null (r, "r2pipe should not spawn");
// mu_assert ("r2pipe can spawn", !r);
mu_end;
}

View file

@ -569,7 +569,7 @@ bool test_r_str_tok_r (void) {
char *token = NULL;
token = r_str_tok_r(str, ",", &rest);
mu_assert_eq(token, NULL, "token unexpectedly is not NULL");
mu_assert_null (token, "token unexpectedly is not NULL");
}
{
@ -590,7 +590,7 @@ bool test_r_str_tok_r (void) {
mu_assert_streq(token, "world", "obtained incorrect token");
token = r_str_tok_r(NULL, " ", &rest);
mu_assert_eq(token, NULL, "token unexpectedly is not NULL");
mu_assert_null (token, "token unexpectedly is not NULL");
}
{
@ -608,7 +608,7 @@ bool test_r_str_tok_r (void) {
mu_assert_streq(token, "333", "obtained incorrect token");
token = r_str_tok_r(NULL, ",", &rest);
mu_assert_eq(token, NULL, "token unexpectedly is not NULL");
mu_assert_null (token, "token unexpectedly is not NULL");
}
{
@ -626,7 +626,7 @@ bool test_r_str_tok_r (void) {
mu_assert_streq(token, "333", "obtained incorrect token");
token = r_str_tok_r(NULL, ", ", &rest);
mu_assert_eq(token, NULL, "token unexpectedly is not NULL");
mu_assert_null (token, "token unexpectedly is not NULL");
}
{
@ -638,7 +638,7 @@ bool test_r_str_tok_r (void) {
mu_assert_streq(token, "This is hello world", "obtained incorrect token");
token = r_str_tok_r(NULL, ";", &rest);
mu_assert_eq(token, NULL, "token unexpectedly is not NULL");
mu_assert_null (token, "token unexpectedly is not NULL");
}
{
@ -659,7 +659,7 @@ bool test_r_str_tok_r (void) {
mu_assert_streq(token, "world", "obtained incorrect token");
token = r_str_tok_r(NULL, ";", &rest);
mu_assert_eq(token, NULL, "token unexpectedly is not NULL");
mu_assert_null (token, "token unexpectedly is not NULL");
}
mu_end;

View file

@ -82,7 +82,7 @@ bool test_leb128_correctness(void) {
const ut8 *data = (ut8 *)"\xc5\x00";
const ut8 *buf = r_leb128 (data, 2, &val);
mu_assert_eq (val, 69, "leb128 decoded");
mu_assert_eq (buf, data + 2, "leb128 decoded");
mu_assert_ptreq (buf, data + 2, "leb128 decoded");
mu_end;
}

View file

@ -33,9 +33,9 @@ R_VEC_TYPE_WITH_FINI (RVecS, S, fini_S);
static bool test_vec_init(void) {
RVecUT32 v;
RVecUT32_init (&v);
mu_assert_eq (R_VEC_START_ITER (&v), NULL, "init start");
mu_assert_eq (R_VEC_END_ITER (&v), NULL, "init end");
mu_assert_eq (R_VEC_START_ITER (&v), R_VEC_END_ITER (&v), "init start == end");
mu_assert_null (R_VEC_START_ITER (&v), "init start");
mu_assert_null (R_VEC_END_ITER (&v), "init end");
mu_assert_ptreq (R_VEC_START_ITER (&v), R_VEC_END_ITER (&v), "init start == end");
mu_assert_eq (R_VEC_CAPACITY (&v), 0, "init capacity");
RVecUT32_fini (&v);
mu_end;
@ -51,8 +51,8 @@ static bool test_vec_fini(void) {
}
RVecUT32_fini (&v);
mu_assert_eq (R_VEC_START_ITER (&v), NULL, "fini start");
mu_assert_eq (R_VEC_END_ITER (&v), NULL, "fini end");
mu_assert_null (R_VEC_START_ITER (&v), "fini start");
mu_assert_null (R_VEC_END_ITER (&v), "fini end");
RVecS vS;
RVecS_init (&vS);
@ -66,16 +66,16 @@ static bool test_vec_fini(void) {
RVecS_fini (&vS);
mu_assert_eq (R_VEC_START_ITER (&vS), NULL, "fini start2");
mu_assert_eq (R_VEC_END_ITER (&vS), NULL, "fini end2");
mu_assert_null (R_VEC_START_ITER (&vS), "fini start2");
mu_assert_null (R_VEC_END_ITER (&vS), "fini end2");
mu_end;
}
static bool test_vec_new(void) {
RVecUT32 *v = RVecUT32_new ();
mu_assert_eq (R_VEC_START_ITER (v), NULL, "new start");
mu_assert_eq (R_VEC_END_ITER (v), NULL, "new end");
mu_assert_eq (R_VEC_START_ITER (v), R_VEC_END_ITER (v), "new start == end");
mu_assert_null (R_VEC_START_ITER (v), "new start");
mu_assert_null (R_VEC_END_ITER (v), "new end");
mu_assert_ptreq (R_VEC_START_ITER (v), R_VEC_END_ITER (v), "new start == end");
mu_assert_eq (R_VEC_CAPACITY (v), 0, "new capacity");
RVecUT32_free (v);
mu_end;
@ -154,9 +154,9 @@ static bool test_vec_clone(void) {
static bool test_vec_push_back(void) {
RVecUT32 v;
RVecUT32_init (&v);
mu_assert_eq (R_VEC_START_ITER (&v), NULL, "push_back start");
mu_assert_eq (R_VEC_END_ITER (&v), NULL, "push_back end");
mu_assert_eq (R_VEC_START_ITER (&v), R_VEC_END_ITER (&v), "push_back start == end");
mu_assert_null (R_VEC_START_ITER (&v), "push_back start");
mu_assert_null (R_VEC_END_ITER (&v), "push_back end");
mu_assert_ptreq (R_VEC_START_ITER (&v), R_VEC_END_ITER (&v), "push_back start == end");
mu_assert_eq (R_VEC_CAPACITY (&v), 0, "push_back capacity");
ut32 x;
@ -164,8 +164,8 @@ static bool test_vec_push_back(void) {
RVecUT32_push_back (&v, &x);
}
mu_assert_neq (R_VEC_START_ITER (&v), NULL, "push_back start2");
mu_assert_neq (R_VEC_END_ITER (&v), NULL, "push_back end2");
mu_assert_notnull (R_VEC_START_ITER (&v), "push_back start2");
mu_assert_notnull (R_VEC_END_ITER (&v), "push_back end2");
mu_assert_eq (R_VEC_CAPACITY (&v), 8, "push_back capacity2");
mu_assert_eq (RVecUT32_length (&v), 8, "push_back length2");
@ -180,9 +180,9 @@ static bool test_vec_push_back(void) {
static bool test_vec_emplace_back(void) {
RVecUT32 v;
RVecUT32_init (&v);
mu_assert_eq (R_VEC_START_ITER (&v), NULL, "emplace_back start");
mu_assert_eq (R_VEC_END_ITER (&v), NULL, "emplace_back end");
mu_assert_eq (R_VEC_START_ITER (&v), R_VEC_END_ITER (&v), "emplace_back start == end");
mu_assert_null (R_VEC_START_ITER (&v), "emplace_back start");
mu_assert_null (R_VEC_END_ITER (&v), "emplace_back end");
mu_assert_ptreq (R_VEC_START_ITER (&v), R_VEC_END_ITER (&v), "emplace_back start == end");
mu_assert_eq (R_VEC_CAPACITY (&v), 0, "emplace_back capacity");
ut32 x;
@ -191,8 +191,8 @@ static bool test_vec_emplace_back(void) {
*ptr = x;
}
mu_assert_neq (R_VEC_START_ITER (&v), NULL, "emplace_back start2");
mu_assert_neq (R_VEC_END_ITER (&v), NULL, "emplace_back end2");
mu_assert_notnull (R_VEC_START_ITER (&v), "emplace_back start2");
mu_assert_notnull (R_VEC_END_ITER (&v), "emplace_back end2");
mu_assert_eq (R_VEC_CAPACITY (&v), 8, "emplace_back capacity2");
mu_assert_eq (RVecUT32_length (&v), 8, "emplace_back length2");
@ -208,9 +208,9 @@ static bool test_vec_emplace_back(void) {
static bool test_vec_push_front(void) {
RVecUT32 v;
RVecUT32_init (&v);
mu_assert_eq (R_VEC_START_ITER (&v), NULL, "push_front start");
mu_assert_eq (R_VEC_END_ITER (&v), NULL, "push_front end");
mu_assert_eq (R_VEC_START_ITER (&v), R_VEC_END_ITER (&v), "push_front start == end");
mu_assert_null (R_VEC_START_ITER (&v), "push_front start");
mu_assert_null (R_VEC_END_ITER (&v), "push_front end");
mu_assert_ptreq (R_VEC_START_ITER (&v), R_VEC_END_ITER (&v), "push_front start == end");
mu_assert_eq (R_VEC_CAPACITY (&v), 0, "push_front capacity");
ut32 x;
@ -236,9 +236,9 @@ static bool test_vec_push_front(void) {
static bool test_vec_emplace_front(void) {
RVecUT32 v;
RVecUT32_init (&v);
mu_assert_eq (R_VEC_START_ITER (&v), NULL, "emplace_front start");
mu_assert_eq (R_VEC_END_ITER (&v), NULL, "emplace_front end");
mu_assert_eq (R_VEC_START_ITER (&v), R_VEC_END_ITER (&v), "emplace_front start == end");
mu_assert_null (R_VEC_START_ITER (&v), "emplace_front start");
mu_assert_null (R_VEC_END_ITER (&v), "emplace_front end");
mu_assert_ptreq (R_VEC_START_ITER (&v), R_VEC_END_ITER (&v), "emplace_front start == end");
mu_assert_eq (R_VEC_CAPACITY (&v), 0, "emplace_front capacity");
ut32 x;
@ -313,8 +313,8 @@ static bool test_vec_append(void) {
}
RVecS_append (&v3, &v4, copy_S);
mu_assert_neq (RVecS_at (&v3, 2)->y, RVecS_at (&v4, 0)->y, "append copy1");
mu_assert_neq (RVecS_at (&v3, 3)->y, RVecS_at (&v4, 1)->y, "append copy1");
mu_assert_ptrneq (RVecS_at (&v3, 2)->y, RVecS_at (&v4, 0)->y, "append copy1");
mu_assert_ptrneq (RVecS_at (&v3, 3)->y, RVecS_at (&v4, 1)->y, "append copy1");
RVecS_fini (&v3);
RVecS_fini (&v4);
@ -423,7 +423,7 @@ static bool test_vec_erase_back(void) {
RVecS_erase_back (&v, RVecS_at (&v, 4));
mu_assert_eq (R_VEC_CAPACITY (&v), 8, "erase_back capacity3");
mu_assert_eq (RVecS_length (&v), 4, "erase_back length3");
mu_assert_eq (RVecS_at (&v, 4), NULL, "erase_back at3");
mu_assert_null (RVecS_at (&v, 4), "erase_back at3");
mu_assert_eq (RVecS_at (&v, 3)->x, 3, "erase_back at4");
mu_assert_eq (count_S, 4, "erase count");
@ -593,20 +593,20 @@ static bool test_vec_start_iter(void) {
RVecUT32 v;
RVecUT32_init (&v);
mu_assert_eq (R_VEC_START_ITER (&v), NULL, "start iter1");
mu_assert_null (R_VEC_START_ITER (&v), "start iter1");
ut32 x = 100;
RVecUT32_push_back (&v, &x);
mu_assert_neq (R_VEC_START_ITER (&v), NULL, "start iter2");
mu_assert_notnull (R_VEC_START_ITER (&v), "start iter2");
for (x = 0; x < 3; x++) {
RVecUT32_push_back (&v, &x);
}
mu_assert_neq (R_VEC_START_ITER (&v), NULL, "start iter3");
mu_assert_notnull (R_VEC_START_ITER (&v), "start iter3");
RVecUT32_clear (&v);
mu_assert_neq (R_VEC_START_ITER (&v), NULL, "start iter4");
mu_assert_notnull (R_VEC_START_ITER (&v), "start iter4");
RVecUT32_fini (&v);
mu_end;
@ -616,20 +616,20 @@ static bool test_vec_end_iter(void) {
RVecUT32 v;
RVecUT32_init (&v);
mu_assert_eq (R_VEC_END_ITER (&v), NULL, "end iter1");
mu_assert_null (R_VEC_END_ITER (&v), "end iter1");
ut32 x = 100;
RVecUT32_push_back (&v, &x);
mu_assert_neq (R_VEC_END_ITER (&v), NULL, "end iter2");
mu_assert_notnull (R_VEC_END_ITER (&v), "end iter2");
for (x = 0; x < 3; x++) {
RVecUT32_push_back (&v, &x);
}
mu_assert_neq (R_VEC_END_ITER (&v), NULL, "end iter3");
mu_assert_notnull (R_VEC_END_ITER (&v), "end iter3");
RVecUT32_clear (&v);
mu_assert_neq (R_VEC_END_ITER (&v), NULL, "end iter4");
mu_assert_notnull (R_VEC_END_ITER (&v), "end iter4");
RVecUT32_fini (&v);
mu_end;
@ -639,22 +639,22 @@ static bool test_vec_at(void) {
RVecUT32 v;
RVecUT32_init (&v);
mu_assert_eq (RVecUT32_at (&v, 0), NULL, "at1");
mu_assert_null (RVecUT32_at (&v, 0), "at1");
ut32 x;
for (x = 0; x < 3; x++) {
RVecUT32_push_back (&v, &x);
}
mu_assert_neq (RVecUT32_at (&v, 0), NULL, "at2");
mu_assert_eq (RVecUT32_at (&v, 0), R_VEC_START_ITER (&v), "at3");
mu_assert_notnull (RVecUT32_at (&v, 0), "at2");
mu_assert_ptreq (RVecUT32_at (&v, 0), R_VEC_START_ITER (&v), "at3");
mu_assert_eq (*RVecUT32_at (&v, 0), 0, "at4");
*RVecUT32_at (&v, 0) = 10;
mu_assert_eq (*RVecUT32_at (&v, 0), 10, "at5");
RVecUT32_clear (&v);
mu_assert_eq (RVecUT32_at (&v, 0), NULL, "at6");
mu_assert_null (RVecUT32_at (&v, 0), "at6");
RVecUT32_fini (&v);
mu_end;
@ -664,21 +664,21 @@ static bool test_vec_last(void) {
RVecUT32 v;
RVecUT32_init (&v);
mu_assert_eq (RVecUT32_last (&v), NULL, "last1");
mu_assert_null (RVecUT32_last (&v), "last1");
ut32 x;
for (x = 0; x < 3; x++) {
RVecUT32_push_back (&v, &x);
}
mu_assert_neq (RVecUT32_last (&v), NULL, "last2");
mu_assert_notnull (RVecUT32_last (&v), "last2");
mu_assert_eq (*RVecUT32_last (&v), 2, "last4");
*RVecUT32_last (&v) = 10;
mu_assert_eq (*RVecUT32_last (&v), 10, "last5");
RVecUT32_clear (&v);
mu_assert_eq (RVecUT32_last (&v), NULL, "last6");
mu_assert_null (RVecUT32_last (&v), "last6");
RVecUT32_fini (&v);
mu_end;
@ -689,7 +689,7 @@ static bool test_vec_find(void) {
RVecST32_init (&v);
st32 x = 0;
mu_assert_eq (RVecST32_find (&v, &x, find_compare_st32), NULL, "find1");
mu_assert_null (RVecST32_find (&v, &x, find_compare_st32), "find1");
for (x = 0; x < 3; x++) {
RVecST32_push_back (&v, &x);
@ -702,11 +702,11 @@ static bool test_vec_find(void) {
x = 2;
mu_assert_eq (*RVecST32_find (&v, &x, find_compare_st32), 2, "find4");
x = 3;
mu_assert_eq (RVecST32_find (&v, &x, find_compare_st32), NULL, "find5");
mu_assert_null (RVecST32_find (&v, &x, find_compare_st32), "find5");
RVecST32_clear (&v);
x = 0;
mu_assert_eq (RVecST32_find (&v, &x, find_compare_st32), NULL, "find6");
mu_assert_null (RVecST32_find (&v, &x, find_compare_st32), "find6");
RVecST32_fini (&v);
mu_end;
@ -722,7 +722,7 @@ static bool test_vec_find_if_not(void) {
RVecST32_init (&v);
st32 x = 0;
mu_assert_eq (RVecST32_find_if_not (&v, &x, greater_than_ut32), NULL, "find_if_not1");
mu_assert_null (RVecST32_find_if_not (&v, &x, greater_than_ut32), "find_if_not1");
for (x = 0; x < 3; x++) {
RVecST32_push_back (&v, &x);
@ -733,11 +733,11 @@ static bool test_vec_find_if_not(void) {
x = 1;
mu_assert_eq (*RVecST32_find_if_not (&v, &x, greater_than_ut32), 2, "find_if_not3");
x = 2;
mu_assert_eq (RVecST32_find_if_not (&v, &x, greater_than_ut32), NULL, "find_if_not4");
mu_assert_null (RVecST32_find_if_not (&v, &x, greater_than_ut32), "find_if_not4");
RVecST32_clear (&v);
x = 0;
mu_assert_eq (RVecST32_find_if_not (&v, &x, greater_than_ut32), NULL, "find_if_not6");
mu_assert_null (RVecST32_find_if_not (&v, &x, greater_than_ut32), "find_if_not6");
RVecST32_fini (&v);
mu_end;
@ -792,7 +792,7 @@ static bool test_vec_reserve(void) {
mu_assert_eq (RVecUT32_length (&v), 9, "reserve length3");
mu_assert_eq (R_VEC_CAPACITY (&v), 12, "reserve capacity3");
mu_assert_eq (start_iter, R_VEC_START_ITER (&v), "reserve start iter3");
mu_assert_ptreq (start_iter, R_VEC_START_ITER (&v), "reserve start iter3");
RVecUT32_fini (&v);
mu_end;
@ -1173,7 +1173,7 @@ static bool test_vec_with_pointers(void) {
RVecBuf_init (&buf);
char *ptr = NULL;
mu_assert_eq (RVecBuf_find (&buf, &ptr, find_compare_buf), NULL, "pointer find1");
mu_assert_null (RVecBuf_find (&buf, &ptr, find_compare_buf), "pointer find1");
ut32 x = 0;
for (x = 0; x < 3; x++) {
@ -1185,7 +1185,7 @@ static bool test_vec_with_pointers(void) {
RVecBuf_push_back (&buf, &ptr);
char **ptr2 = RVecBuf_at (&buf, 3);
mu_assert_eq (RVecBuf_find (&buf, &ptr, find_compare_buf), ptr2, "pointer find2");
mu_assert_ptreq (RVecBuf_find (&buf, &ptr, find_compare_buf), ptr2, "pointer find2");
RVecBuf_fini (&buf);
mu_end;