Changeset 1347


Ignore:
Timestamp:
Jun 7, 2007 3:46:07 PM (12 years ago)
Author:
bennylp
Message:

Ticket #326: Add DNS resolver and DNS SRV resolver test in pjlib-util

Location:
pjproject/trunk/pjlib-util/src/pjlib-util-test
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib-util/src/pjlib-util-test/main.c

    r1001 r1347  
    1818 */ 
    1919#include "test.h" 
     20#include <pj/string.h> 
    2021 
    2122#if defined(PJ_SUNOS) && PJ_SUNOS!=0 
     
    4950    rc = test_main(); 
    5051 
     52    if (argc==2 && pj_ansi_strcmp(argv[1], "-i")==0) { 
     53        char s[10]; 
     54 
     55        puts("Press ENTER to quit"); 
     56        fgets(s, sizeof(s), stdin); 
     57    } 
     58 
    5159    return rc; 
    5260} 
  • pjproject/trunk/pjlib-util/src/pjlib-util-test/test.c

    r1003 r1347  
    1919#include "test.h" 
    2020#include <pjlib.h> 
     21#include <pjlib-util.h> 
    2122 
    2223void app_perror(const char *msg, pj_status_t rc) 
     
    5051    mem = &caching_pool.factory; 
    5152 
    52     pj_log_set_level(3); 
     53    pj_log_set_level(5); 
    5354    pj_log_set_decor(PJ_LOG_HAS_NEWLINE | PJ_LOG_HAS_TIME |  
    5455                     PJ_LOG_HAS_MICRO_SEC); 
     
    5960        return rc; 
    6061    } 
    61      
     62 
     63    rc = pjlib_util_init(); 
     64    pj_assert(rc == 0); 
     65 
    6266    pj_dump_config(); 
    6367    pj_caching_pool_init( &caching_pool, &pj_pool_factory_default_policy, 0 ); 
     
    7478#if INCLUDE_STUN_TEST 
    7579    DO_TEST(stun_test()); 
     80#endif 
     81 
     82#if INCLUDE_RESOLVER_TEST 
     83    DO_TEST(resolver_test()); 
    7684#endif 
    7785 
  • pjproject/trunk/pjlib-util/src/pjlib-util-test/test.h

    r1003 r1347  
    2222#define INCLUDE_ENCRYPTION_TEST     1 
    2323#define INCLUDE_STUN_TEST           1 
     24#define INCLUDE_RESOLVER_TEST       1 
    2425 
    2526extern int xml_test(void); 
     
    2829extern int stun_test(); 
    2930extern int test_main(void); 
     31extern int resolver_test(void); 
    3032 
    3133extern void app_perror(const char *title, pj_status_t rc); 
Note: See TracChangeset for help on using the changeset viewer.