6 Commits

Author SHA1 Message Date
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
Eric Pierce 29b7473ee1 Add weather description widget
- New display::weather_text_color - current weather conditions, in color
- New weather_text widget_var - showing weather_text_color
- New weather_desc widget using weather_text var
- Add weather_desc to light/moon/wind/temp section of custom sidebar
- Test cases (fixing scoped_weather_override to refresh current weather)
2022-01-03 06:02:06 -07:00
Kevin Granade bc1d00cf4b More field spread sanity checks (#51212)
* More field spread sanity checks

* Set weather to clear in fire spread test
2021-08-29 22:19:08 -07:00
John Bytheway 92b501fea4 Add RAII helper for weather overrides
Also, expand clang-tidy check to enforce its use.
2021-03-26 11:22:08 -04:00
John Bytheway e189957ff2 Run IWYU 20200408 (#39364)
* Helper script to run IWYU

* Run IWYU

* Update deprecated headers

* Run IWYU again

* Re-suppress cxxabi.h

This pragma got accidentally removed because it was deemed to be a
comment attached to a #include.

* Remove extra SDL header includes

* Fix ime.cpp headers

Some tweaks to help IWYU not break this file by messing with
platform-specific stuff not relevant on Linux.

* Update game.h

* Move new point.h includes inside #ifdef

* Re-add platform_win.h to mapsharing.cpp

* Apply suggestions from code review

Co-authored-by: ZhilkinSerg <ZhilkinSerg@users.noreply.github.com>
2020-04-10 12:16:19 +03:00
John Bytheway 9b91fbf78e Option override support for tests (#38051)
* Add an RAII class for overriding options for tests

This temporarily changes an option value and restores it afterwards.

* Update tests to use override_option

Replace places where the tests were directly modifying options with uses
of the new override_option.

This should help to reduce the dependency of the tests on test ordering.

* Force a weight format for iteminfo test

One iteminfo test could fail when the options were configured to metric,
so override that option for that test.
2020-02-19 23:03:11 +03:00