18 Commits

Author SHA1 Message Date
dobbry-vechur 97067ca137 Use Catch::Matchers:: namespace for all test matchers (#85907) 2026-03-18 08:04:02 -05:00
Holli 30efd184f6 Add in a few restricted magazines (#80183)
* Add in a few restricted magazines

* Lint

* Generic gun migrations

* Update ammo_set_test.cpp

* Attempt error fix

* Attempt fix 2

* Update 9mm.json

* Update ammo_set_test.cpp
2025-03-16 23:15:36 -05:00
PatrikLundell f9900fccc2 Merge pull request #79670 from PatrikLundell/mapify
mapify: split ammo remaining into link and non link
2025-02-16 14:49:56 -06:00
PatrikLundell 30b83d6c34 add needed includes 2025-02-13 09:15:16 +01:00
PatrikLundell 7bfa56fa99 Merge branch 'master' into mapify 2025-02-13 08:46:56 +01:00
PatrikLundell 0ac675121c mapified a little item prompting a lot of vehicle 2025-02-11 15:10:00 +01:00
moxian 2ee44002fd Mechanically IWYU the tests
python3 ~/github/include-what-you-use/iwyu_tool.py -j5 -p build $( find
src/ tests/ -maxdepth 1 -name '*.cpp' | grep -v -f
tools/iwyu/bad_files.txt )  --  -Xiwyu --comment_style=long -Xiwyu -
-max_line_length=1000 -Xiwyu --cxx17ns -Xiwyu
--mapping_file=../tools/iwyu/cata.imp   | tee out/iwyu/f-a-01.txt >
/dev/null

followed by

cat out/iwyu/f-a-02.txt | python3
~/github/include-what-you-use/fix_includes.py --reorder --nosafe_headers

followed by manual fixups of <stddef.h> -> <cstddef> and similar.

tests/generic_factory_test.cpp gets mangled very badly (IWYU bug) so
it's excluded from the list.

Code size:
includes:
$ cat obj/tiles/*.inc | wc
 288068  576136 17898260
$ cat tests/obj/tiles/*.inc | wc
 167044  334088 10465766

post-processed source (clang -E):
./make_preproc.sh src/
68567896 177775140 2134075721
./make_preproc.sh tests/
39341957 102891720 1243323710
2025-02-10 00:46:57 -08:00
Procyonae 2a922a6c59 Appease our clang overlords
Failing to remember Z before a strikes again
2025-01-10 20:14:36 +00:00
Procyonae 982df19d0f Change /tests remaining uses of raw string item initialisation to use itype_id s
"remaining uses" being somewhat of an understatement -_-
2025-01-10 15:31:15 +00:00
TheMurderUnicorn f584ec9dc5 Make CZ 75 16 Round Mag Actually Hold 16 Rounds and Fix ID (#73451)
* Change id and mag count for cz 75 16rnd mag

* Update cz 75 12 rnd mag id

* Change cz 75 12 rd mag ID

* Change cz 75 12 rd mag ID

* Change cz 75 12 rd mag ID

* Change cz 75 12 rd mag ID

* Change cz 75 12 rd mag ID

* Change cz 75 12 rd mag ID

* Change cz 75 12 rd mag ID

* Please God Don't Break The Test

* Migration for cz 75 12 rd mag to 16 rd mag
2024-05-05 11:05:10 -05:00
mqrause bd211963e6 move item_pocket::pocket_type to it's own header 2023-11-27 13:22:35 +01:00
Alexey 07356b65a5 Normalize TEST_CASE names (#66241)
* Convert integer parsing test to use normal TEST_CASEs

* Rename test name too similar to another

* Test to enforce normalized test names

* Normalize TEST_CASE names (scripted)
2023-06-17 13:57:19 -03:00
John Bytheway ebd549b300 Fix StringMaker ODR violations in tests
Catch2 provides a customization point for converting our types to
strings by specializing the StringMaker template.

We have some specializations in stringmaker.h, but this feature was only
working intermittently.  I finally figured out that was due to an ODR
violation.  The test files that didn't include stringmaker.h were
compiling a different specialization than the ones that did.

Re-jig the test includes so that any file including catch.hpp also
includes stringmaker.h, thereby ensuring that the custom
specializations are used everywhere and there is no ODR violation.

I achieved this by adding a new cata_catch.h header and making all
existing headers include catch.hpp via the new header.
2021-07-03 07:42:06 -07:00
John Bytheway 5558a39c6d Split ammo_set_test function
Split this large function to reduce its size.
2021-07-03 07:42:04 -07:00
Binrui Dong 9fdb7ef59c Run IWYU
* Change _ctype.h and __locale to cctype and clocale

* Change _wctype.h to cwctype in game.cpp

* Change __functional_base to functional

* Remove libcxx internal headers

* Remove UNIX system headers

* Fix clang-tidy error with -nostdinc++
2021-02-06 00:18:41 -05:00
Kevin Granade 51bcf73317 Reverse some assertions about gun internal state 2020-12-07 14:38:56 -08:00
akirashirosawa 458d309da1 add debugmsg capture for tests 2020-09-01 21:41:38 +03:00
akirashirosawa 8694924bd4 test file rename 2020-08-28 16:25:07 +03:00