diff --git a/unittest/user/unittest/CMakeLists.txt b/unittest/user/unittest/CMakeLists.txt new file mode 100644 index 00000000..ad6d4787 --- /dev/null +++ b/unittest/user/unittest/CMakeLists.txt @@ -0,0 +1 @@ +add_subdirectory(core) diff --git a/unittest/user/unittest/core/CatchDefinitions.cpp b/unittest/user/unittest/core/CatchDefinitions.cpp index 02a935d2..531ee87b 100644 --- a/unittest/user/unittest/core/CatchDefinitions.cpp +++ b/unittest/user/unittest/core/CatchDefinitions.cpp @@ -9,8 +9,8 @@ StorageManagerIF* tglob::getIpcStoreHandle() { #if FSFW_CPP_OSTREAM_ENABLED == 1 sif::error << "Global object manager uninitialized" << std::endl; #else - fsfw::printError("Global object manager uninitialized"); -#endif + fsfw::printError("Global object manager uninitialized\n\r"); +#endif /* FSFW_CPP_OSTREAM_ENABLED == 1 */ return nullptr; } } diff --git a/unittest/user/unittest/core/CatchFactory.cpp b/unittest/user/unittest/core/CatchFactory.cpp index 0597f08c..eabaa21d 100644 --- a/unittest/user/unittest/core/CatchFactory.cpp +++ b/unittest/user/unittest/core/CatchFactory.cpp @@ -10,6 +10,8 @@ #include #include #include +#include +#include /** * @brief Produces system objects. @@ -30,6 +32,9 @@ void Factory::produce(void) { new HealthTable(objects::HEALTH_TABLE); new InternalErrorReporter(objects::INTERNAL_ERROR_REPORTER); + new LocalPoolOwnerBase (objects::TEST_LOCAL_POOL_OWNER_BASE); + new HkReceiverMock(objects::HK_RECEIVER_MOCK); + { PoolManager::LocalPoolConfig poolCfg = { {100, 16}, {50, 32}, {25, 64} , {15, 128}, {5, 1024} @@ -65,7 +70,7 @@ void Factory::setStaticFrameworkObjectIds() { DeviceHandlerBase::powerSwitcherId = objects::NO_OBJECT; DeviceHandlerBase::rawDataReceiverId = objects::PUS_SERVICE_2_DEVICE_ACCESS; - LocalDataPoolManager::defaultHkDestination = objects::NO_OBJECT; + LocalDataPoolManager::defaultHkDestination = objects::HK_RECEIVER_MOCK; DeviceHandlerFailureIsolation::powerConfirmationId = objects::NO_OBJECT;