16 Commits

Author SHA1 Message Date
moxian c44d65a8ae Run IWYU again to pick up the changes 2025-02-11 13:02:19 -08: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
PatrikLundell eda59f29e9 Introduced untyped coordinate operations to typed ones (#77098)
* Introduced untyped coordinate operations to typed ones

* Missed rotate usages

* demanded changes
2024-10-25 11:49:13 -07:00
PatrikLundell 1e228cae8b typified submap.h/cpp (#74911) 2024-07-08 11:08:39 -07: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
Aivean 6bb591b8b7 simplify submap rotation logic (use three swaps without temporary submap), remove obsolete method 2021-01-17 19:03:24 -08:00
John Bytheway 51ddbd5661 Convert existing uses of auto caught by new check 2020-09-01 06:54:06 -04:00
Kevin Granade c5ccf0c2c7 IWYU for tests (#42806) 2020-08-09 09:46:57 +03:00
Kevin Granade 6d1841ac67 Precompiled Catch2 header (#42453)
* Hoist catch.hpp include to the top of files

* Precompile the catch header in tests
2020-07-29 01:28:26 +03:00
John Bytheway 9fc62e133b Appease clang-3.8 2020-06-12 09:34:02 -04:00
John Bytheway 78cb7c199a Automated refactoring of remaining code 2020-06-12 08:29:42 -04:00
ZhilkinSerg e1f432d11f Code style (2020-01-13) (#37021)
* Appease clang
* Remove excessive empty lines
* Remove excessive whitespaces before semicolons
* Remove excessive empty lines (tests)
* Remove excessive whitespaces before semicolons (tests)
2020-01-14 01:31:43 +00:00
John Bytheway 7bda6884c3 Custom clang-tidy check to suggest use of named point constants (#33200)
* Initial version of UseNamedPointConstantsCheck

This is intended to convert hand-rolled point constants like
point( 0, 0 ) into point_zero.

* Apply refactoring pass

* Manual fixup of refactored code

Add various manual tweaks to the automatically refactored code where I
think it makes sense.

* Remove some unnecessary initializations
2019-08-13 23:04:51 +03:00
John Bytheway 4321c025d2 IWYU 20190629 (#31990)
* Add IWYU pragma: keep

* Run IWYU and astyle

* Run IWYU a second time

* Prevent #include <cxxabi.h>

Unclear why IWYU thinks this is needed.  It isn't, and it causes
problems on Visual Studio.
2019-07-01 12:25:53 +03:00
codemime 0ad24d5bc4 Simplify map rotation and add very basic tests for submap rotation 2019-05-05 02:20:57 +03:00