mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-11 18:50:28 +09:00
misc: Add ssh_list_count()
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
@@ -17,6 +17,8 @@ static void torture_ssh_list_new(void **state) {
|
||||
assert_true(xlist->root == NULL);
|
||||
assert_true(xlist->end == NULL);
|
||||
|
||||
assert_int_equal(ssh_list_count(xlist), 0);
|
||||
|
||||
ssh_list_free(xlist);
|
||||
}
|
||||
|
||||
@@ -46,6 +48,8 @@ static void torture_ssh_list_append(void **state) {
|
||||
assert_string_equal((const char *) xlist->root->next->next->data, "item3");
|
||||
assert_string_equal((const char *) xlist->end->data, "item3");
|
||||
|
||||
assert_int_equal(ssh_list_count(xlist), 3);
|
||||
|
||||
ssh_list_free(xlist);
|
||||
}
|
||||
|
||||
@@ -75,6 +79,8 @@ static void torture_ssh_list_prepend(void **state) {
|
||||
assert_string_equal((const char *) xlist->root->next->next->data, "item2");
|
||||
assert_string_equal((const char *) xlist->end->data, "item2");
|
||||
|
||||
assert_int_equal(ssh_list_count(xlist), 3);
|
||||
|
||||
ssh_list_free(xlist);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user