Ignore:
Timestamp:
Nov 20, 2005 7:58:10 PM (18 years ago)
Author:
bennylp
Message:

More compliant URI parser, comparison, etc.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/test-pjsip/test.c

    • Property svn:keyword set to Id
    r61 r64  
    4747} 
    4848 
     49pj_status_t register_static_modules(pj_size_t *count, pjsip_module **modules) 
     50{ 
     51    *count = 0; 
     52    return PJ_SUCCESS; 
     53} 
    4954 
    50  
    51 int main() 
     55int test_main(void) 
    5256{ 
    5357    pj_status_t rc; 
     58    pj_caching_pool caching_pool; 
     59    const char *filename; 
     60    int line; 
     61 
     62    pj_log_set_level(3); 
     63    pj_log_set_decor(PJ_LOG_HAS_NEWLINE | PJ_LOG_HAS_TIME |  
     64                     PJ_LOG_HAS_MICRO_SEC); 
    5465 
    5566    if ((rc=pj_init()) != PJ_SUCCESS) { 
    5667        app_perror("pj_init", rc); 
     68        return rc; 
    5769    } 
    5870 
    59     DO_TEST(parse_uri()); 
    60     DO_TEST(parse_msg()); 
     71    pj_dump_config(); 
     72 
     73    pj_caching_pool_init( &caching_pool, &pj_pool_factory_default_policy, 0 ); 
     74 
     75    rc = pjsip_endpt_create(&caching_pool.factory, "endpt", &endpt); 
     76    if (rc != PJ_SUCCESS) { 
     77        app_perror("pjsip_endpt_create", rc); 
     78        pj_caching_pool_destroy(&caching_pool); 
     79        return rc; 
     80    } 
     81 
     82    PJ_LOG(3,("","")); 
     83 
     84    DO_TEST(uri_test()); 
    6185 
    6286on_return: 
     87 
     88    pjsip_endpt_destroy(endpt); 
     89    pj_caching_pool_destroy(&caching_pool); 
     90 
     91    PJ_LOG(3,("test", "")); 
     92  
     93    pj_thread_get_stack_info(pj_thread_this(), &filename, &line); 
     94    PJ_LOG(3,("test", "Stack max usage: %u, deepest: %s:%u",  
     95                      pj_thread_get_stack_max_usage(pj_thread_this()), 
     96                      filename, line)); 
     97    if (rc == 0) 
     98        PJ_LOG(3,("test", "Looks like everything is okay!..")); 
     99    else 
     100        PJ_LOG(3,("test", "Test completed with error(s)")); 
     101 
    63102    return 0; 
    64103} 
Note: See TracChangeset for help on using the changeset viewer.