| 98 | } |
| 99 | |
| 100 | void check_read_status(DDS::ReturnCode_t status, |
| 101 | const Test::SimpleSeq& data, |
| 102 | CORBA::ULong expected, |
| 103 | const char* where) |
| 104 | { |
| 105 | if (status == ::DDS::RETCODE_OK) |
| 106 | { |
| 107 | if (data.length() != expected) |
| 108 | { |
| 109 | ACE_ERROR ((LM_ERROR, |
| 110 | ACE_TEXT("(%P|%t) %C ERROR: expected %d samples but got %d\n"), |
| 111 | where, expected, data.length() )); |
| 112 | test_failed = 1; |
| 113 | throw TestException(); |
| 114 | } |
| 115 | |
| 116 | } |
| 117 | else if (status == ::DDS::RETCODE_NO_DATA) |
| 118 | { |
| 119 | ACE_ERROR ((LM_ERROR, |
| 120 | ACE_TEXT("(%P|%t) %C ERROR: reader received NO_DATA!\n"), |
| 121 | where)); |
| 122 | test_failed = 1; |
| 123 | throw TestException(); |
| 124 | } |
| 125 | else if (status == ::DDS::RETCODE_PRECONDITION_NOT_MET) |
| 126 | { |
| 127 | ACE_ERROR ((LM_ERROR, |
| 128 | ACE_TEXT("(%P|%t) %C ERROR: reader received PRECONDITION_NOT_MET!\n"), |
| 129 | where)); |
| 130 | test_failed = 1; |
| 131 | throw TestException(); |
| 132 | } |
| 133 | else |
| 134 | { |
| 135 | ACE_ERROR((LM_ERROR, |
| 136 | ACE_TEXT("(%P|%t) %C ERROR: unexpected status %d!\n"), |
| 137 | where, status )); |
| 138 | test_failed = 1; |
| 139 | throw TestException(); |
| 140 | } |
| 141 | } |
| 142 | |
| 143 | |
| 144 | int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) |
no test coverage detected