summaryrefslogtreecommitdiffstats
path: root/test/unit
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit')
-rw-r--r--test/unit/graphics/core/device_mock.h2
-rw-r--r--test/unit/ui/edit_test.cpp20
-rw-r--r--test/unit/ui/stubs/app_stub.cpp10
3 files changed, 15 insertions, 17 deletions
diff --git a/test/unit/graphics/core/device_mock.h b/test/unit/graphics/core/device_mock.h
index 9e75daf..498239f 100644
--- a/test/unit/graphics/core/device_mock.h
+++ b/test/unit/graphics/core/device_mock.h
@@ -105,4 +105,6 @@ public:
MOCK_METHOD1(SetFillMode, void(Gfx::FillMode mode));
MOCK_METHOD0(GetFillMode, Gfx::FillMode());
+
+ MOCK_CONST_METHOD0(GetFrameBufferPixels, void*());
};
diff --git a/test/unit/ui/edit_test.cpp b/test/unit/ui/edit_test.cpp
index 4a4063e..34af013 100644
--- a/test/unit/ui/edit_test.cpp
+++ b/test/unit/ui/edit_test.cpp
@@ -1,4 +1,5 @@
#include "app/app.h"
+#include "app/gamedata.h"
#include "ui/edit.h"
@@ -14,6 +15,7 @@ class CEditTest : public testing::Test
public:
CEditTest()
: m_robotMain(nullptr)
+ , m_gameData(nullptr)
, m_engine(nullptr)
, m_edit(nullptr)
{}
@@ -21,21 +23,24 @@ public:
virtual void SetUp()
{
m_robotMain = new CRobotMain(&m_app, false);
-
+
+ m_gameData = new CGameData();
+
m_engine = new Gfx::CEngine(nullptr);
-
+
m_edit = new Ui::CEdit;
}
virtual void TearDown()
{
- delete m_robotMain;
- m_robotMain = nullptr;
- delete m_engine;
- m_engine = nullptr;
delete m_edit;
m_edit = nullptr;
-
+ delete m_engine;
+ m_engine = nullptr;
+ delete m_gameData;
+ m_gameData = nullptr;
+ delete m_robotMain;
+ m_robotMain = nullptr;
}
virtual ~CEditTest()
{
@@ -45,6 +50,7 @@ public:
protected:
CApplication m_app;
CRobotMain* m_robotMain;
+ CGameData * m_gameData;
Gfx::CEngine * m_engine;
Ui::CEdit * m_edit;
CLogger m_logger;
diff --git a/test/unit/ui/stubs/app_stub.cpp b/test/unit/ui/stubs/app_stub.cpp
index 960972f..95430d8 100644
--- a/test/unit/ui/stubs/app_stub.cpp
+++ b/test/unit/ui/stubs/app_stub.cpp
@@ -21,11 +21,6 @@ CApplication::~CApplication()
{
}
-std::string CApplication::GetDataFilePath(DataDir /* dataDir */, const std::string& subpath) const
-{
- return subpath;
-}
-
CSoundInterface* CApplication::GetSound()
{
return nullptr;
@@ -36,11 +31,6 @@ CEventQueue* CApplication::GetEventQueue()
return nullptr;
}
-std::string CApplication::GetDataDirPath() const
-{
- return "";
-}
-
Event CApplication::CreateUpdateEvent()
{
return Event(EVENT_NULL);