MCPcopy Create free account
hub / github.com/OpenDDS/OpenDDS / check_read_status

Function check_read_status

tests/DCPS/ViewState/main.cpp:100–141  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

98}
99
100void 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
144int ACE_TMAIN (int argc, ACE_TCHAR *argv[])

Callers 1

ACE_TMAINFunction · 0.70

Calls 2

TestExceptionClass · 0.70
lengthMethod · 0.45

Tested by

no test coverage detected