diff options
author | krzys-h <krzys_h@interia.pl> | 2014-07-11 15:24:44 +0200 |
---|---|---|
committer | krzys-h <krzys_h@interia.pl> | 2014-07-11 15:24:44 +0200 |
commit | 96d49d84aafecd78c902681f20de6207badf7e85 (patch) | |
tree | 7a835fce4f264c6c0886441c4f79e02cdf47582c /test/unit | |
parent | 5223ef1fb116780298495a4d2f63e6c2c39fdfbd (diff) | |
parent | 852223262055440569ecca70f1b9da46089424c4 (diff) | |
download | colobot-96d49d84aafecd78c902681f20de6207badf7e85.tar.gz colobot-96d49d84aafecd78c902681f20de6207badf7e85.tar.bz2 colobot-96d49d84aafecd78c902681f20de6207badf7e85.zip |
Merge branch 'dev' into dev-physfs
Conflicts:
data
src/app/gamedata.cpp
src/ui/control.cpp
src/ui/edit.cpp
src/ui/maindialog.cpp
Diffstat (limited to 'test/unit')
-rw-r--r-- | test/unit/graphics/core/device_mock.h | 2 | ||||
-rw-r--r-- | test/unit/ui/edit_test.cpp | 20 | ||||
-rw-r--r-- | test/unit/ui/stubs/app_stub.cpp | 10 |
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); |