Commit Graph

43 Commits (193d105a3fde2ab0d0063d8c32e1bc5eb5ba38a7)

Author SHA1 Message Date
MrSimbax 193d105a3f Refactor CBotUT.TestSaveStateIoFunctions
Split the test into several parametrised tests for each data type.

Add more tests with different values.

Fix the ReadBinary() function in order to fix the ReadDouble() function
for negative values (the sign bit was being lost).
2021-12-09 20:44:31 +01:00
MrSimbax a69b88e09a Move time related functions out of CSystemUtils
GetCurrentTimeStamp() has not been moved because of
CApplication unit tests.
2021-09-11 13:26:38 +02:00
MrSimbax 5daaba6e64 Fixes after merge
Fix mistakes after previous merge and make it compile.

Rewrite the function interpolating between time stamps as it was
written after the original pull request was created. Add unit tests
for it.

I couldn't help myself and also changed some enums to enum classes and
did some renames.
2021-09-11 12:44:26 +02:00
MrSimbax 2b107736e2 Merge branch 'platform-independent' of https://github.com/AbigailBuccaneer/colobot into AbigailBuccaneer-platform-independent 2021-09-11 10:47:39 +02:00
MrSimbax 2143f21828 Fix linter 2020-07-14 13:43:33 +02:00
MrSimbax 81ddda4515 Make tests work with targets 2020-07-11 12:16:20 +02:00
AbigailBuccaneer 807d6e40e3 Fix -Wsuggest-override compile errors in tests
Fixes #1160
2018-05-09 08:49:23 +01:00
AbigailBuccaneer 4119e669d1 Remove central tracking of SystemTimeStamp
SystemTimeStamp used to be an opaque class, as it was provided by
`system_{linux/other/windows}.h`. Because of this, code dealt in
SystemTimeStamp pointers, and getting the current timestamp required a
memory allocation. Now SystemTimeStamp is just a
`std::chrono::time_point`, we can make the code cleaner and faster by
just directly keeping SystemTimeStamp instead of pointers around.
2018-04-20 09:57:10 +01:00
krzys-h 81b7bcc5bc Moved system modules from app/ to common/system/ 2016-07-24 14:38:49 +02:00
krzys-h 048534e89d Fixed some errors reported by colobot-lint 2016-01-23 20:58:03 +01:00
krzys-h 8437a9bdd2 CBot testing framework; fixed a few bugs 2015-12-23 20:39:56 +01:00
krzys-h d577e7f41b Tests for CBotToken 2015-12-23 18:44:14 +01:00
krzys-h 9ec61d93e5 Refactored CBotString and const char* to std::string in CBot engine
A lot of changes, so it needs lots of testing
2015-12-20 16:19:10 +01:00
Grunaka 6a396e1522 Add unit tests for class CBotString.
Add comments in class CBotString.
Change existing comments in class CBotString to be compliant with doxygen.
Add function "const char* CBotString::CStr() const".
Add null pointer check in function "const CBotString& CBotString::operator+=(const CBotString& str)"
Remove functions "CBotString CBotString::Mid(int nFirst, int nCount) const" and "CBotString CBotString::Mid(int nFirst) const" because they were doublons of function "CBotString CBotString::Mid(int nFirst, int lg) const"
2015-11-01 17:03:30 +01:00
Piotr Dziwinski a0f0a53d59 Fix for gtest build with Clang libc++ 2015-08-14 14:24:55 +02:00
krzys-h 02c24fbf27 CProfile -> CConfigFile 2015-07-19 16:05:09 +02:00
Piotr Dziwinski ccaac2c544 Rewrite unit tests to use HippoMocks 2015-05-13 00:52:18 +02:00
Piotr Dziwinski 74312b0405 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
2014-08-12 20:58:55 +02:00
Piotr Dziwinski 52cf9e2815 Fix test compilation 2014-06-24 17:38:28 +02:00
Piotr Dziwinski 604d4a614e Fixed tests compilation 2014-01-18 20:16:31 +01:00
Didier Raboud 343fa8f0cb Add a PLATFORM_GNU global variable matching all GNU systems such as Debian's Linux, kFreeBSD and Hurd 2013-11-27 18:53:28 +01:00
Didier 'OdyX' Raboud 89e2855f95 Consolidate SYSTEM_CPP_MODULE in the main CMakeLists.txt 2013-11-20 10:39:06 +01:00
Didier 'OdyX' Raboud 9ddb034bfa Add libintl library to the unit tests on Mac OSX 2013-10-26 13:19:23 +02:00
Didier 'OdyX' Raboud b3b6a40d9e MacOSX: Add initial support in CMake build infra 2013-10-24 21:12:52 +02:00
Piotr Dziwinski 3e8568bda4 Fixed test binaries location 2013-06-29 00:31:30 +02:00
Piotr Dziwinski 8d82fd61bc Fix for tests compilation 2013-06-24 14:46:13 +02:00
Piotr Dziwinski 81a6de41a5 Some further changes in CMakeLists
* removed DEV_BUILD autodetection (could be confusing)
 * ignore desktop subdirectory on Windows
 * some refactoring
