Fix segfault in unit tests

master
Piotr Dziwinski 2015-08-05 10:27:39 +02:00
parent c62e583c12
commit 806ffdaf36
1 changed files with 13 additions and 0 deletions

View File

@ -27,6 +27,8 @@
#include "app/system_other.h"
#endif
#include "common/make_unique.h"
#include <functional>
#include <memory>
@ -47,6 +49,17 @@ struct FakeSystemTimeStamp : public SystemTimeStamp
class CApplicationWrapper : public CApplication
{
public:
CApplicationWrapper()
{
SDL_Init(0);
m_eventQueue = MakeUnique<CEventQueue>();
}
~CApplicationWrapper()
{
SDL_Quit();
}
Event CreateUpdateEvent() override
{
return CApplication::CreateUpdateEvent();