Commit graph

32 commits

Author SHA1 Message Date
staphen
b85485b8f3 Resolve game crash when syncing Diablo items in Hellfire games 2022-01-17 00:31:27 +01:00
KPhoenix
fb8f0c3501 Update pack_test.cpp 2022-01-03 09:29:45 +01:00
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
Andrew James
4a940b1b07
Remove uses of Items[] as a temporary for other Item variables (#2924) 2021-11-25 09:34:13 +01:00
Gleb Mazovetskiy
3d308983a8 Migrate to libmpq
libmpq is a much simpler alternative to StormLib for reading MPQ archives.

We use our own fork of libmpq: https://github.com/diasurgical/libmpq

Impact:

* DevilutionX is now a lot more portable. Unlike StormLib, libmpq only
  needs platform-specific code for Windows.
* Locks around file access **removed** (instead we duplicate the file descriptor for streamed audio only).
* RAM usage is **300 KiB** lower than StormLib.
* Stripped release linux_x86_64 binary is **32 KiB** smaller.
* Amiga build now hangs instead of crashing.
2021-11-06 23:51:42 +00:00
Gleb Mazovetskiy
7d91bc461a Improve asset file opening
Avoid wrapping asset files via StormLib, open them directly via SDL
instead.
2021-10-24 16:21:39 +01:00
Anders Jenbo
84e73e9a53 Match correct generated names in tests 2021-10-12 21:05:19 +02:00
Anders Jenbo
116d3301f8 Load font during tests that depends on it 2021-10-12 21:05:19 +02:00
ephphatha
96451ec6ce Update spawn tests 2021-10-07 03:18:17 +02:00
ephphatha
a985df1242 Align formatting 2021-10-07 03:18:17 +02:00
ephphatha
e261de18f0 Update hellfire unpack tests to recognise full staff name 2021-10-07 03:18:17 +02:00
ephphatha
f7e0c31d8d Update item tests to handle staff name prefix changes
#3039 changed the way staff variants were named but the item tests were expecting the old logic which called them all "Staff of".
2021-10-07 03:18:17 +02:00
Juliano Leal Goncalves
379a27b64a ♻️ Convert 'ItemType' enum to enum class
🎨 Rename 'ItemType' elements to enum class standards
2021-09-13 00:25:49 +02:00
Anders Jenbo
b74feb01dc 🐛 Correctly check if item name will fit in the info panel 2021-09-12 01:37:28 +02:00
Juliano Leal Goncalves
7841c4731e 🚚 Rename 'PkItemStruct' to 'ItemPack' 2021-08-30 13:40:08 +02:00
Juliano Leal Goncalves
bb2dfdfb73 🚚 Rename 'ItemStruct' to 'Item' 2021-08-30 13:40:08 +02:00
Anders Jenbo
96bf75b502 Rename player globals 2021-07-08 02:01:14 -07:00
Anders Jenbo
c3eed43012 Add "useful" items to test 2021-06-19 08:47:23 -07:00
Anders Jenbo
27591cc29f Fix spawn save game compatability 2021-06-06 04:51:43 +02:00
Anders Jenbo
17c130b2ea Add 5 items to the tests 2021-06-06 00:03:37 +02:00
Anders Jenbo
58d1e362e4 Add 38 items to the item tests 2021-06-03 23:22:30 +02:00
Anders Jenbo
2200a78c11 Add 4 unique items to test suite 2021-05-29 18:41:44 +02:00
Anders Jenbo
6c8b116f6c 🐛 Evaluate item names the same as the original 2021-05-13 22:09:27 +02:00
Anders Jenbo
e665a0c4b0 ♻️Draw info box text using DrawString 2021-05-10 22:28:21 +02:00
Anders Jenbo
c11945e62b 🎨 Fix line endings 2021-05-07 23:22:51 +02:00
Jmgr
c33182d6de Modernize deprecated headers 2021-04-25 02:50:31 +02:00
Anders Jenbo
a5f062b747 🎨 Use stdint instead of SDL types 2021-04-24 05:17:59 +02:00
Anders Jenbo
69f2452119 Add Thunderclap to tests 2021-04-18 23:46:19 +02:00
Anders Jenbo
53287ae0b0 Add Gnat Sting to tests 2021-04-18 23:39:59 +02:00
Anders Jenbo
15ea464ddd Add more items to tests 2021-04-16 04:48:02 +02:00
Anders Jenbo
997c1dba55 🚚 Split up all.h in to proper header relations 2021-04-16 01:04:54 +02:00
Anders Jenbo
53a3657b29 🚚 Move tests to a standard folder 2021-04-10 19:59:50 +02:00
Renamed from SourceT/pack_test.cpp (Browse further)