summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorPiotr Dziwinski <piotrdz@gmail.com>2014-06-24 17:38:28 +0200
committerPiotr Dziwinski <piotrdz@gmail.com>2014-06-24 17:38:28 +0200
commit52cf9e2815688481f689e03e67c5fc983ed1351b (patch)
tree4518f590e3e5d0435265143712f36e8ec4d2d713 /test
parent99cd015dd89f0928246d1178c5641ebe325fe997 (diff)
downloadcolobot-52cf9e2815688481f689e03e67c5fc983ed1351b.tar.gz
colobot-52cf9e2815688481f689e03e67c5fc983ed1351b.tar.bz2
colobot-52cf9e2815688481f689e03e67c5fc983ed1351b.zip
Fix test compilation
Diffstat (limited to 'test')
-rw-r--r--test/envs/opengl/light_test.cpp4
-rw-r--r--test/envs/opengl/transform_test.cpp4
-rw-r--r--test/unit/CMakeLists.txt1
-rw-r--r--test/unit/ui/CMakeLists.txt1
-rw-r--r--test/unit/ui/stubs/app_stub.cpp10
5 files changed, 6 insertions, 14 deletions
diff --git a/test/envs/opengl/light_test.cpp b/test/envs/opengl/light_test.cpp
index 227ca2a..1a52084 100644
--- a/test/envs/opengl/light_test.cpp
+++ b/test/envs/opengl/light_test.cpp
@@ -78,7 +78,7 @@ void Render(Gfx::CGLDevice *device)
worldMat.LoadIdentity();
device->SetTransform(Gfx::TRANSFORM_WORLD, worldMat);
- Gfx::VertexCol line[2] = { Gfx::VertexCol() };
+ Gfx::VertexCol line[2] = Gfx::VertexCol{ Gfx::VertexCol() };
for (int x = -40; x <= 40; ++x)
{
@@ -103,7 +103,7 @@ void Render(Gfx::CGLDevice *device)
}
- Gfx::VertexCol quad[6] = { Gfx::VertexCol() };
+ Gfx::VertexCol quad[6] = Gfx::VertexCol{ Gfx::VertexCol() };
quad[0].coord = Math::Vector(-1.0f, -1.0f, 0.0f);
quad[1].coord = Math::Vector( 1.0f, -1.0f, 0.0f);
diff --git a/test/envs/opengl/transform_test.cpp b/test/envs/opengl/transform_test.cpp
index 58d8e9e..d994cc5 100644
--- a/test/envs/opengl/transform_test.cpp
+++ b/test/envs/opengl/transform_test.cpp
@@ -73,7 +73,7 @@ void Render(Gfx::CGLDevice *device)
worldMat.LoadIdentity();
device->SetTransform(Gfx::TRANSFORM_WORLD, worldMat);
- Gfx::VertexCol line[2] = { Gfx::VertexCol() };
+ Gfx::VertexCol line[2] = Gfx::VertexCol{ Gfx::VertexCol() };
for (int x = -40; x <= 40; ++x)
{
@@ -98,7 +98,7 @@ void Render(Gfx::CGLDevice *device)
}
- Gfx::VertexCol quad[6] = { Gfx::VertexCol() };
+ Gfx::VertexCol quad[6] = Gfx::VertexCol{ Gfx::VertexCol() };
for (int i = 0; i < 6; ++i)
quad[i].color = Gfx::Color(1.0f, 1.0f, 0.0f);
diff --git a/test/unit/CMakeLists.txt b/test/unit/CMakeLists.txt
index 269ffc2..bdb5a67 100644
--- a/test/unit/CMakeLists.txt
+++ b/test/unit/CMakeLists.txt
@@ -23,6 +23,7 @@ configure_file(${SRC_DIR}/common/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/comm
# Code sources
set(COLOBOT_SOURCES
${SRC_DIR}/app/app.cpp
+${SRC_DIR}/app/gamedata.cpp
${SRC_DIR}/app/pausemanager.cpp
${SRC_DIR}/app/system.cpp
${SRC_DIR}/app/${SYSTEM_CPP_MODULE}
diff --git a/test/unit/ui/CMakeLists.txt b/test/unit/ui/CMakeLists.txt
index 503f84b..7f7b2f8 100644
--- a/test/unit/ui/CMakeLists.txt
+++ b/test/unit/ui/CMakeLists.txt
@@ -17,6 +17,7 @@ else()
endif()
add_executable(edit_test
+${SRC_DIR}/app/gamedata.cpp
${SRC_DIR}/app/system.cpp
${SRC_DIR}/app/${SYSTEM_CPP_MODULE}
${SRC_DIR}/app/system_other.cpp
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);