Skip to content

Commit

Permalink
Add test for previous commit
Browse files Browse the repository at this point in the history
  • Loading branch information
radare committed Feb 13, 2024
1 parent db8fc60 commit e394274
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions test/unit/test_vec.c
Original file line number Diff line number Diff line change
Expand Up @@ -867,13 +867,18 @@ static bool test_vec_foreach_prev(void) {
RVecUT32 v;
RVecUT32_init (&v);

ut32 *y;
ut32 sum = 0;

// check for crash
R_VEC_FOREACH_PREV (&v, y) {
sum += *y;
}
ut32 x;
for (x = 0; x < 10; x++) {
RVecUT32_push_back (&v, &x);
}

ut32 sum = 0;
ut32 *y;
R_VEC_FOREACH_PREV (&v, y) {
sum += *y;
}
Expand Down

0 comments on commit e394274

Please sign in to comment.