Fix segfault in unit tests
parent
c62e583c12
commit
806ffdaf36
|
@ -27,6 +27,8 @@
|
||||||
#include "app/system_other.h"
|
#include "app/system_other.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "common/make_unique.h"
|
||||||
|
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
|
@ -47,6 +49,17 @@ struct FakeSystemTimeStamp : public SystemTimeStamp
|
||||||
class CApplicationWrapper : public CApplication
|
class CApplicationWrapper : public CApplication
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
CApplicationWrapper()
|
||||||
|
{
|
||||||
|
SDL_Init(0);
|
||||||
|
m_eventQueue = MakeUnique<CEventQueue>();
|
||||||
|
}
|
||||||
|
|
||||||
|
~CApplicationWrapper()
|
||||||
|
{
|
||||||
|
SDL_Quit();
|
||||||
|
}
|
||||||
|
|
||||||
Event CreateUpdateEvent() override
|
Event CreateUpdateEvent() override
|
||||||
{
|
{
|
||||||
return CApplication::CreateUpdateEvent();
|
return CApplication::CreateUpdateEvent();
|
||||||
|
|
Loading…
Reference in New Issue