1
0
forked from fsfw/fsfw

updated internal unit test

This commit is contained in:
2021-01-15 16:56:36 +01:00
parent baba8fa5d7
commit 73b9d058e5
5 changed files with 31 additions and 7 deletions

View File

@ -5,24 +5,37 @@
#include "osal/IntTestSemaphore.h"
#include "osal/IntTestMutex.h"
#include "serialize/IntTestSerialization.h"
#include "globalfunctions/TestArrayPrinter.h"
#include <cstdlib>
struct TestConfig {
bool testArrayPrinter;
};
InternalUnitTester::InternalUnitTester() {}
InternalUnitTester::~InternalUnitTester() {}
ReturnValue_t InternalUnitTester::performTests() {
ReturnValue_t InternalUnitTester::performTests(struct TestConfig testConfig) {
#if FSFW_CPP_OSTREAM_ENABLED == 1
sif::info << "Running internal unit tests.." << std::endl;
#else
sif::printInfo("Running internal unit tests..\n");
#endif
testserialize::test_serialization();
testmq::testMq();
testsemaph::testBinSemaph();
testsemaph::testCountingSemaph();
testmutex::testMutex();
if(testConfig.testArrayPrinter) {
arrayprinter::testArrayPrinter();
}
#if FSFW_CPP_OSTREAM_ENABLED == 1
sif::info << "Internal unit tests finished." << std::endl;
#else
sif::printInfo("Running internal unit tests..\n");
#endif
return RETURN_OK;
}