From 57b75697969b3cfd0cc5fe6ca3c98b38acc16608 Mon Sep 17 00:00:00 2001 From: Benny Prijono Date: Sat, 7 Jan 2006 18:44:25 +0000 Subject: Added test functions for UAC transaction git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@109 74dad513-b988-da41-8d7b-12977e46ad98 --- pjsip/src/test-pjsip/msg_test.c | 42 ++++++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 19 deletions(-) (limited to 'pjsip/src/test-pjsip/msg_test.c') diff --git a/pjsip/src/test-pjsip/msg_test.c b/pjsip/src/test-pjsip/msg_test.c index 11a69b43..f49f1256 100644 --- a/pjsip/src/test-pjsip/msg_test.c +++ b/pjsip/src/test-pjsip/msg_test.c @@ -23,6 +23,7 @@ #define POOL_SIZE 8000 #define LOOP 10000 #define AVERAGE_MSG_LEN 800 +#define THIS_FILE "msg_test.c" static pjsip_msg *create_msg0(pj_pool_t *pool); static pjsip_msg *create_msg1(pj_pool_t *pool); @@ -142,7 +143,7 @@ static pj_status_t test_entry( pj_pool_t *pool, struct test_msg *entry ) } } if (msg_size != entry->len) { - PJ_LOG(3,("", " error: size mismatch")); + PJ_LOG(3,(THIS_FILE, " error: size mismatch")); return -6; } pj_get_timestamp(&t2); @@ -162,7 +163,7 @@ parse_msg: if (entry->expected_status != STATUS_SYNTAX_ERROR) { status = -10; if (err_list.next != &err_list) { - PJ_LOG(3,("", " Syntax error in line %d col %d", + PJ_LOG(3,(THIS_FILE, " Syntax error in line %d col %d", err_list.next->line, err_list.next->col)); } goto on_return; @@ -207,14 +208,14 @@ parse_msg: } } else { if (parsed_msg->line.status.code != ref_msg->line.status.code) { - PJ_LOG(3,("", " error: status code mismatch")); + PJ_LOG(3,(THIS_FILE, " error: status code mismatch")); status = -32; goto on_return; } if (pj_strcmp(&parsed_msg->line.status.reason, &ref_msg->line.status.reason) != 0) { - PJ_LOG(3,("", " error: status text mismatch")); + PJ_LOG(3,(THIS_FILE, " error: status text mismatch")); status = -33; goto on_return; } @@ -243,7 +244,7 @@ parse_msg: if (pj_strcmp(&str1, &str2) != 0) { status = -60; - PJ_LOG(3,("", " error: header string mismatch:\n" + PJ_LOG(3,(THIS_FILE, " error: header string mismatch:\n" " h1='%s'\n" " h2='%s'\n", str1.ptr, str2.ptr)); @@ -683,7 +684,7 @@ int msg_test(void) pj_time_val elapsed; pj_highprec_t avg_detect, avg_parse, avg_print, kbytes; - PJ_LOG(3,("", " simple test..")); + PJ_LOG(3,(THIS_FILE, " simple test..")); for (i=0; i