diff options
author | Piotr Dziwinski <piotrdz@gmail.com> | 2014-08-12 20:03:56 +0200 |
---|---|---|
committer | Piotr Dziwinski <piotrdz@gmail.com> | 2014-08-12 20:58:55 +0200 |
commit | 74312b0405d6fb5ed75c675ceed471e1e5086f00 (patch) | |
tree | 96a3b40401ce5a4322bd069fd25be163d5d43270 /test/unit/ui/stubs/engine_stub.cpp | |
parent | 4bdfa0aa4ee3ad00429e8d68823532bdb2d72a97 (diff) | |
download | colobot-74312b0405d6fb5ed75c675ceed471e1e5086f00.tar.gz colobot-74312b0405d6fb5ed75c675ceed471e1e5086f00.tar.bz2 colobot-74312b0405d6fb5ed75c675ceed471e1e5086f00.zip |
Better CMake organization and unit test cleanups
* created a static library containing most source modules
to avoid compiling source modules twice in code and unit tests
* moved profile_test to main unit tests executable
* removed image_test and edit_test as not really useful
Diffstat (limited to 'test/unit/ui/stubs/engine_stub.cpp')
-rw-r--r-- | test/unit/ui/stubs/engine_stub.cpp | 104 |
1 files changed, 0 insertions, 104 deletions
diff --git a/test/unit/ui/stubs/engine_stub.cpp b/test/unit/ui/stubs/engine_stub.cpp deleted file mode 100644 index 0a2777c..0000000 --- a/test/unit/ui/stubs/engine_stub.cpp +++ /dev/null @@ -1,104 +0,0 @@ -#include "graphics/engine/engine.h" -#include "graphics/engine/text.h" - -#include "mocks/text_mock.h" - -template<> Gfx::CEngine* CSingleton<Gfx::CEngine>::m_instance = nullptr; - -namespace Gfx { - -CEngine::CEngine(CApplication* app) : - m_app(app) -{ - m_text = new CTextMock(this); - m_text->Create(); -} - -CEngine::~CEngine() -{ - delete m_text; - m_text = nullptr; -} - -CParticle* CEngine::GetParticle() -{ - return nullptr; -} - -Math::Point CEngine::WindowToInterfaceSize(Math::IntPoint size) -{ - return Math::Point(size.x, size.y); -} - -void CEngine::SetState(int state, const Color& color) -{ - if (state == m_lastState && color == m_lastColor) - return; - - m_lastState = state; - m_lastColor = color; -} - -Math::IntPoint CEngine::GetWindowSize() -{ - return m_size; -} - -void CEngine::AddStatisticTriangle(int count) -{ - m_statisticTriangle += count; -} - -void CEngine::SetMouseType(EngineMouseType type) -{ - m_mouseType = type; -} - -bool CEngine::SetTexture(const std::string& /* name */, int /* stage */) -{ - return true; -} - -CText* CEngine::GetText() -{ - return m_text; -} - -CDevice* CEngine::GetDevice() -{ - return m_device; -} - -int CEngine::GetEditIndentValue() -{ - return m_editIndentValue; -} - -void CEngine::DeleteTexture(const std::string& /* texName */) -{ -} - -Texture CEngine::LoadTexture(const std::string& /* name */) -{ - Texture texture; - return texture; -} - -Math::Vector CEngine::GetEyePt() -{ - return Math::Vector(); -} - -Math::Vector CEngine::GetLookatPt() -{ - return Math::Vector(); -} - -bool CEngine::GetPause() -{ - return false; -} - - -} /* Gfx */ - |