list: add index and test index
This commit is contained in:
@@ -176,6 +176,28 @@ TEST(list_struct_test_c){
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
TEST(index_list_struct_test_c){
|
||||||
|
struct main_list_test_c * var_list_ptr = create_var_list_test_c();
|
||||||
|
|
||||||
|
test_c t0, t1, t2;
|
||||||
|
|
||||||
|
t0.value = 0;
|
||||||
|
t1.value = 1;
|
||||||
|
t2.value = 2;
|
||||||
|
|
||||||
|
push_back_list_test_c(var_list_ptr,t0);
|
||||||
|
push_back_list_test_c(var_list_ptr,t1);
|
||||||
|
push_back_list_test_c(var_list_ptr,t2);
|
||||||
|
|
||||||
|
for(move_current_to_index_list_test_c(var_list_ptr, 0); var_list_ptr->current_list; increment_list_test_c(var_list_ptr))
|
||||||
|
LOG("index=[%ld] cur %ld : %d : size :%ld \n", var_list_ptr->current_list->index, var_list_ptr->current_index, ((var_list_ptr->current_list)->value).value, var_list_ptr->size);
|
||||||
|
|
||||||
|
|
||||||
|
free_all_var_list_test_c(var_list_ptr);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
TEST(list_struct_test_c){
|
TEST(list_struct_test_c){
|
||||||
|
|||||||
Reference in New Issue
Block a user