Changeset 4728 for pjproject/trunk/pjsip/src/test/uri_test.c
- Timestamp:
- Feb 4, 2014 10:13:56 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/test/uri_test.c
r4641 r4728 1 1 /* $Id$ */ 2 /* 2 /* 3 3 * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) 4 4 * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> … … 16 16 * You should have received a copy of the GNU General Public License 17 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 19 */ 20 20 #include "test.h" … … 68 68 static pjsip_uri *create_uri16( pj_pool_t *pool ); 69 69 static pjsip_uri *create_uri17( pj_pool_t *pool ); 70 static pjsip_uri *create_uri18( pj_pool_t *pool );71 70 static pjsip_uri *create_uri25( pj_pool_t *pool ); 72 71 static pjsip_uri *create_uri26( pj_pool_t *pool ); … … 97 96 const char *printed; 98 97 pj_size_t len; 99 } uri_test_array[] = 98 } uri_test_array[] = 100 99 { 101 100 { … … 184 183 { 185 184 /* Excercise strange character sets allowed in display, user, password, 186 * host, and port. 185 * host, and port. 187 186 */ 188 187 PJ_SUCCESS, … … 198 197 }, 199 198 { 200 /* Another excercise to the allowed character sets to the username 199 /* Another excercise to the allowed character sets to the username 201 200 * and password. 202 201 */ … … 439 438 { 440 439 /* "sip:localhost;pickup=hurry;user=phone;message=I%20am%20sorry" 441 "?Subject=Hello%20There&Server=SIP%20Server" 440 "?Subject=Hello%20There&Server=SIP%20Server" 442 441 */ 443 442 pjsip_sip_uri *url = pjsip_sip_uri_create(pool, 0); … … 659 658 660 659 uri->number = pj_str("(44).1234-*#+Deaf"); 661 return (pjsip_uri*)uri; 660 return (pjsip_uri*)uri; 662 661 } 663 662 … … 669 668 uri->number = pj_str("+1"); 670 669 uri->isub_param = pj_str("/:@&$,-_.!~*'()[]/:&$aA1!+="); 671 return (pjsip_uri*)uri; 670 return (pjsip_uri*)uri; 672 671 } 673 672 … … 679 678 uri->number = pj_str("+1"); 680 679 uri->ext_param = pj_str("+123"); 681 return (pjsip_uri*)uri; 680 return (pjsip_uri*)uri; 682 681 } 683 682 … … 689 688 uri->number = pj_str("911"); 690 689 uri->context = pj_str("+1-911"); 691 return (pjsip_uri*)uri; 690 return (pjsip_uri*)uri; 692 691 } 693 692 … … 699 698 uri->number = pj_str("911"); 700 699 uri->context = pj_str("EMERGENCY.EXAMPLE.COM"); 701 return (pjsip_uri*)uri; 700 return (pjsip_uri*)uri; 702 701 } 703 702 … … 709 708 710 709 uri->number = pj_str("911"); 711 710 712 711 p = PJ_POOL_ALLOC_T(pool, pjsip_param); 713 712 p->name = p->value = pj_str("p1"); 714 713 pj_list_insert_before(&uri->other_param, p); 715 714 716 return (pjsip_uri*)uri; 715 return (pjsip_uri*)uri; 717 716 } 718 717 … … 750 749 url = pjsip_sip_uri_create(pool, 0); 751 750 url->host = pj_str("localhost"); 752 751 753 752 name->uri = (pjsip_uri*)url; 754 753 … … 768 767 url = pjsip_sip_uri_create(pool, 0); 769 768 url->host = pj_str("localhost"); 770 769 771 770 name->uri = (pjsip_uri*)url; 772 771 … … 1000 999 avg_parse = 1000000 / avg_parse; 1001 1000 1002 PJ_LOG(3,(THIS_FILE, 1003 " %u.%u MB of urls parsed in %d.%03ds (avg=%d urls/sec)", 1001 PJ_LOG(3,(THIS_FILE, 1002 " %u.%u MB of urls parsed in %d.%03ds (avg=%d urls/sec)", 1004 1003 (unsigned)(var.parse_len/1000000), (unsigned)kbytes, 1005 1004 elapsed.sec, elapsed.msec, … … 1019 1018 avg_print = 1000000 / avg_print; 1020 1019 1021 PJ_LOG(3,(THIS_FILE, 1022 " %u.%u MB of urls printed in %d.%03ds (avg=%d urls/sec)", 1020 PJ_LOG(3,(THIS_FILE, 1021 " %u.%u MB of urls printed in %d.%03ds (avg=%d urls/sec)", 1023 1022 (unsigned)(var.print_len/1000000), (unsigned)kbytes, 1024 1023 elapsed.sec, elapsed.msec, … … 1038 1037 avg_cmp = 1000000 / avg_cmp; 1039 1038 1040 PJ_LOG(3,(THIS_FILE, 1041 " %u.%u MB of urls compared in %d.%03ds (avg=%d urls/sec)", 1039 PJ_LOG(3,(THIS_FILE, 1040 " %u.%u MB of urls compared in %d.%03ds (avg=%d urls/sec)", 1042 1041 (unsigned)(var.cmp_len/1000000), (unsigned)kbytes, 1043 1042 elapsed.sec, elapsed.msec, … … 1085 1084 1086 1085 1087 /* 1088 * Print maximum parse/sec 1086 /* 1087 * Print maximum parse/sec 1089 1088 */ 1090 1089 for (i=0, max=0; i<COUNT; ++i)
Note: See TracChangeset
for help on using the changeset viewer.