Commit 3386feae authored by Guillaume BIENKOWSKI's avatar Guillaume BIENKOWSKI

Fix some tests where string were compared in-place, and add braces for debug...

Fix some tests where string were compared in-place, and add braces for debug trace after a conditional.
parent e1954482
......@@ -424,7 +424,10 @@ void belle_sip_main_loop_iterate(belle_sip_main_loop_t *ml){
next=elem->next;
if (!s->cancelled){
char *objdesc=belle_sip_object_to_string((belle_sip_object_t*)s);
if (s->timeout>0)/*to avoid too many traces*/ belle_sip_debug("source %s notified revents=%u, timeout=%i",objdesc,revents,s->timeout);
if (s->timeout>0) {
/*to avoid too many traces*/
belle_sip_debug("source %s notified revents=%u, timeout=%i",objdesc,revents,s->timeout);
}
belle_sip_free(objdesc);
ret=s->notify(s->data,s->revents);
if (ret==BELLE_SIP_STOP || s->oneshot){
......
......@@ -182,7 +182,7 @@ static void test_dictionary(void)
belle_sip_dict_clear(obj);
// test_str shouldn't exist anymore
CU_ASSERT_EQUAL(belle_sip_dict_get_string(obj,"test_str","toto"),"toto");
CU_ASSERT_STRING_EQUAL(belle_sip_dict_get_string(obj,"test_str","toto"),"toto");
belle_sip_object_unref(obj);
}
......
......@@ -227,7 +227,7 @@ static void server_process_request_event(void *obj, const belle_sip_request_even
belle_sip_header_t* sip_if_match=belle_sip_message_get_header(BELLE_SIP_MESSAGE(resp),"SIP-If-Match");
if (sip_if_match) {
CU_ASSERT_EQUAL(belle_sip_header_extension_get_value(BELLE_SIP_HEADER_EXTENSION(sip_if_match)),"blablietag");
CU_ASSERT_STRING_EQUAL(belle_sip_header_extension_get_value(BELLE_SIP_HEADER_EXTENSION(sip_if_match)),"blablietag");
}
/*check for body*/
CU_ASSERT_PTR_NOT_NULL(belle_sip_message_get_body(BELLE_SIP_MESSAGE(req)));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment