Changeset 555
- Timestamp:
- Jun 26, 2006 3:12:55 PM (18 years ago)
- Location:
- pjproject/trunk/pjsip/src/test-pjsip
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/test-pjsip/test.c
r547 r555 126 126 } 127 127 128 #if INCLUDE_URI_TEST 128 129 DO_TEST(uri_test()); 130 #endif 131 132 #if INCLUDE_MSG_TEST 129 133 DO_TEST(msg_test()); 130 134 DO_TEST(msg_err_test()); 135 #endif 136 137 #if INCLUDE_TXDATA_TEST 131 138 DO_TEST(txdata_test()); 139 #endif 140 141 #if INCLUDE_UDP_TEST 132 142 DO_TEST(transport_udp_test()); 143 #endif 144 145 #if INCLUDE_LOOP_TEST 133 146 DO_TEST(transport_loop_test()); 147 #endif 148 149 #if INCLUDE_TSX_TEST 134 150 DO_TEST(tsx_basic_test()); 135 151 DO_TEST(tsx_uac_test()); 136 152 DO_TEST(tsx_uas_test()); 153 #endif 154 137 155 138 156 on_return: -
pjproject/trunk/pjsip/src/test-pjsip/test.h
r547 r555 26 26 #define TEST_UDP_PORT 15060 27 27 #define TEST_UDP_PORT_STR "15060" 28 29 30 #define INCLUDE_MESSAGING_GROUP 1 31 #define INCLUDE_TRANSPORT_GROUP 1 32 #define INCLUDE_TSX_GROUP 1 33 34 35 36 #define INCLUDE_URI_TEST INCLUDE_MESSAGING_GROUP 37 #define INCLUDE_MSG_TEST INCLUDE_MESSAGING_GROUP 38 #define INCLUDE_TXDATA_TEST INCLUDE_MESSAGING_GROUP 39 #define INCLUDE_UDP_TEST INCLUDE_TRANSPORT_GROUP 40 #define INCLUDE_LOOP_TEST INCLUDE_TRANSPORT_GROUP 41 #define INCLUDE_TSX_TEST INCLUDE_TSX_GROUP 42 43 28 44 29 45 /* The tests */ -
pjproject/trunk/pjsip/src/test-pjsip/tsx_uac_test.c
r547 r555 947 947 // Ignore send result. Some tests do deliberately triggers error 948 948 // when sending message. 949 //if (status != PJ_SUCCESS) {950 //app_perror(" Error: unable to send request", status);951 //pjsip_tx_data_dec_ref(tdata);952 //return -120;953 //}949 if (status != PJ_SUCCESS) { 950 // app_perror(" Error: unable to send request", status); 951 pjsip_tx_data_dec_ref(tdata); 952 // return -120; 953 } 954 954 955 955 -
pjproject/trunk/pjsip/src/test-pjsip/tsx_uas_test.c
r547 r555 445 445 * TEST4_BRANCH_ID tests receiving retransmissions in TRYING state. 446 446 */ 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) { 448 450 449 451 /* Check that status code is status_code. */ 450 452 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)); 452 457 test_complete = -120; 453 458 } … … 461 466 } else if (tsx->state != PJSIP_TSX_STATE_DESTROYED) 462 467 { 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))); 464 470 test_complete = -122; 465 471 … … 472 478 * TEST5_BRANCH_ID tests receiving retransmissions in PROCEEDING state 473 479 */ 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) { 475 484 476 485 /* Check that status code is status_code. */ … … 495 504 496 505 } 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))); 498 508 test_complete = -133; 499 509 … … 505 515 * TEST6_BRANCH_ID tests receiving retransmissions in COMPLETED state 506 516 */ 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) { 508 521 509 522 /* Check that status code is status_code. */ … … 523 536 tsx->state != PJSIP_TSX_STATE_DESTROYED) 524 537 { 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))); 526 540 test_complete = -142; 527 541 … … 544 558 code = TEST8_STATUS_CODE; 545 559 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) { 547 564 548 565 if (test_complete == 0) … … 577 594 } else if (tsx->state != PJSIP_TSX_STATE_DESTROYED) { 578 595 579 PJ_LOG(3,(THIS_FILE, " error: unexpected state "));596 PJ_LOG(3,(THIS_FILE, " error: unexpected state (154)")); 580 597 test_complete = -154; 581 598 … … 590 607 */ 591 608 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) { 593 613 594 614 if (test_complete == 0) … … 638 658 } else if (tsx->state != PJSIP_TSX_STATE_DESTROYED) { 639 659 640 PJ_LOG(3,(THIS_FILE, " error: unexpected state "));660 PJ_LOG(3,(THIS_FILE, " error: unexpected state (166)")); 641 661 test_complete = -166; 642 662 … … 746 766 if (status != PJ_SUCCESS) { 747 767 app_perror(" error: unable to create transaction", status); 748 test_complete = -1 20;768 test_complete = -116; 749 769 return PJ_TRUE; 750 770 } … … 1272 1292 int status; 1273 1293 1274 PJ_LOG(3,(THIS_FILE," test 1: basic sending 2xx final response"));1294 PJ_LOG(3,(THIS_FILE," test3: basic sending 2xx final response")); 1275 1295 1276 1296 status = perform_test("sip:129.0.0.1;transport=loop-dgram",
Note: See TracChangeset
for help on using the changeset viewer.