Ignore:
Timestamp:
Jun 26, 2006 3:12:55 PM (18 years ago)
Author:
bennylp
Message:

Bring the dead pjsip-test up to date with latest pjsip

File:
1 edited

Legend:

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

    r547 r555  
    445445         * TEST4_BRANCH_ID tests receiving retransmissions in TRYING state. 
    446446         */ 
    447         if (tsx->state == PJSIP_TSX_STATE_TERMINATED) { 
     447        if (tsx->state == PJSIP_TSX_STATE_TRYING) { 
     448            /* Request is received. */ 
     449        } else if (tsx->state == PJSIP_TSX_STATE_TERMINATED) { 
    448450 
    449451            /* Check that status code is status_code. */ 
    450452            if (tsx->status_code != TEST4_STATUS_CODE) { 
    451                 PJ_LOG(3,(THIS_FILE, "    error: incorrect status code")); 
     453                PJ_LOG(3,(THIS_FILE,  
     454                          "    error: incorrect status code %d " 
     455                          "(expecting %d)", tsx->status_code, 
     456                          TEST4_STATUS_CODE)); 
    452457                test_complete = -120; 
    453458            } 
     
    461466        } else if (tsx->state != PJSIP_TSX_STATE_DESTROYED)  
    462467        { 
    463             PJ_LOG(3,(THIS_FILE, "    error: unexpected state")); 
     468            PJ_LOG(3,(THIS_FILE, "    error: unexpected state %s (122)", 
     469                      pjsip_tsx_state_str(tsx->state))); 
    464470            test_complete = -122; 
    465471 
     
    472478         * TEST5_BRANCH_ID tests receiving retransmissions in PROCEEDING state 
    473479         */ 
    474         if (tsx->state == PJSIP_TSX_STATE_TERMINATED) { 
     480        if (tsx->state == PJSIP_TSX_STATE_TRYING) { 
     481            /* Request is received. */ 
     482 
     483        } else if (tsx->state == PJSIP_TSX_STATE_TERMINATED) { 
    475484 
    476485            /* Check that status code is status_code. */ 
     
    495504 
    496505        } else if (tsx->state != PJSIP_TSX_STATE_DESTROYED) { 
    497             PJ_LOG(3,(THIS_FILE, "    error: unexpected state")); 
     506            PJ_LOG(3,(THIS_FILE, "    error: unexpected state %s (133)", 
     507                      pjsip_tsx_state_str(tsx->state))); 
    498508            test_complete = -133; 
    499509 
     
    505515         * TEST6_BRANCH_ID tests receiving retransmissions in COMPLETED state 
    506516         */ 
    507         if (tsx->state == PJSIP_TSX_STATE_TERMINATED) { 
     517        if (tsx->state == PJSIP_TSX_STATE_TRYING) { 
     518            /* Request is received. */ 
     519 
     520        } else if (tsx->state == PJSIP_TSX_STATE_TERMINATED) { 
    508521 
    509522            /* Check that status code is status_code. */ 
     
    523536                   tsx->state != PJSIP_TSX_STATE_DESTROYED)  
    524537        { 
    525             PJ_LOG(3,(THIS_FILE, "    error: unexpected state")); 
     538            PJ_LOG(3,(THIS_FILE, "    error: unexpected state %s (142)", 
     539                      pjsip_tsx_state_str(tsx->state))); 
    526540            test_complete = -142; 
    527541 
     
    544558            code = TEST8_STATUS_CODE; 
    545559 
    546         if (tsx->state == PJSIP_TSX_STATE_TERMINATED) { 
     560        if (tsx->state == PJSIP_TSX_STATE_TRYING) { 
     561            /* Request is received. */ 
     562 
     563        } else if (tsx->state == PJSIP_TSX_STATE_TERMINATED) { 
    547564 
    548565            if (test_complete == 0) 
     
    577594        } else if (tsx->state != PJSIP_TSX_STATE_DESTROYED)  { 
    578595 
    579             PJ_LOG(3,(THIS_FILE, "    error: unexpected state")); 
     596            PJ_LOG(3,(THIS_FILE, "    error: unexpected state (154)")); 
    580597            test_complete = -154; 
    581598 
     
    590607         */ 
    591608 
    592         if (tsx->state == PJSIP_TSX_STATE_TERMINATED) { 
     609        if (tsx->state == PJSIP_TSX_STATE_TRYING) { 
     610            /* Request is received. */ 
     611 
     612        } else if (tsx->state == PJSIP_TSX_STATE_TERMINATED) { 
    593613 
    594614            if (test_complete == 0) 
     
    638658        } else if (tsx->state != PJSIP_TSX_STATE_DESTROYED)  { 
    639659 
    640             PJ_LOG(3,(THIS_FILE, "    error: unexpected state")); 
     660            PJ_LOG(3,(THIS_FILE, "    error: unexpected state (166)")); 
    641661            test_complete = -166; 
    642662 
     
    746766            if (status != PJ_SUCCESS) { 
    747767                app_perror("    error: unable to create transaction", status); 
    748                 test_complete = -120; 
     768                test_complete = -116; 
    749769                return PJ_TRUE; 
    750770            } 
     
    12721292    int status; 
    12731293 
    1274     PJ_LOG(3,(THIS_FILE,"  test1: basic sending 2xx final response")); 
     1294    PJ_LOG(3,(THIS_FILE,"  test3: basic sending 2xx final response")); 
    12751295 
    12761296    status = perform_test("sip:129.0.0.1;transport=loop-dgram", 
Note: See TracChangeset for help on using the changeset viewer.