corrections and tests

This commit is contained in:
2021-07-16 21:51:30 +02:00
committed by Robin Mueller
parent 434a0f6a7a
commit 88a20a512a
12 changed files with 265 additions and 14 deletions

1
test/CMakeLists.txt Normal file
View File

@ -0,0 +1 @@
add_subdirectory(testtasks)

26
test/DummyParameter.h Normal file
View File

@ -0,0 +1,26 @@
#ifndef BSP_Q7S_CORE_NVMPARAMS_PARAMETERDEFINITIONS_H_
#define BSP_Q7S_CORE_NVMPARAMS_PARAMETERDEFINITIONS_H_
#include "mission/memory/NVMParameterBase.h"
#include <nlohmann/json.hpp>
#include <filesystem>
class DummyParameter: public NVMParameterBase {
public:
static constexpr char DUMMY_KEY_PARAM_1[] = "dummy1";
static constexpr char DUMMY_KEY_PARAM_2[] = "dummy2";
DummyParameter(std::string mountPrefix, std::string jsonFileName):
NVMParameterBase(mountPrefix + "/conf/" + jsonFileName),
mountPrefix(mountPrefix) {
insertValue(DUMMY_KEY_PARAM_1, 1);
insertValue(DUMMY_KEY_PARAM_2, "blablub");
}
private:
std::string mountPrefix;
};
#endif /* BSP_Q7S_CORE_NVMPARAMS_PARAMETERDEFINITIONS_H_ */