diff options
-rw-r--r-- | .gitignore | 8 | ||||
-rw-r--r-- | CMakeLists.txt | 43 | ||||
-rw-r--r-- | bin/.gitignore | 6 | ||||
-rw-r--r-- | bin/README.txt | 1 | ||||
-rw-r--r-- | desktop/.gitignore (renamed from src/desktop/.gitignore) | 0 | ||||
-rw-r--r-- | desktop/CMakeLists.txt (renamed from src/desktop/CMakeLists.txt) | 0 | ||||
-rw-r--r-- | desktop/colobot.desktop.in (renamed from src/desktop/colobot.desktop.in) | 0 | ||||
-rw-r--r-- | desktop/colobot.ini (renamed from src/desktop/colobot.ini) | 0 | ||||
-rw-r--r-- | desktop/colobot.pod (renamed from src/desktop/colobot.pod) | 0 | ||||
-rw-r--r-- | desktop/colobot.svg (renamed from src/desktop/colobot.svg) | 0 | ||||
-rwxr-xr-x | desktop/create_desktop_file.sh (renamed from src/desktop/create_desktop_file.sh) | 0 | ||||
-rw-r--r-- | desktop/po/colobot-desktop.pot (renamed from src/desktop/po/colobot-desktop.pot) | 0 | ||||
-rw-r--r-- | desktop/po/fr.po (renamed from src/desktop/po/fr.po) | 0 | ||||
-rw-r--r-- | desktop/po4a.cfg (renamed from src/desktop/po4a.cfg) | 0 | ||||
-rw-r--r-- | po/CMakeLists.txt (renamed from src/po/CMakeLists.txt) | 4 | ||||
-rw-r--r-- | po/colobot.pot (renamed from src/po/colobot.pot) | 0 | ||||
-rw-r--r-- | po/de.po (renamed from src/po/de.po) | 0 | ||||
-rw-r--r-- | po/fr.po (renamed from src/po/fr.po) | 0 | ||||
-rw-r--r-- | po/pl.po (renamed from src/po/pl.po) | 0 | ||||
-rw-r--r-- | src/CMakeLists.txt | 8 | ||||
-rw-r--r-- | src/common/profile.cpp | 13 | ||||
-rw-r--r-- | src/graphics/engine/lightman.cpp | 2 | ||||
-rw-r--r-- | src/graphics/engine/test/CMakeLists.txt | 28 | ||||
-rw-r--r-- | src/object/robotmain.cpp | 8 | ||||
-rw-r--r-- | src/object/robotmain.h | 2 | ||||
-rw-r--r-- | src/ui/maindialog.cpp | 8 | ||||
-rw-r--r-- | test/unit/app/app_test.cpp | 3 | ||||
-rw-r--r-- | test/unit/graphics/engine/modelfile_test.cpp (renamed from src/graphics/engine/test/modelfile_test.cpp) | 66 | ||||
-rw-r--r-- | test/unit/main.cpp | 6 | ||||
-rw-r--r-- | test/unit/math/func_test.cpp | 18 | ||||
-rw-r--r-- | test/unit/math/geometry_test.cpp | 18 | ||||
-rw-r--r-- | test/unit/math/matrix_test.cpp | 18 | ||||
-rw-r--r-- | test/unit/math/vector_test.cpp | 18 | ||||
-rw-r--r-- | test/unit/ui/edit_test.cpp | 5 |
34 files changed, 92 insertions, 191 deletions
@@ -1,6 +1,9 @@ # Ignore the documentation folder /doc +# Ignore targets +/colobot + # Ignore local data /colobot.ini /savegame @@ -13,9 +16,8 @@ Makefile /install_manifest.txt /Testing /CTestTestfile.cmake -/src/CBot/tests/CBot_console/bin/ + +# Ignore KDevelop files .kdev4 *.kdev4 -*.flv -*.mp4 diff --git a/CMakeLists.txt b/CMakeLists.txt index ed6008a..acacda9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -33,15 +33,28 @@ endif() set(COLOBOT_VERSION_FULL "${COLOBOT_VERSION_MAJOR}.${COLOBOT_VERSION_MINOR}.${COLOBOT_VERSION_REVISION}${COLOBOT_VERSION_UNRELEASED}") message(STATUS "Building Colobot \"${COLOBOT_VERSION_CODENAME}\" (${COLOBOT_VERSION_FULL})") -# Include cmake directory with some additional scripts -set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${colobot_SOURCE_DIR}/cmake") ## # Build options ## -# Global build type +# Build targets should be placed in the root build directory +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) + +# Include cmake directory with some additional scripts +set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${colobot_SOURCE_DIR}/cmake") + +# Auto-detect develpment build if not given +if(CMAKE_BUILD_TYPE AND NOT(DEV_BUILD)) + if("${CMAKE_BUILD_TYPE}" MATCHES "debug") + SET(DEV_BUILD 1) + else() + SET(DEV_BUILD 0) + endif() +endif() + +# Default build type if not given is debug if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE debug) endif() @@ -83,8 +96,14 @@ set(COLOBOT_CXX_FLAGS_DEBUG "-g -O0") # Asserts can be enabled/disabled regardless of build type option(ASSERTS "Enable assert()s" ON) +# Development build can be enabled/disabled regardless of build type +option(DEV_BUILD "Enable development build (enables some debugging tools, local setting paths, etc.)" OFF) + # Building tests can be enabled/disabled -option(TESTS "Enable tests" ON) +option(TESTS "Build tests" OFF) + +# Building tool programs can be enabled/disabled +option(TOOLS "Build tool programs" OFF) # CBot can also be a static library option(CBOT_STATIC "Build CBot as static libary" OFF) @@ -187,7 +206,7 @@ endif() # Clipboard support ## set(CLIPBOARD_INCLUDE_DIR ${colobot_SOURCE_DIR}/lib/clipboard/include) -add_subdirectory(${colobot_SOURCE_DIR}/lib/clipboard bin/clipboard) +add_subdirectory(lib/clipboard) ## @@ -221,7 +240,7 @@ if(${TESTS}) set(GTEST_INCLUDE_DIR ${colobot_SOURCE_DIR}/lib/gtest/include) endif() - add_subdirectory(${GTEST_SRC_DIR} bin/gtest) + add_subdirectory(${GTEST_SRC_DIR} lib/gtest) # Google Mock library find_path(GMOCK_SRC_DIR NAMES src/gmock.cc src/gmock-all.cc PATHS /usr/src PATH_SUFFIXES gmock) @@ -236,13 +255,13 @@ if(${TESTS}) message(STATUS "Using bundled gmock library") set(GMOCK_SRC_DIR ${colobot_SOURCE_DIR}/lib/gmock) set(GMOCK_INCLUDE_DIR ${colobot_SOURCE_DIR}/lib/gmock/include) - add_subdirectory(${GMOCK_SRC_DIR} bin/gmock) + add_subdirectory(${GMOCK_SRC_DIR} lib/gmock) endif() # Tests targets enable_testing() - add_subdirectory(test bin/test) + add_subdirectory(test) endif() @@ -271,7 +290,13 @@ else() endif() # Subdirectory with sources -add_subdirectory(src bin) +add_subdirectory(src) + +add_subdirectory(po) + +if(${DESKTOP}) + add_subdirectory(desktop) +endif() ## diff --git a/bin/.gitignore b/bin/.gitignore deleted file mode 100644 index 96ec5ae..0000000 --- a/bin/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -# Ignore everything -* - -# But not these files... -!.gitignore -!README.txt diff --git a/bin/README.txt b/bin/README.txt deleted file mode 100644 index c63a6ee..0000000 --- a/bin/README.txt +++ /dev/null @@ -1 +0,0 @@ -Target directory for binary objects: colobot.exe and CBot/libCBot.dll diff --git a/src/desktop/.gitignore b/desktop/.gitignore index 0e770f7..0e770f7 100644 --- a/src/desktop/.gitignore +++ b/desktop/.gitignore diff --git a/src/desktop/CMakeLists.txt b/desktop/CMakeLists.txt index 23f2280..23f2280 100644 --- a/src/desktop/CMakeLists.txt +++ b/desktop/CMakeLists.txt diff --git a/src/desktop/colobot.desktop.in b/desktop/colobot.desktop.in index 9b48d87..9b48d87 100644 --- a/src/desktop/colobot.desktop.in +++ b/desktop/colobot.desktop.in diff --git a/src/desktop/colobot.ini b/desktop/colobot.ini index 27193df..27193df 100644 --- a/src/desktop/colobot.ini +++ b/desktop/colobot.ini diff --git a/src/desktop/colobot.pod b/desktop/colobot.pod index 6a25f70..6a25f70 100644 --- a/src/desktop/colobot.pod +++ b/desktop/colobot.pod diff --git a/src/desktop/colobot.svg b/desktop/colobot.svg index ef5949f..ef5949f 100644 --- a/src/desktop/colobot.svg +++ b/desktop/colobot.svg diff --git a/src/desktop/create_desktop_file.sh b/desktop/create_desktop_file.sh index 8f3d15b..8f3d15b 100755 --- a/src/desktop/create_desktop_file.sh +++ b/desktop/create_desktop_file.sh diff --git a/src/desktop/po/colobot-desktop.pot b/desktop/po/colobot-desktop.pot index ac6bbd2..ac6bbd2 100644 --- a/src/desktop/po/colobot-desktop.pot +++ b/desktop/po/colobot-desktop.pot diff --git a/src/desktop/po/fr.po b/desktop/po/fr.po index 40fa9e1..40fa9e1 100644 --- a/src/desktop/po/fr.po +++ b/desktop/po/fr.po diff --git a/src/desktop/po4a.cfg b/desktop/po4a.cfg index 881929d..881929d 100644 --- a/src/desktop/po4a.cfg +++ b/desktop/po4a.cfg diff --git a/src/po/CMakeLists.txt b/po/CMakeLists.txt index 85b401c..22393f9 100644 --- a/src/po/CMakeLists.txt +++ b/po/CMakeLists.txt @@ -5,8 +5,8 @@ set(_potFile colobot.pot) find_program(XGETTEXT_CMD xgettext) add_custom_command(OUTPUT ${_potFile} - COMMAND ${XGETTEXT_CMD} ../app/app.cpp --output=${_potFile} - COMMAND ${XGETTEXT_CMD} ../common/restext.cpp --output=${_potFile} --join-existing --extract-all --no-location + COMMAND ${XGETTEXT_CMD} ${colobot_SOURCE_DIR}/src/app/app.cpp --output=${_potFile} + COMMAND ${XGETTEXT_CMD} ${colobot_SOURCE_DIR}/src/common/restext.cpp --output=${_potFile} --join-existing --extract-all --no-location WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMENT "Extract translatable messages to ${_potFile}" diff --git a/src/po/colobot.pot b/po/colobot.pot index 8ce386f..8ce386f 100644 --- a/src/po/colobot.pot +++ b/po/colobot.pot diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 8493fe8..7c02aa1 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -8,12 +8,8 @@ set(CMAKE_CXX_FLAGS_DEBUG ${COLOBOT_CXX_FLAGS_DEBUG}) add_subdirectory(CBot) -add_subdirectory(tools) - -add_subdirectory(po) - -if(${DESKTOP}) - add_subdirectory(desktop) +if(${TOOLS}) + add_subdirectory(tools) endif() diff --git a/src/common/profile.cpp b/src/common/profile.cpp index c6af6cc..77c70c3 100644 --- a/src/common/profile.cpp +++ b/src/common/profile.cpp @@ -47,11 +47,10 @@ bool CProfile::InitCurrentDirectory() { try { - // TODO: NDEBUG should be replaced with something like BUILD_TYPE == "DEBUG"/"RELEASE" - #ifdef NDEBUG - bp::ini_parser::read_ini(GetSystemUtils()->GetProfileFileLocation(), m_propertyTree); - #else + #if DEV_BUILD bp::ini_parser::read_ini("colobot.ini", m_propertyTree); + #else + bp::ini_parser::read_ini(GetSystemUtils()->GetProfileFileLocation(), m_propertyTree); #endif } catch (std::exception & e) @@ -68,10 +67,10 @@ bool CProfile::SaveCurrentDirectory() { try { - #ifdef NDEBUG - bp::ini_parser::write_ini(GetSystemUtils()->GetProfileFileLocation(), m_propertyTree); - #else + #if DEV_BUILD bp::ini_parser::write_ini("colobot.ini", m_propertyTree); + #else + bp::ini_parser::write_ini(GetSystemUtils()->GetProfileFileLocation(), m_propertyTree); #endif } catch (std::exception & e) diff --git a/src/graphics/engine/lightman.cpp b/src/graphics/engine/lightman.cpp index 295b3da..8694c7a 100644 --- a/src/graphics/engine/lightman.cpp +++ b/src/graphics/engine/lightman.cpp @@ -112,7 +112,7 @@ void CLightManager::DebugDumpLights() continue; int deviceLight = -1; - for (int j = 0; j < m_lightMap.size(); ++j) + for (int j = 0; j < static_cast<int>( m_lightMap.size() ); ++j) { if (m_lightMap[j] == i) { diff --git a/src/graphics/engine/test/CMakeLists.txt b/src/graphics/engine/test/CMakeLists.txt deleted file mode 100644 index 134ed2a..0000000 --- a/src/graphics/engine/test/CMakeLists.txt +++ /dev/null @@ -1,28 +0,0 @@ -cmake_minimum_required(VERSION 2.8) - -if(NOT CMAKE_BUILD_TYPE) - set(CMAKE_BUILD_TYPE debug) -endif(NOT CMAKE_BUILD_TYPE) -set(CMAKE_CXX_FLAGS_DEBUG "-g -O0") - -set(MODELFILE_TEST_SOURCES -modelfile_test.cpp -../modelfile.cpp -../../../common/logger.cpp -../../../common/stringutils.cpp -) - -add_definitions(-DMODELFILE_NO_ENGINE) - -include_directories( -. -../../.. -${GTEST_INCLUDE_DIR} -) - -add_executable(modelfile_test ${MODELFILE_TEST_SOURCES}) - -target_link_libraries(modelfile_test gtest) - -add_test(modelfile_test modelfile_test) - diff --git a/src/object/robotmain.cpp b/src/object/robotmain.cpp index 7eaa3f6..b58e5f8 100644 --- a/src/object/robotmain.cpp +++ b/src/object/robotmain.cpp @@ -669,11 +669,13 @@ CRobotMain::CRobotMain(CApplication* app, bool loadProfile) m_showPos = false; m_selectInsect = false; m_showSoluce = false; - #ifdef NDEBUG - m_showAll = false; - #else + + #if DEV_BUILD m_showAll = true; // for development + #else + m_showAll = false; #endif + m_cheatRadar = false; m_fixScene = false; m_trainerPilot = false; diff --git a/src/object/robotmain.h b/src/object/robotmain.h index 04efea7..525e5df 100644 --- a/src/object/robotmain.h +++ b/src/object/robotmain.h @@ -192,7 +192,7 @@ class CRobotMain : public CSingleton<CRobotMain> { public: CRobotMain(CApplication* app, bool loadProfile); - ~CRobotMain(); + virtual ~CRobotMain(); Gfx::CCamera* GetCamera(); Gfx::CTerrain* GetTerrain(); diff --git a/src/ui/maindialog.cpp b/src/ui/maindialog.cpp index 3a31883..defff84 100644 --- a/src/ui/maindialog.cpp +++ b/src/ui/maindialog.cpp @@ -175,12 +175,12 @@ CMainDialog::CMainDialog() m_sceneDir = "levels"; - // TODO: replace NDEBUG with something like BUILD_TYPE == "DEBUG"/"RELEASE" - #ifdef NDEBUG - m_savegameDir = GetSystemUtils()->GetSavegameDirectoryLocation(); - #else + #if DEV_BUILD m_savegameDir = "savegame"; + #else + m_savegameDir = GetSystemUtils()->GetSavegameDirectoryLocation(); #endif + m_publicDir = "program"; m_userDir = "user"; m_filesDir = m_savegameDir; diff --git a/test/unit/app/app_test.cpp b/test/unit/app/app_test.cpp index 8c1e899..b517d7d 100644 --- a/test/unit/app/app_test.cpp +++ b/test/unit/app/app_test.cpp @@ -10,8 +10,6 @@ #include "app/system_mock.h" -#include "common/logger.h" - #include <gtest/gtest.h> using testing::_; @@ -57,7 +55,6 @@ protected: long long relTimeReal, long long absTimeReal); protected: - CLogger logger; CApplicationWrapper* app; CSystemUtilsMock* systemUtils; diff --git a/src/graphics/engine/test/modelfile_test.cpp b/test/unit/graphics/engine/modelfile_test.cpp index 1ca7f0a..0598e84 100644 --- a/src/graphics/engine/test/modelfile_test.cpp +++ b/test/unit/graphics/engine/modelfile_test.cpp @@ -1,22 +1,5 @@ -// * This file is part of the COLOBOT source code -// * Copyright (C) 2012, Polish Portal of Colobot (PPC) -// * -// * This program is free software: you can redistribute it and/or modify -// * it under the terms of the GNU General Public License as published by -// * the Free Software Foundation, either version 3 of the License, or -// * (at your option) any later version. -// * -// * This program is distributed in the hope that it will be useful, -// * but WITHOUT ANY WARRANTY; without even the implied warranty of -// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// * GNU General Public License for more details. -// * -// * You should have received a copy of the GNU General Public License -// * along with this program. If not, see http://www.gnu.org/licenses/. - - -#include "common/logger.h" #include "graphics/engine/modelfile.h" + #include "math/func.h" #include <gtest/gtest.h> @@ -63,17 +46,17 @@ void Init() { TRIANGLE_1.p1 = Gfx::VertexTex2(Math::Vector(-12.4099, 10.0016, -2.54558), - Math::Vector(1, 0, 1.87319e-07), - Math::Point(0.970703, 0.751953), - Math::Point(0, 0)); + Math::Vector(1, 0, 1.87319e-07), + Math::Point(0.970703, 0.751953), + Math::Point(0, 0)); TRIANGLE_1.p2 = Gfx::VertexTex2(Math::Vector(-12.4099, 10.0016, 2.54558), - Math::Vector(1, 0, 1.87319e-07), - Math::Point(0.998047, 0.751953), - Math::Point(0, 0)); + Math::Vector(1, 0, 1.87319e-07), + Math::Point(0.998047, 0.751953), + Math::Point(0, 0)); TRIANGLE_1.p3 = Gfx::VertexTex2(Math::Vector(-12.4099, 4.00165, -2.54558), - Math::Vector(1, 0, 1.87319e-07), - Math::Point(0.970703, 0.998047), - Math::Point(0, 0)); + Math::Vector(1, 0, 1.87319e-07), + Math::Point(0.970703, 0.998047), + Math::Point(0, 0)); TRIANGLE_1.material.diffuse = Gfx::Color(1, 1, 1, 0); TRIANGLE_1.material.ambient = Gfx::Color(0.5, 0.5, 0.5, 0); TRIANGLE_1.material.specular = Gfx::Color(0, 0, 0, 0); @@ -83,17 +66,17 @@ void Init() TRIANGLE_1.state = 1024; TRIANGLE_2.p1 = Gfx::VertexTex2(Math::Vector(-19, -1, 4), - Math::Vector(-1, 0, 0), - Math::Point(0.248047, 0.123047), - Math::Point(0.905224, 0.52067)); + Math::Vector(-1, 0, 0), + Math::Point(0.248047, 0.123047), + Math::Point(0.905224, 0.52067)); TRIANGLE_2.p2 = Gfx::VertexTex2(Math::Vector(-19, 4, 4), - Math::Vector(-1, 0, 0), - Math::Point(0.248047, 0.00195312), - Math::Point(0.905224, 0.614223)); + Math::Vector(-1, 0, 0), + Math::Point(0.248047, 0.00195312), + Math::Point(0.905224, 0.614223)); TRIANGLE_2.p3 = Gfx::VertexTex2(Math::Vector(-19, 4, -4), - Math::Vector(-1, 0, 0), - Math::Point(0.00195312, 0.00195312), - Math::Point(0.0947756, 0.614223)); + Math::Vector(-1, 0, 0), + Math::Point(0.00195312, 0.00195312), + Math::Point(0.0947756, 0.614223)); TRIANGLE_2.material.diffuse = Gfx::Color(1, 1, 1, 0); TRIANGLE_2.material.ambient = Gfx::Color(0.5, 0.5, 0.5, 0); TRIANGLE_2.material.specular = Gfx::Color(0, 0, 0, 0); @@ -250,14 +233,3 @@ TEST(ModelFileTest, RWOldModel) EXPECT_TRUE(CompareTriangles(modelFile.GetTriangles()[0], TRIANGLE_1)); EXPECT_TRUE(CompareTriangles(modelFile.GetTriangles()[1], TRIANGLE_2)); } - -int main(int argc, char **argv) -{ - CLogger logger; - - Init(); - - ::testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); -} - diff --git a/test/unit/main.cpp b/test/unit/main.cpp index e978630..7d08f58 100644 --- a/test/unit/main.cpp +++ b/test/unit/main.cpp @@ -14,10 +14,14 @@ // * You should have received a copy of the GNU General Public License // * along with this program. If not, see http://www.gnu.org/licenses/. -#include "gtest/gtest.h" +#include "common/logger.h" + +#include <gtest/gtest.h> int main(int argc, char* argv[]) { + CLogger logger; + ::testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS(); diff --git a/test/unit/math/func_test.cpp b/test/unit/math/func_test.cpp index 00a564b..57f1347 100644 --- a/test/unit/math/func_test.cpp +++ b/test/unit/math/func_test.cpp @@ -1,26 +1,10 @@ -// * This file is part of the COLOBOT source code -// * Copyright (C) 2012, Polish Portal of Colobot (PPC) -// * -// * This program is free software: you can redistribute it and/or modify -// * it under the terms of the GNU General Public License as published by -// * the Free Software Foundation, either version 3 of the License, or -// * (at your option) any later version. -// * -// * This program is distributed in the hope that it will be useful, -// * but WITHOUT ANY WARRANTY; without even the implied warranty of -// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// * GNU General Public License for more details. -// * -// * You should have received a copy of the GNU General Public License -// * along with this program. If not, see http://www.gnu.org/licenses/. - /* Unit tests for math functions. */ #include "math/func.h" -#include "gtest/gtest.h" +#include <gtest/gtest.h> TEST(IsPowerOfTwo, TestDifferentValues) diff --git a/test/unit/math/geometry_test.cpp b/test/unit/math/geometry_test.cpp index 7c3e26a..581ef89 100644 --- a/test/unit/math/geometry_test.cpp +++ b/test/unit/math/geometry_test.cpp @@ -1,25 +1,9 @@ -// * This file is part of the COLOBOT source code -// * Copyright (C) 2012, Polish Portal of Colobot (PPC) -// * -// * This program is free software: you can redistribute it and/or modify -// * it under the terms of the GNU General Public License as published by -// * the Free Software Foundation, either version 3 of the License, or -// * (at your option) any later version. -// * -// * This program is distributed in the hope that it will be useful, -// * but WITHOUT ANY WARRANTY; without even the implied warranty of -// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// * GNU General Public License for more details. -// * -// * You should have received a copy of the GNU General Public License -// * along with this program. If not, see http://www.gnu.org/licenses/. - /* Unit tests for functions in geometry.h */ #include "math/func.h" #include "math/geometry.h" -#include "gtest/gtest.h" +#include <gtest/gtest.h> const float TEST_TOLERANCE = 1e-5; diff --git a/test/unit/math/matrix_test.cpp b/test/unit/math/matrix_test.cpp index 5f5c3af..7693a85 100644 --- a/test/unit/math/matrix_test.cpp +++ b/test/unit/math/matrix_test.cpp @@ -1,19 +1,3 @@ -// * This file is part of the COLOBOT source code -// * Copyright (C) 2012, Polish Portal of Colobot (PPC) -// * -// * This program is free software: you can redistribute it and/or modify -// * it under the terms of the GNU General Public License as published by -// * the Free Software Foundation, either version 3 of the License, or -// * (at your option) any later version. -// * -// * This program is distributed in the hope that it will be useful, -// * but WITHOUT ANY WARRANTY; without even the implied warranty of -// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// * GNU General Public License for more details. -// * -// * You should have received a copy of the GNU General Public License -// * along with this program. If not, see http://www.gnu.org/licenses/. - /* Unit tests for Matrix struct @@ -24,7 +8,7 @@ #include "math/func.h" #include "math/matrix.h" -#include "gtest/gtest.h" +#include <gtest/gtest.h> const float TEST_TOLERANCE = 1e-6; diff --git a/test/unit/math/vector_test.cpp b/test/unit/math/vector_test.cpp index 41bac74..6fe30be 100644 --- a/test/unit/math/vector_test.cpp +++ b/test/unit/math/vector_test.cpp @@ -1,19 +1,3 @@ -// * This file is part of the COLOBOT source code -// * Copyright (C) 2012, Polish Portal of Colobot (PPC) -// * -// * This program is free software: you can redistribute it and/or modify -// * it under the terms of the GNU General Public License as published by -// * the Free Software Foundation, either version 3 of the License, or -// * (at your option) any later version. -// * -// * This program is distributed in the hope that it will be useful, -// * but WITHOUT ANY WARRANTY; without even the implied warranty of -// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// * GNU General Public License for more details. -// * -// * You should have received a copy of the GNU General Public License -// * along with this program. If not, see http://www.gnu.org/licenses/. - /* Unit tests for Vector struct @@ -24,7 +8,7 @@ #include "math/func.h" #include "math/vector.h" -#include "gtest/gtest.h" +#include <gtest/gtest.h> const float TEST_TOLERANCE = 1e-6; diff --git a/test/unit/ui/edit_test.cpp b/test/unit/ui/edit_test.cpp index d4c36eb..21af00f 100644 --- a/test/unit/ui/edit_test.cpp +++ b/test/unit/ui/edit_test.cpp @@ -1,10 +1,13 @@ #include "app/app.h" + #include "ui/edit.h" + #include "mocks/text_mock.h" +#include <fstream> + #include <gtest/gtest.h> #include <gmock/gmock.h> -#include <fstream> class CEditTest : public testing::Test { |