perform renaming
This commit is contained in:
@ -30,7 +30,7 @@ ReturnValue_t TestAssembly::commandChildren(Mode_t mode, Submode_t submode) {
|
||||
#else
|
||||
sif::printInfo("TestAssembly: Received command to go to mode %d submode %d\n", mode, submode);
|
||||
#endif
|
||||
ReturnValue_t result = RETURN_OK;
|
||||
ReturnValue_t result = returnvalue::OK;
|
||||
if (mode == MODE_OFF) {
|
||||
commandTable[0].setMode(MODE_OFF);
|
||||
commandTable[0].setSubmode(SUBMODE_NONE);
|
||||
@ -113,14 +113,14 @@ ReturnValue_t TestAssembly::isModeCombinationValid(Mode_t mode, Submode_t submod
|
||||
switch (mode) {
|
||||
case MODE_OFF:
|
||||
if (submode == SUBMODE_NONE) {
|
||||
return RETURN_OK;
|
||||
return returnvalue::OK;
|
||||
} else {
|
||||
return INVALID_SUBMODE;
|
||||
}
|
||||
case DeviceHandlerIF::MODE_NORMAL:
|
||||
case MODE_ON:
|
||||
if (submode < 3) {
|
||||
return RETURN_OK;
|
||||
return returnvalue::OK;
|
||||
} else {
|
||||
return INVALID_SUBMODE;
|
||||
}
|
||||
@ -130,24 +130,24 @@ ReturnValue_t TestAssembly::isModeCombinationValid(Mode_t mode, Submode_t submod
|
||||
|
||||
ReturnValue_t TestAssembly::initialize() {
|
||||
ReturnValue_t result = AssemblyBase::initialize();
|
||||
if (result != RETURN_OK) {
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
handler0 = ObjectManager::instance()->get<TestDevice>(deviceHandler0Id);
|
||||
handler1 = ObjectManager::instance()->get<TestDevice>(deviceHandler1Id);
|
||||
if ((handler0 == nullptr) or (handler1 == nullptr)) {
|
||||
return HasReturnvaluesIF::RETURN_FAILED;
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
|
||||
handler0->setParentQueue(this->getCommandQueue());
|
||||
handler1->setParentQueue(this->getCommandQueue());
|
||||
|
||||
result = registerChild(deviceHandler0Id);
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
result = registerChild(deviceHandler1Id);
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
return result;
|
||||
@ -160,11 +160,11 @@ ReturnValue_t TestAssembly::checkChildrenStateOn(Mode_t wantedMode, Submode_t wa
|
||||
return NOT_ENOUGH_CHILDREN_IN_CORRECT_STATE;
|
||||
}
|
||||
}
|
||||
return RETURN_OK;
|
||||
return returnvalue::OK;
|
||||
} else if (submode == submodes::SINGLE) {
|
||||
for (const auto& info : childrenMap) {
|
||||
if (info.second.mode == wantedMode and info.second.mode != wantedSubmode) {
|
||||
return RETURN_OK;
|
||||
return returnvalue::OK;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ TestController::TestController(object_id_t objectId, object_id_t parentId, size_
|
||||
TestController::~TestController() {}
|
||||
|
||||
ReturnValue_t TestController::handleCommandMessage(CommandMessage *message) {
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
void TestController::performControlOperation() {}
|
||||
@ -24,7 +24,7 @@ LocalPoolDataSetBase *TestController::getDataSetHandle(sid_t sid) { return nullp
|
||||
|
||||
ReturnValue_t TestController::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
||||
LocalDataPoolManager &poolManager) {
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
ReturnValue_t TestController::initializeAfterTaskCreation() {
|
||||
@ -33,5 +33,5 @@ ReturnValue_t TestController::initializeAfterTaskCreation() {
|
||||
|
||||
ReturnValue_t TestController::checkModeCommand(Mode_t mode, Submode_t submode,
|
||||
uint32_t *msToReachTheMode) {
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
@ -139,7 +139,7 @@ ReturnValue_t TestDevice::buildCommandFromCommand(DeviceCommandId_t deviceComman
|
||||
const uint8_t* commandData,
|
||||
size_t commandDataLen) {
|
||||
using namespace testdevice;
|
||||
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
|
||||
ReturnValue_t result = returnvalue::OK;
|
||||
switch (deviceCommand) {
|
||||
case (TEST_NORMAL_MODE_CMD): {
|
||||
commandSent = true;
|
||||
@ -222,7 +222,7 @@ ReturnValue_t TestDevice::buildNormalModeCommand(DeviceCommandId_t deviceCommand
|
||||
}
|
||||
/* The command is passed on in the command buffer as it is */
|
||||
passOnCommand(deviceCommand, commandData, commandDataLen);
|
||||
return RETURN_OK;
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
ReturnValue_t TestDevice::buildTestCommand0(DeviceCommandId_t deviceCommand,
|
||||
@ -248,7 +248,7 @@ ReturnValue_t TestDevice::buildTestCommand0(DeviceCommandId_t deviceCommand,
|
||||
|
||||
/* The command is passed on in the command buffer as it is */
|
||||
passOnCommand(deviceCommand, commandData, commandDataLen);
|
||||
return RETURN_OK;
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
ReturnValue_t TestDevice::buildTestCommand1(DeviceCommandId_t deviceCommand,
|
||||
@ -277,7 +277,7 @@ ReturnValue_t TestDevice::buildTestCommand1(DeviceCommandId_t deviceCommand,
|
||||
size_t size = commandDataLen;
|
||||
ReturnValue_t result =
|
||||
SerializeAdapter::deSerialize(¶meter1, &commandData, &size, SerializeIF::Endianness::BIG);
|
||||
if (result == HasReturnvaluesIF::RETURN_FAILED) {
|
||||
if (result == returnvalue::FAILED) {
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -299,7 +299,7 @@ ReturnValue_t TestDevice::buildTestCommand1(DeviceCommandId_t deviceCommand,
|
||||
memcpy(commandBuffer + 6, ¶meter2, sizeof(parameter2));
|
||||
rawPacket = commandBuffer;
|
||||
rawPacketLen = sizeof(deviceCommand) + sizeof(parameter1) + sizeof(parameter2);
|
||||
return RETURN_OK;
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
void TestDevice::passOnCommand(DeviceCommandId_t command, const uint8_t* commandData,
|
||||
@ -342,7 +342,7 @@ ReturnValue_t TestDevice::scanForReply(const uint8_t* start, size_t len, DeviceC
|
||||
size_t size = len;
|
||||
ReturnValue_t result =
|
||||
SerializeAdapter::deSerialize(foundId, &start, &size, SerializeIF::Endianness::BIG);
|
||||
if (result != RETURN_OK) {
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -366,7 +366,7 @@ ReturnValue_t TestDevice::scanForReply(const uint8_t* start, size_t len, DeviceC
|
||||
|
||||
*foundLen = len;
|
||||
*foundId = pendingCmd;
|
||||
return RETURN_OK;
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
case (TEST_COMMAND_0): {
|
||||
@ -389,7 +389,7 @@ ReturnValue_t TestDevice::scanForReply(const uint8_t* start, size_t len, DeviceC
|
||||
|
||||
*foundLen = TEST_COMMAND_0_SIZE;
|
||||
*foundId = pendingCmd;
|
||||
return RETURN_OK;
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
case (TEST_COMMAND_1): {
|
||||
@ -409,7 +409,7 @@ ReturnValue_t TestDevice::scanForReply(const uint8_t* start, size_t len, DeviceC
|
||||
|
||||
*foundLen = len;
|
||||
*foundId = pendingCmd;
|
||||
return RETURN_OK;
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
default:
|
||||
@ -418,7 +418,7 @@ ReturnValue_t TestDevice::scanForReply(const uint8_t* start, size_t len, DeviceC
|
||||
}
|
||||
|
||||
ReturnValue_t TestDevice::interpretDeviceReply(DeviceCommandId_t id, const uint8_t* packet) {
|
||||
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
|
||||
ReturnValue_t result = returnvalue::OK;
|
||||
switch (id) {
|
||||
/* Periodic replies */
|
||||
case testdevice::TEST_NORMAL_MODE_CMD: {
|
||||
@ -460,7 +460,7 @@ ReturnValue_t TestDevice::interpretingNormalModeReply() {
|
||||
dataset.testFloat3Vec.value[2] = 0.0;
|
||||
dataset.setValidity(false, true);
|
||||
}
|
||||
return RETURN_OK;
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
PoolReadGuard readHelper(&dataset);
|
||||
@ -570,7 +570,7 @@ ReturnValue_t TestDevice::interpretingNormalModeReply() {
|
||||
}
|
||||
}
|
||||
|
||||
return RETURN_OK;
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
ReturnValue_t TestDevice::interpretingTestReply0(DeviceCommandId_t id, const uint8_t* packet) {
|
||||
@ -589,7 +589,7 @@ ReturnValue_t TestDevice::interpretingTestReply0(DeviceCommandId_t id, const uin
|
||||
actionHelper.step(1, commander, id);
|
||||
actionHelper.finish(true, commander, id);
|
||||
|
||||
return RETURN_OK;
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
ReturnValue_t TestDevice::interpretingTestReply1(DeviceCommandId_t id, const uint8_t* packet) {
|
||||
@ -608,7 +608,7 @@ ReturnValue_t TestDevice::interpretingTestReply1(DeviceCommandId_t id, const uin
|
||||
ReturnValue_t result =
|
||||
actionHelper.reportData(commander, id, packet, testdevice::TEST_COMMAND_1_SIZE, false);
|
||||
|
||||
if (result != RETURN_OK) {
|
||||
if (result != returnvalue::OK) {
|
||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||
sif::error << "TestDevice" << deviceIdx
|
||||
<< "::interpretingReply1: Sending data "
|
||||
@ -620,7 +620,7 @@ ReturnValue_t TestDevice::interpretingTestReply1(DeviceCommandId_t id, const uin
|
||||
return result;
|
||||
}
|
||||
|
||||
if (result == HasReturnvaluesIF::RETURN_OK) {
|
||||
if (result == returnvalue::OK) {
|
||||
/* Finish reply */
|
||||
actionHelper.finish(true, commander, id);
|
||||
} else {
|
||||
@ -628,7 +628,7 @@ ReturnValue_t TestDevice::interpretingTestReply1(DeviceCommandId_t id, const uin
|
||||
actionHelper.finish(false, commander, id, result);
|
||||
}
|
||||
|
||||
return RETURN_OK;
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
uint32_t TestDevice::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return 5000; }
|
||||
@ -646,7 +646,7 @@ ReturnValue_t TestDevice::initializeLocalDataPool(localpool::DataPool& localData
|
||||
/* Subscribe for periodic HK packets but do not enable reporting for now.
|
||||
Non-diangostic with a period of one second */
|
||||
poolManager.subscribeForPeriodicPacket(sid, false, 1.0, false);
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
ReturnValue_t TestDevice::getParameter(uint8_t domainId, uint8_t uniqueId,
|
||||
@ -658,7 +658,7 @@ ReturnValue_t TestDevice::getParameter(uint8_t domainId, uint8_t uniqueId,
|
||||
if (fullInfoPrintout) {
|
||||
uint32_t newValue = 0;
|
||||
ReturnValue_t result = newValues->getElement<uint32_t>(&newValue, 0, 0);
|
||||
if (result == HasReturnvaluesIF::RETURN_OK) {
|
||||
if (result == returnvalue::OK) {
|
||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||
sif::info << "TestDevice" << deviceIdx
|
||||
<< "::getParameter: Setting parameter 0 to "
|
||||
@ -677,7 +677,7 @@ ReturnValue_t TestDevice::getParameter(uint8_t domainId, uint8_t uniqueId,
|
||||
if (fullInfoPrintout) {
|
||||
int32_t newValue = 0;
|
||||
ReturnValue_t result = newValues->getElement<int32_t>(&newValue, 0, 0);
|
||||
if (result == HasReturnvaluesIF::RETURN_OK) {
|
||||
if (result == returnvalue::OK) {
|
||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||
sif::info << "TestDevice" << deviceIdx
|
||||
<< "::getParameter: Setting parameter 1 to "
|
||||
@ -695,10 +695,10 @@ ReturnValue_t TestDevice::getParameter(uint8_t domainId, uint8_t uniqueId,
|
||||
case ParameterUniqueIds::TEST_FLOAT_VEC3_2: {
|
||||
if (fullInfoPrintout) {
|
||||
float newVector[3];
|
||||
if (newValues->getElement<float>(newVector, 0, 0) != RETURN_OK or
|
||||
newValues->getElement<float>(newVector + 1, 0, 1) != RETURN_OK or
|
||||
newValues->getElement<float>(newVector + 2, 0, 2) != RETURN_OK) {
|
||||
return HasReturnvaluesIF::RETURN_FAILED;
|
||||
if (newValues->getElement<float>(newVector, 0, 0) != returnvalue::OK or
|
||||
newValues->getElement<float>(newVector + 1, 0, 1) != returnvalue::OK or
|
||||
newValues->getElement<float>(newVector + 2, 0, 2) != returnvalue::OK) {
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||
sif::info << "TestDevice" << deviceIdx
|
||||
@ -720,7 +720,7 @@ ReturnValue_t TestDevice::getParameter(uint8_t domainId, uint8_t uniqueId,
|
||||
if (fullInfoPrintout) {
|
||||
uint8_t enabled = 0;
|
||||
ReturnValue_t result = newValues->getElement<uint8_t>(&enabled, 0, 0);
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
char const* printout = nullptr;
|
||||
@ -743,7 +743,7 @@ ReturnValue_t TestDevice::getParameter(uint8_t domainId, uint8_t uniqueId,
|
||||
case (ParameterUniqueIds::CHANGING_DATASETS): {
|
||||
uint8_t enabled = 0;
|
||||
ReturnValue_t result = newValues->getElement<uint8_t>(&enabled, 0, 0);
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
if (not enabled) {
|
||||
@ -776,7 +776,7 @@ ReturnValue_t TestDevice::getParameter(uint8_t domainId, uint8_t uniqueId,
|
||||
default:
|
||||
return INVALID_IDENTIFIER_ID;
|
||||
}
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
LocalPoolObjectBase* TestDevice::getPoolObjectHandle(lp_id_t localPoolId) {
|
||||
|
@ -25,9 +25,9 @@ ReturnValue_t TestEchoComIF::initializeInterface(CookieIF *cookie) {
|
||||
auto resultPair =
|
||||
replyMap.emplace(dummyCookie->getAddress(), ReplyBuffer(dummyCookie->getReplyMaxLen()));
|
||||
if (not resultPair.second) {
|
||||
return HasReturnvaluesIF::RETURN_FAILED;
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
return RETURN_OK;
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
ReturnValue_t TestEchoComIF::sendMessage(CookieIF *cookie, const uint8_t *sendData,
|
||||
@ -50,17 +50,17 @@ ReturnValue_t TestEchoComIF::sendMessage(CookieIF *cookie, const uint8_t *sendDa
|
||||
"reply buffer length!\n",
|
||||
sendLen);
|
||||
#endif
|
||||
return HasReturnvaluesIF::RETURN_FAILED;
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
replyBuffer.resize(sendLen);
|
||||
memcpy(replyBuffer.data(), sendData, sendLen);
|
||||
return RETURN_OK;
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
ReturnValue_t TestEchoComIF::getSendSuccess(CookieIF *cookie) { return RETURN_OK; }
|
||||
ReturnValue_t TestEchoComIF::getSendSuccess(CookieIF *cookie) { return returnvalue::OK; }
|
||||
|
||||
ReturnValue_t TestEchoComIF::requestReceiveMessage(CookieIF *cookie, size_t requestLen) {
|
||||
return RETURN_OK;
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
ReturnValue_t TestEchoComIF::readReceivedMessage(CookieIF *cookie, uint8_t **buffer, size_t *size) {
|
||||
@ -78,5 +78,5 @@ ReturnValue_t TestEchoComIF::readReceivedMessage(CookieIF *cookie, uint8_t **buf
|
||||
// add anything that needs to be read periodically by dummy handler
|
||||
dummyReplyCounter = 0;
|
||||
}
|
||||
return RETURN_OK;
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
@ -15,7 +15,7 @@ TestTask::TestTask(object_id_t objectId) : SystemObject(objectId), testMode(test
|
||||
TestTask::~TestTask() = default;
|
||||
|
||||
ReturnValue_t TestTask::performOperation(uint8_t operationCode) {
|
||||
ReturnValue_t result = RETURN_OK;
|
||||
ReturnValue_t result = returnvalue::OK;
|
||||
testLock->lockMutex(MutexIF::TimeoutType::WAITING, 20);
|
||||
if (oneShotAction) {
|
||||
// Add code here which should only be run once
|
||||
@ -40,23 +40,23 @@ ReturnValue_t TestTask::performOperation(uint8_t operationCode) {
|
||||
|
||||
ReturnValue_t TestTask::performOneShotAction() {
|
||||
/* Everything here will only be performed once. */
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
ReturnValue_t TestTask::performPeriodicAction() {
|
||||
/* This is performed each task cycle */
|
||||
ReturnValue_t result = RETURN_OK;
|
||||
ReturnValue_t result = returnvalue::OK;
|
||||
return result;
|
||||
}
|
||||
|
||||
ReturnValue_t TestTask::performActionA() {
|
||||
/* This is performed each alternating task cycle */
|
||||
ReturnValue_t result = RETURN_OK;
|
||||
ReturnValue_t result = returnvalue::OK;
|
||||
return result;
|
||||
}
|
||||
|
||||
ReturnValue_t TestTask::performActionB() {
|
||||
/* This is performed each alternating task cycle */
|
||||
ReturnValue_t result = RETURN_OK;
|
||||
ReturnValue_t result = returnvalue::OK;
|
||||
return result;
|
||||
}
|
||||
|
@ -37,5 +37,5 @@ ReturnValue_t InternalUnitTester::performTests(
|
||||
#else
|
||||
sif::printInfo("Internal unit tests finished.\n");
|
||||
#endif
|
||||
return RETURN_OK;
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
@ -13,7 +13,7 @@
|
||||
* which simply calls all other tests from other files manually.
|
||||
* Maybe there is a better way..
|
||||
*/
|
||||
class InternalUnitTester : public HasReturnvaluesIF {
|
||||
class InternalUnitTester {
|
||||
public:
|
||||
struct TestConfig {
|
||||
bool testArrayPrinter = false;
|
||||
|
@ -6,5 +6,5 @@ ReturnValue_t unitt::put_error(std::string errorId) {
|
||||
#else
|
||||
sif::printError("Unit Tester error: Failed at test ID %s\n", errorId.c_str());
|
||||
#endif /* FSFW_CPP_OSTREAM_ENABLED == 1 */
|
||||
return HasReturnvaluesIF::RETURN_FAILED;
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
|
@ -20,22 +20,22 @@ void testmq::testMq() {
|
||||
testSenderMq->setDefaultDestination(testReceiverMqId);
|
||||
|
||||
auto result = testSenderMq->sendMessage(testReceiverMqId, &testMessage);
|
||||
if (result != result::OK) {
|
||||
if (result != returnvalue::OK) {
|
||||
unitt::put_error(id);
|
||||
}
|
||||
MessageQueueMessage recvMessage;
|
||||
result = testReceiverMq->receiveMessage(&recvMessage);
|
||||
if (result != result::OK or recvMessage.getData()[0] != 42) {
|
||||
if (result != returnvalue::OK or recvMessage.getData()[0] != 42) {
|
||||
unitt::put_error(id);
|
||||
}
|
||||
|
||||
result = testSenderMq->sendMessage(testReceiverMqId, &testMessage);
|
||||
if (result != result::OK) {
|
||||
if (result != returnvalue::OK) {
|
||||
unitt::put_error(id);
|
||||
}
|
||||
MessageQueueId_t senderId = 0;
|
||||
result = testReceiverMq->receiveMessage(&recvMessage, &senderId);
|
||||
if (result != result::OK or recvMessage.getData()[0] != 42) {
|
||||
if (result != returnvalue::OK or recvMessage.getData()[0] != 42) {
|
||||
unitt::put_error(id);
|
||||
}
|
||||
if (senderId != testSenderMqId) {
|
||||
|
@ -16,7 +16,7 @@ void testmutex::testMutex() {
|
||||
std::string id = "[testMutex]";
|
||||
MutexIF* mutex = MutexFactory::instance()->createMutex();
|
||||
auto result = mutex->lockMutex(MutexIF::TimeoutType::POLLING);
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
if (result != returnvalue::OK) {
|
||||
unitt::put_error(id);
|
||||
}
|
||||
// timed_mutex from the C++ library specifies undefined behaviour if
|
||||
@ -35,7 +35,7 @@ void testmutex::testMutex() {
|
||||
}
|
||||
|
||||
result = mutex->unlockMutex();
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
if (result != returnvalue::OK) {
|
||||
unitt::put_error(id);
|
||||
}
|
||||
|
||||
|
@ -54,7 +54,7 @@ void testsemaph::testCountingSemaph() {
|
||||
// release 3 times in a row
|
||||
for (int i = 0; i < 3; i++) {
|
||||
auto result = countingSemaph->release();
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
if (result != returnvalue::OK) {
|
||||
unitt::put_error(id);
|
||||
}
|
||||
}
|
||||
@ -75,7 +75,7 @@ void testsemaph::testBinSemaphoreImplementation(SemaphoreIF* binSemaph, std::str
|
||||
unitt::put_error(id);
|
||||
}
|
||||
result = binSemaph->acquire(SemaphoreIF::BLOCKING);
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
if (result != returnvalue::OK) {
|
||||
unitt::put_error(id);
|
||||
}
|
||||
|
||||
@ -104,7 +104,7 @@ void testsemaph::testBinSemaphoreImplementation(SemaphoreIF* binSemaph, std::str
|
||||
}
|
||||
|
||||
result = binSemaph->release();
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
if (result != returnvalue::OK) {
|
||||
unitt::put_error(id);
|
||||
}
|
||||
}
|
||||
@ -122,7 +122,7 @@ void testsemaph::testCountingSemaphImplementation(SemaphoreIF* countingSemaph, s
|
||||
// acquire 3 times in a row
|
||||
for (int i = 0; i < 3; i++) {
|
||||
result = countingSemaph->acquire(SemaphoreIF::BLOCKING);
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
if (result != returnvalue::OK) {
|
||||
unitt::put_error(id);
|
||||
}
|
||||
}
|
||||
@ -144,7 +144,7 @@ void testsemaph::testCountingSemaphImplementation(SemaphoreIF* countingSemaph, s
|
||||
// release 3 times in a row
|
||||
for (int i = 0; i < 3; i++) {
|
||||
result = countingSemaph->release();
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
if (result != returnvalue::OK) {
|
||||
unitt::put_error(id);
|
||||
}
|
||||
}
|
||||
|
@ -13,18 +13,18 @@ std::array<uint8_t, 512> testserialize::test_array = {0};
|
||||
ReturnValue_t testserialize::test_serialization() {
|
||||
// Here, we test all serialization tools. First test basic cases.
|
||||
ReturnValue_t result = test_endianness_tools();
|
||||
if (result != result::OK) {
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
result = test_autoserialization();
|
||||
if (result != result::OK) {
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
result = test_serial_buffer_adapter();
|
||||
if (result != result::OK) {
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
return result::OK;
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
ReturnValue_t testserialize::test_endianness_tools() {
|
||||
@ -48,7 +48,7 @@ ReturnValue_t testserialize::test_endianness_tools() {
|
||||
if (test_array[0] != 0 and test_array[1] != 1) {
|
||||
return unitt::put_error(id);
|
||||
}
|
||||
return result::OK;
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
ReturnValue_t testserialize::test_autoserialization() {
|
||||
@ -152,7 +152,7 @@ ReturnValue_t testserialize::test_autoserialization() {
|
||||
}
|
||||
|
||||
// Check overflow
|
||||
return result::OK;
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
// TODO: Also test for constant buffers.
|
||||
@ -205,5 +205,5 @@ ReturnValue_t testserialize::test_serial_buffer_adapter() {
|
||||
if (testUint16 != 16) {
|
||||
return unitt::put_error(id);
|
||||
}
|
||||
return result::OK;
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
Reference in New Issue
Block a user