updated internal unit test
This commit is contained in:
parent
baba8fa5d7
commit
73b9d058e5
@ -5,24 +5,37 @@
|
|||||||
#include "osal/IntTestSemaphore.h"
|
#include "osal/IntTestSemaphore.h"
|
||||||
#include "osal/IntTestMutex.h"
|
#include "osal/IntTestMutex.h"
|
||||||
#include "serialize/IntTestSerialization.h"
|
#include "serialize/IntTestSerialization.h"
|
||||||
|
#include "globalfunctions/TestArrayPrinter.h"
|
||||||
|
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
|
|
||||||
|
struct TestConfig {
|
||||||
|
bool testArrayPrinter;
|
||||||
|
};
|
||||||
InternalUnitTester::InternalUnitTester() {}
|
InternalUnitTester::InternalUnitTester() {}
|
||||||
|
|
||||||
InternalUnitTester::~InternalUnitTester() {}
|
InternalUnitTester::~InternalUnitTester() {}
|
||||||
|
|
||||||
ReturnValue_t InternalUnitTester::performTests() {
|
ReturnValue_t InternalUnitTester::performTests(struct TestConfig testConfig) {
|
||||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||||
sif::info << "Running internal unit tests.." << std::endl;
|
sif::info << "Running internal unit tests.." << std::endl;
|
||||||
|
#else
|
||||||
|
sif::printInfo("Running internal unit tests..\n");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
testserialize::test_serialization();
|
testserialize::test_serialization();
|
||||||
testmq::testMq();
|
testmq::testMq();
|
||||||
testsemaph::testBinSemaph();
|
testsemaph::testBinSemaph();
|
||||||
testsemaph::testCountingSemaph();
|
testsemaph::testCountingSemaph();
|
||||||
testmutex::testMutex();
|
testmutex::testMutex();
|
||||||
|
if(testConfig.testArrayPrinter) {
|
||||||
|
arrayprinter::testArrayPrinter();
|
||||||
|
}
|
||||||
|
|
||||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||||
sif::info << "Internal unit tests finished." << std::endl;
|
sif::info << "Internal unit tests finished." << std::endl;
|
||||||
|
#else
|
||||||
|
sif::printInfo("Running internal unit tests..\n");
|
||||||
#endif
|
#endif
|
||||||
return RETURN_OK;
|
return RETURN_OK;
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,7 @@ public:
|
|||||||
* Some function which calls all other tests
|
* Some function which calls all other tests
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
virtual ReturnValue_t performTests();
|
virtual ReturnValue_t performTests(struct TestConfig testConfig);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
4
unittest/internal/globalfunctions/TestArrayPrinter.cpp
Normal file
4
unittest/internal/globalfunctions/TestArrayPrinter.cpp
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
#include "TestArrayPrinter.cpp"
|
||||||
|
|
||||||
|
void arrayprinter::testArrayPrinter() {
|
||||||
|
}
|
12
unittest/internal/globalfunctions/TestArrayPrinter.h
Normal file
12
unittest/internal/globalfunctions/TestArrayPrinter.h
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
#ifndef FSFW_UNITTEST_INTERNAL_GLOBALFUNCTIONS_TESTARRAYPRINTER_H_
|
||||||
|
#define FSFW_UNITTEST_INTERNAL_GLOBALFUNCTIONS_TESTARRAYPRINTER_H_
|
||||||
|
|
||||||
|
namespace arrayprinter {
|
||||||
|
|
||||||
|
void testArrayPrinter();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* FSFW_UNITTEST_INTERNAL_GLOBALFUNCTIONS_TESTARRAYPRINTER_H_ */
|
@ -1,5 +0,0 @@
|
|||||||
#include <catch2/catch_test_macros.hpp>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user