perform renaming

This commit is contained in:
2022-08-15 20:28:16 +02:00
parent 94a718ff19
commit 62fe75ee40
345 changed files with 2451 additions and 2473 deletions

View File

@ -37,5 +37,5 @@ ReturnValue_t InternalUnitTester::performTests(
#else
sif::printInfo("Internal unit tests finished.\n");
#endif
return RETURN_OK;
return returnvalue::OK;
}

View File

@ -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;

View File

@ -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;
}

View File

@ -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) {

View File

@ -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);
}

View File

@ -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);
}
}

View File

@ -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;
}