updated internal unit tester

This commit is contained in:
Robin Müller 2021-01-15 17:06:05 +01:00
parent 73b9d058e5
commit 79cf009049
6 changed files with 14 additions and 7 deletions

View File

@ -4,4 +4,5 @@ target_sources(${TARGET_NAME} PRIVATE
)
add_subdirectory(osal)
add_subdirectory(serialize)
add_subdirectory(serialize)
add_subdirectory(globalfunctions)

View File

@ -9,14 +9,11 @@
#include <cstdlib>
struct TestConfig {
bool testArrayPrinter;
};
InternalUnitTester::InternalUnitTester() {}
InternalUnitTester::~InternalUnitTester() {}
ReturnValue_t InternalUnitTester::performTests(struct TestConfig testConfig) {
ReturnValue_t InternalUnitTester::performTests(struct InternalUnitTester::TestConfig& testConfig) {
#if FSFW_CPP_OSTREAM_ENABLED == 1
sif::info << "Running internal unit tests.." << std::endl;
#else

View File

@ -4,6 +4,7 @@
#include "UnittDefinitions.h"
#include "../../returnvalues/HasReturnvaluesIF.h"
/**
* @brief Can be used for internal testing, for example for hardware specific
* tests which can not be run on a host-machine.
@ -15,6 +16,10 @@
*/
class InternalUnitTester: public HasReturnvaluesIF {
public:
struct TestConfig {
bool testArrayPrinter;
};
InternalUnitTester();
virtual~ InternalUnitTester();
@ -22,7 +27,7 @@ public:
* Some function which calls all other tests
* @return
*/
virtual ReturnValue_t performTests(struct TestConfig testConfig);
virtual ReturnValue_t performTests(struct InternalUnitTester::TestConfig& testConfig);
};

View File

@ -0,0 +1,3 @@
target_sources(${TARGET_NAME} PRIVATE
TestArrayPrinter.cpp
)

View File

@ -1,4 +1,4 @@
#include "TestArrayPrinter.cpp"
#include "TestArrayPrinter.h"
void arrayprinter::testArrayPrinter() {
}

View File

@ -1,3 +1,4 @@
CXXSRC += $(wildcard $(CURRENTPATH)/osal/*.cpp)
CXXSRC += $(wildcard $(CURRENTPATH)/serialize/*.cpp)
CXXSRC += $(wildcard $(CURRENTPATH)/globalfunctions/*.cpp)
CXXSRC += $(wildcard $(CURRENTPATH)/*.cpp)