ChannelArray.getLength() test added

This commit is contained in:
Matej Sekoranja
2014-06-03 14:17:09 +02:00
parent 0419fc6a38
commit 90ca073f45
2 changed files with 44 additions and 5 deletions

View File

@@ -43,9 +43,9 @@ std::string ChannelAccessIFTest::TEST_ARRAY_CHANNEL_NAME = "testArray1";
int ChannelAccessIFTest::runAllTest() {
#ifdef ENABLE_STRESS_TESTS
testPlan(157);
testPlan(159);
#else
testPlan(152);
testPlan(154);
#endif
test_implementation();
@@ -1973,6 +1973,21 @@ void ChannelAccessIFTest::test_channelArray() {
}
*/
// test setLength with capacity 0 (no change) and getLength
size_t newLen = bigCapacity/2;
succStatus = arrayReq->syncSetLength(false, newLen, bigCapacity, getTimeoutSec());
if (!succStatus) {
testFail("%s: an array setLength failed (4) ", CURRENT_FUNCTION);
return;
}
succStatus = arrayReq->syncGetLength(false, getTimeoutSec());
if (!succStatus) {
testFail("%s: an array getLength failed", CURRENT_FUNCTION);
return;
}
testOk(arrayReq->getLength() == newLen, "%s: retrieved length should be %zu", CURRENT_FUNCTION, newLen);
testOk(arrayReq->getCapacity() == bigCapacity, "%s: retrieved capacity should be %zu", CURRENT_FUNCTION, bigCapacity);
channel->destroy();
}