fsfw/unittest/core/CatchSetup.cpp

43 lines
973 B
C++
Raw Normal View History

2020-10-28 22:11:13 +01:00
#include "CatchDefinitions.h"
2020-10-28 22:49:19 +01:00
2020-10-29 15:12:05 +01:00
#include <testcfg/cdatapool/dataPoolInit.h>
#include <testcfg/objects/Factory.h>
2020-10-28 22:11:13 +01:00
2020-10-20 17:12:56 +02:00
#ifdef GCOV
#include <gcov.h>
#endif
2020-10-28 22:11:13 +01:00
#include "../../objectmanager/ObjectManager.h"
#include "../../objectmanager/ObjectManagerIF.h"
#include "../../storagemanager/StorageManagerIF.h"
#include "../../datapoolglob/GlobalDataPool.h"
#include "../../serviceinterface/ServiceInterfaceStream.h"
2020-10-20 17:12:56 +02:00
/* Global instantiations normally done in main.cpp */
/* Initialize Data Pool */
2020-10-28 22:11:13 +01:00
namespace glob {
GlobalDataPool dataPool(datapool::dataPoolInit);
}
2020-10-20 17:12:56 +02:00
namespace sif {
/* Set up output streams */
ServiceInterfaceStream debug("DEBUG");
ServiceInterfaceStream info("INFO");
ServiceInterfaceStream error("ERROR");
ServiceInterfaceStream warning("WARNING");
}
/* Global object manager */
ObjectManagerIF *objectManager;
int customSetup() {
// global setup
objectManager = new ObjectManager(Factory::produce);
objectManager -> initialize();
return 0;
}