Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
liblinphone
Commits
38f4c55f
Commit
38f4c55f
authored
Oct 18, 2019
by
DanmeiChen
Browse files
fx tests ios
parent
6514a495
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
4 deletions
+13
-4
tester/group_chat_secure.c
tester/group_chat_secure.c
+2
-1
tester/group_chat_tester.c
tester/group_chat_tester.c
+2
-1
tester/main-db-tester.cpp
tester/main-db-tester.cpp
+4
-0
tester/message_tester.c
tester/message_tester.c
+5
-2
No files found.
tester/group_chat_secure.c
View file @
38f4c55f
...
...
@@ -477,7 +477,7 @@ static void lime_x3dh_message_test (bool_t with_composing, bool_t with_response,
if
(
sal_error
)
{
sal_set_send_error
(
linphone_core_get_sal
(
marie
->
lc
),
-
1
);
msg
=
_send_message
(
marieCr
,
"Bli bli bli"
);
const
char
*
message_id
=
linphone_chat_message_get_message_id
(
msg
);
char
*
message_id
=
ms_strdup
(
linphone_chat_message_get_message_id
(
msg
)
)
;
BC_ASSERT_STRING_NOT_EQUAL
(
message_id
,
""
);
wait_for_list
(
coresList
,
NULL
,
0
,
1000
);
...
...
@@ -487,6 +487,7 @@ static void lime_x3dh_message_test (bool_t with_composing, bool_t with_response,
const
char
*
message_id_2
=
linphone_chat_message_get_message_id
(
msg
);
BC_ASSERT_STRING_NOT_EQUAL
(
message_id_2
,
""
);
BC_ASSERT_STRING_EQUAL
(
message_id
,
message_id_2
);
ms_free
(
message_id
);
wait_for_list
(
coresList
,
NULL
,
0
,
1000
);
...
...
tester/group_chat_tester.c
View file @
38f4c55f
...
...
@@ -962,7 +962,7 @@ static void group_chat_room_message (bool_t encrypt, bool_t sal_error) {
if
(
sal_error
)
{
sal_set_send_error
(
linphone_core_get_sal
(
marie
->
lc
),
-
1
);
LinphoneChatMessage
*
msg
=
_send_message
(
marieCr
,
"Bli bli bli"
);
const
char
*
message_id
=
linphone_chat_message_get_message_id
(
msg
);
char
*
message_id
=
ms_strdup
(
linphone_chat_message_get_message_id
(
msg
)
)
;
BC_ASSERT_STRING_NOT_EQUAL
(
message_id
,
""
);
wait_for_list
(
coresList
,
NULL
,
0
,
1000
);
...
...
@@ -972,6 +972,7 @@ static void group_chat_room_message (bool_t encrypt, bool_t sal_error) {
const
char
*
message_id_2
=
linphone_chat_message_get_message_id
(
msg
);
BC_ASSERT_STRING_NOT_EQUAL
(
message_id_2
,
""
);
BC_ASSERT_STRING_EQUAL
(
message_id
,
message_id_2
);
ms_free
(
message_id
);
wait_for_list
(
coresList
,
NULL
,
0
,
1000
);
...
...
tester/main-db-tester.cpp
View file @
38f4c55f
...
...
@@ -266,7 +266,11 @@ static void load_a_lot_of_chatrooms(void) {
MainDbProvider
provider
(
"db/chatrooms.db"
);
chrono
::
high_resolution_clock
::
time_point
end
=
chrono
::
high_resolution_clock
::
now
();
long
ms
=
(
long
)
chrono
::
duration_cast
<
chrono
::
milliseconds
>
(
end
-
start
).
count
();
#if __APPLE__
BC_ASSERT_LOWER
(
ms
,
2000
,
long
,
"%li"
);
#else
BC_ASSERT_LOWER
(
ms
,
1000
,
long
,
"%li"
);
#endif
}
test_t
main_db_tests
[]
=
{
...
...
tester/message_tester.c
View file @
38f4c55f
...
...
@@ -349,7 +349,7 @@ static void text_message_with_send_error(void) {
sal_set_send_error
(
linphone_core_get_sal
(
marie
->
lc
),
-
1
);
linphone_chat_message_cbs_set_msg_state_changed
(
cbs
,
liblinphone_tester_chat_message_msg_state_changed
);
linphone_chat_message_send
(
msg
);
const
char
*
message_id
=
linphone_chat_message_get_message_id
(
msg
);
char
*
message_id
=
ms_strdup
(
linphone_chat_message_get_message_id
(
msg
)
)
;
BC_ASSERT_STRING_NOT_EQUAL
(
message_id
,
""
);
/* check transient msg list: the msg should be in it, and should be the only one */
...
...
@@ -371,7 +371,10 @@ static void text_message_with_send_error(void) {
BC_ASSERT_STRING_NOT_EQUAL
(
message_id_2
,
""
);
BC_ASSERT_STRING_NOT_EQUAL
(
message_id
,
message_id_2
);
BC_ASSERT_TRUE
(
wait_for
(
pauline
->
lc
,
marie
->
lc
,
&
marie
->
stat
.
number_of_LinphoneMessageDelivered
,
1
));
ms_free
(
message_id
);
// if imdn received before 200 ok, chat message will change directly state to DeliveredToUser from Inprogress.
//BC_ASSERT_TRUE(wait_for(pauline->lc,marie->lc,&marie->stat.number_of_LinphoneMessageDelivered,1));
BC_ASSERT_TRUE
(
wait_for
(
pauline
->
lc
,
marie
->
lc
,
&
marie
->
stat
.
number_of_LinphoneMessageDeliveredToUser
,
1
));
BC_ASSERT_EQUAL
(
pauline
->
stat
.
number_of_LinphoneMessageReceived
,
1
,
int
,
"%d"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment