mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 19:18:06 +00:00
Updating Magic Search tests
This commit is contained in:
parent
01cb565ec6
commit
64fc28497f
1 changed files with 36 additions and 1 deletions
|
|
@ -661,12 +661,47 @@ static void search_friend_with_phone_number(void) {
|
|||
|
||||
linphone_magic_search_reset_search_cache(magicSearch);
|
||||
|
||||
resultList = linphone_magic_search_get_contact_list_from_filter(magicSearch, "5", "");
|
||||
|
||||
if (BC_ASSERT_PTR_NOT_NULL(resultList)) {
|
||||
BC_ASSERT_EQUAL(bctbx_list_size(resultList), 2, int, "%d");
|
||||
_check_friend_result_list(manager->lc, resultList, 0, sFriends[11], NULL);//"sip:+33655667788@sip.example.org"
|
||||
_check_friend_result_list(manager->lc, resultList, 1, sFriends[5], NULL);//"sip:marie@sip.example.org"
|
||||
bctbx_list_free_with_data(resultList, (bctbx_list_free_func)linphone_magic_search_unref);
|
||||
}
|
||||
|
||||
resultList = linphone_magic_search_get_contact_list_from_filter(magicSearch, "55", "");
|
||||
|
||||
if (BC_ASSERT_PTR_NOT_NULL(resultList)) {
|
||||
BC_ASSERT_EQUAL(bctbx_list_size(resultList), 2, int, "%d");
|
||||
_check_friend_result_list(manager->lc, resultList, 0, sFriends[11], NULL);//"sip:+33655667788@sip.example.org"
|
||||
_check_friend_result_list(manager->lc, resultList, 1, sFriends[5], NULL);//"sip:marie@sip.example.org"
|
||||
bctbx_list_free_with_data(resultList, (bctbx_list_free_func)linphone_magic_search_unref);
|
||||
}
|
||||
|
||||
resultList = linphone_magic_search_get_contact_list_from_filter(magicSearch, "556", "");
|
||||
|
||||
if (BC_ASSERT_PTR_NOT_NULL(resultList)) {
|
||||
BC_ASSERT_EQUAL(bctbx_list_size(resultList), 2, int, "%d");
|
||||
_check_friend_result_list(manager->lc, resultList, 0, sFriends[11], NULL);//"sip:+33655667788@sip.example.org"
|
||||
_check_friend_result_list(manager->lc, resultList, 1, sFriends[5], NULL);//"sip:marie@sip.example.org"
|
||||
bctbx_list_free_with_data(resultList, (bctbx_list_free_func)linphone_magic_search_unref);
|
||||
}
|
||||
|
||||
resultList = linphone_magic_search_get_contact_list_from_filter(magicSearch, "5566", "");
|
||||
|
||||
if (BC_ASSERT_PTR_NOT_NULL(resultList)) {
|
||||
BC_ASSERT_EQUAL(bctbx_list_size(resultList), 2, int, "%d");
|
||||
_check_friend_result_list(manager->lc, resultList, 0, sFriends[11], NULL);//"sip:+33655667788@sip.example.org"
|
||||
_check_friend_result_list(manager->lc, resultList, 2, sFriends[5], NULL);//"sip:marie@sip.example.org"
|
||||
_check_friend_result_list(manager->lc, resultList, 1, sFriends[5], NULL);//"sip:marie@sip.example.org"
|
||||
bctbx_list_free_with_data(resultList, (bctbx_list_free_func)linphone_magic_search_unref);
|
||||
}
|
||||
|
||||
resultList = linphone_magic_search_get_contact_list_from_filter(magicSearch, "55667", "");
|
||||
|
||||
if (BC_ASSERT_PTR_NOT_NULL(resultList)) {
|
||||
BC_ASSERT_EQUAL(bctbx_list_size(resultList), 1, int, "%d");
|
||||
_check_friend_result_list(manager->lc, resultList, 0, sFriends[11], NULL);//"sip:+33655667788@sip.example.org"
|
||||
bctbx_list_free_with_data(resultList, (bctbx_list_free_func)linphone_magic_search_unref);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue