I am trying to implement unit testing in C using Ceedling.
struct Person *list;
/* TASK_FIND_BY */
void test_main_task_find_by_normal(void)
{
    char *string = (char *)malloc(sizeof(char));
    struct Person new_list_instance;
    struct Person *new_list = &new_list_instance;
    ask_input_ExpectAndReturn(string);
    llist_find_by_ExpectAndReturn(list, string, new_list);
    llist_print_Expect(new_list);
    llist_remove_all_Expect(&new_list);
    printf("\nOutside single: %p\n", new_list);
    printf("Outside double: %p\n", &new_list);
    task_find_by(list);
}
void task_find_by(struct Person *list)
{
    char *input = NULL;
    struct Person *new = NULL;
    printf("Input exact name/surname/email/phone: ");
    input = ask_input();
    if (input == NULL) {
        printf("Error!");
        return;
    }
    new = llist_find_by(list, input);
    if (new != NULL)
        llist_print(new);
    else 
        printf("Address not found!\n");
    
    printf("\nInside single: %p\n", new);
    printf("Inside double: %p\n", &new);
    
    free(input);
    llist_remove_all(&new);
}
I expect the function inside task_find_by to be called with the same argument as here: llist_remove_all_Expect(&new_list).
But the actual function is called with the address of new pointer, where new holds the new_list. Since new_list and new are different pointers their addresses are different. Is there any way to test the called argument without changing the implementation of task_find_by function?
  - "Outside single: 0x7ffc2e3c03d0"
  - "Outside double: 0x7ffc2e3c03c0"
  - "Inside single: 0x7ffc2e3c03d0"
  - "Inside double: 0x7ffc2e3c0398"