2013-06-24 14:17:28 +02:00
Piotr Dziwinski 7874aca10c Enhanced logging, option to auto-start mission
* added logging of application events
 * changed debug mode flag to independent debug modes
 * added option to auto-start mission (load a mission immediately
   after startup)
 * removed "enum value out of range" prints
 * some refactoring
2013-06-16 21:54:36 +02:00
Piotr Dziwinski 950a3474d5 Refactored sound code
* fixed formatting and naming to be uniform with rest of code
 * moved default implementation of CSound to cpp module
2013-05-27 10:19:16 +02:00
Piotr Dziwinski f7f6e10c70 Added check and warning about non-power-of-2 textures 2013-05-11 21:40:09 +02:00
Piotr Dziwinski cc8ed2979b Fixed deleting of CObjectManager
* fix in CApplication destructor
 * re-enabled unit tests
2013-05-11 21:22:03 +02:00
erihel 2ba146cd63 Fixed problem with test compilation
Altered test cmake files to fix linker problem.
Changed tga to png in pyro.
Changed enum in CMotionDummy.
2013-04-29 14:29:12 +02:00
krzys-h 22c3f44c61 Sorry, I've meant colobot_ut! 2013-04-27 14:01:22 +02:00
erihel 32fdf993ea * Changed order of libs in cmake for clipboard 2013-04-20 19:41:39 +02:00
erihel f1873a52d5 * Minor changes to cmake files 2013-04-12 12:07:57 +02:00
erihel 01309c8bd0 * Added clipboard support (issue #60)
* Fixed keyboard shortcuts while code editing in game
2013-04-11 13:37:15 +02:00
krzys-h 47b7236a17 Tests AGAIN! 2013-03-31 10:35:23 +02:00
Piotr Dziwinski 195d6cded0 Fixed timer functions on win32
* changed win32 implementation to QueryPerformaceTimer system function
 * refactored system utils code
 * proper tests for time utils and update event creation in application
 * should fix issue #134
2013-03-24 12:00:12 +01:00
Piotr Dziwinski 4a30800cf1 Fixes for compiling on MSYS
* fixed SDL_main() and putenv() issues
 * disabled desktop subdir for MSYS
 * disabled building CBot_console for now
2013-03-22 19:17:08 +01:00
Piotr Dziwinski 025bedecfb Refactored platform-specific code
Moved functions from .h to .cpp files
2013-03-19 23:07:39 +01:00
erihel 47e7904bb7 * Fix for issue #140 (not compiling sound files while sound support is enabled) 2013-03-14 20:41:48 +01:00
Piotr Dziwinski b0d86ebe5a Better light sorting
Should fix lighting issue (#62)
2013-02-25 21:58:01 +01:00
Piotr Dziwinski 209c6412ae Refactoring in tests infrastructure
* all tests are now in /test/ subdirectory
 * unit tests concatenated to one executable (TODO: ui, common)
 * preparation for test environments (OpenGL and others)
 * removed old TestCBot
2013-02-03 20:03:36 +01:00