Skip to content

Commit

Permalink
* FIX Update the unit test.
Browse files Browse the repository at this point in the history
  • Loading branch information
wanghaEMQ committed Nov 8, 2023
1 parent 4584efc commit 63e6e73
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion test/iter.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ test_iter()
nftp_iter *iter;
struct iovec * iov;

assert(0 == nftp_vec_alloc(&v));
assert(0 == nftp_vec_alloc(&v, 0));
assert(0 == nftp_vec_append(v, &n1));
assert(0 == nftp_vec_append(v, &n2));

Expand Down
6 changes: 3 additions & 3 deletions test/vector.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ test_vector()
char *e0 = "e0", *e1, *e2 = "e2";
int idx;

assert(0 == nftp_vec_alloc(&v1));
assert(0 == nftp_vec_alloc(&v1, NFTP_SIZE * 2));
assert(NULL != v1);
assert(0 == nftp_vec_len(v1));
assert(NFTP_SIZE == nftp_vec_cap(v1));
assert(NFTP_SIZE * 2 == nftp_vec_cap(v1));

assert(0 == nftp_vec_append(v1, (void *)e0));
assert(1 == nftp_vec_len(v1));
Expand Down Expand Up @@ -60,7 +60,7 @@ test_vector()
assert(e0 == e1);
assert(1 == nftp_vec_len(v1));

assert(0 == nftp_vec_alloc(&v2));
assert(0 == nftp_vec_alloc(&v2, 0));
assert(0 == nftp_vec_len(v2));
assert(0 == nftp_vec_append(v2, (void *)e2));
assert(0 == nftp_vec_append(v2, (void *)e2));
Expand Down

0 comments on commit 63e6e73

Please sign in to comment.