Commit graph

18 commits

Author SHA1 Message Date
Gleb Mazovetskiy
076b0c0c05 Overhaul tests
1. Adds a `libdevilution_so` target when tests are enabled.
2. Each test file is now a separate binary target linked against `libdevilutionx_so` (can now run tests in parallel).
3. Tests are now defined in a separate `test/CMakeLists.txt` file.
4. Building the tests is now controlled by the standard `BUILD_TESTING` option (defined by CTest).
5. Tests are now built by default.
6. On CI, test errors are now reported.

Also:

* `.clang-format`: Enable SortIncludes in tests
* `path_test.cpp`: Fix -Wsign-compare
2021-12-16 20:26:51 +00:00
Gleb Mazovetskiy
7e1fea6f76 clang-format all files in {Source,test}/
Also includes a few manual tweaks to comments and newlines for better results.

Co-authored-by: Anders Jenbo <anders@jenbo.dk>
2021-11-24 23:44:12 +01:00
obligaron
3a9cc631c7 Rename DelayLen -> TicksPerFrame
Rename DelayCounter -> TickCounterOfCurrentFrame
2021-06-27 01:26:49 -07:00
obligaron
3ba4bac5e2 Harmonize DelayLen for Player and Monster (was 1-based on monseter (>= DelayLen) and 0-based on player (> DelayLen). Now both are 1-based (>= DelayLen) 2021-06-27 01:26:49 -07:00
Anders Jenbo
c6f6c99add Fix GCC warning 2021-06-13 05:18:08 +02:00
qndel
69b903743a fix typos 2021-05-23 05:52:52 +02:00
obligaron
b94e599f5e ADL: Advance skipped Frames in SetNewAnimation and remove logic from PM_XYZ 2021-05-09 09:53:53 +02:00
Anders Jenbo
c11945e62b 🎨 Fix line endings 2021-05-07 23:22:51 +02:00
obligaron
8e5996cfca run clang-format 2021-05-07 23:21:01 +02:00
obligaron
cb7819a75c Introduce AnimationDistributionFlags::RepeatedAction 2021-05-06 07:52:17 +02:00
obligaron
b5954eb34b Change AnimationDistributionParams to AnimationDistributionFlags 2021-05-06 07:52:17 +02:00
obligaron
b08e0c20dc In repeated Animations show skipped Frames from previous Animation (repeated Attack/RangeAttack/Spell) 2021-05-06 07:52:17 +02:00
obligaron
ffc3c66e68 AnimationInfoTest: Add repeated attack test 2021-05-06 07:52:17 +02:00
obligaron
406a2bd260 Use AnimationInfo directly in tests 2021-04-29 04:33:51 +02:00
obligaron
ff995adc2b Move ProcessPlayerAnimation to AnimationInfo 2021-04-29 04:33:51 +02:00
obligaron
3b87433fc2 Move GetFrameToUseForPlayerRendering to AnimationInfo 2021-04-29 04:33:51 +02:00
obligaron
1de46a8495 Rename member variables 2021-04-29 04:33:51 +02:00
obligaron
0b5183f63e Introduce AnimationInfo
Update AnimationInfo.DelayLen comment
2021-04-29 04:33:51 +02:00
Renamed from test/animationinformation_test.cpp (Browse further)