7 Commits

Author SHA1 Message Date
moxian e2f7aaf95f Modernize c headers (stddef.h -> cstddef &co)
Code size:
includes:
$ cat obj/tiles/*.inc | wc
 278247  556494 17375710
$ cat tests/obj/tiles/*.inc | wc
 163745  327490 10307041

post-processed source (clang -E):
./make_preproc.sh src/
65903054 170378741 2049783477
./make_preproc.sh tests/
38434408 100326802 1215849078
2025-02-10 13:56:09 -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
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
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
Zhilkin Serg e44f38af40 Remove excessive empty lines 2022-12-06 10:42:15 +03:00
Hirmuolio 4ee9085113 Rewrite bionic fuel system (#61049)
* energy_consumption as energy

* units::energy fuel

* units::energy material

* item fuel adjustments

* bionuc reload window

* bionic reload window

* typo

* bionic power from pedaling

* adjust electric vehicle tests

* mods

* mods

* rename some variables

* cleanup

* temp fix bionic

* temp fix treshold

* fuel tests

* adjust mod

* adjust mod

* adjust mod

* rename variable

* gasoline json

* flags

* get fuels

* remote ups

* veh and solar

* auto toggle

* testing

* fueled bionic

* cable vehicle

* cable solar

* metaboilism

* solar

* cleanup

* metaboilism messages

* remove old

* rename

* combine with passive

* fuel in bionic window

* remove fuel eating

* more tanks

* fix restriction

* fix restriction

* base test pocket

* material limit

* doc

* more items

* fuel from container pockets

* lint

* flat_set

* remove unused get_fuel_available

* remove unused

* remove unused

* remove unused

* remove unused

* astyle and tests

* migration

* mods

* broken npc code

* remove autostart

* treshold improvements

* treshold for muscle

* improved treshold

* add only missing

* remnants of fuel eating

* applies only to fueled

* fuel consumption display

* unused

* itype

* rename

* carble connection fixes

* sort

* tests

* muscle check

* astyle

* comment

* cable test

* cable solar

* better test

* sort

* better cables

* test empty battery

* fix corpses being made out of "

* name typo

Co-authored-by: Fris0uman <41293484+Fris0uman@users.noreply.github.com>

* name typo

Co-authored-by: Fris0uman <41293484+Fris0uman@users.noreply.github.com>

* not npc usable now

* fuel saving ui

* astyle

* get fuels only when necessary

* reorganize bionic functions

* fuel saving for cable

* test for running out of fuel

* fix running out of fuel

* fix test

* may not count by charges

* avoid warning

* test mod fix

* clang

* cleanup test

* fuel_energy per unit

* unnecessary comment

* outdated vehicle code

* maybe fixes test

Co-authored-by: Fris0uman <41293484+Fris0uman@users.noreply.github.com>
2022-09-21 13:33:23 +02:00
Hirmuolio 6adf2881a0 Handle fuel energy and vehicle energy_consumption as units::energy (#60607)
* energy_consumption as energy

* units::energy fuel

* units::energy material

* item fuel adjustments

* bionuc reload window

* bionic reload window

* typo

* bionic power from pedaling

* adjust electric vehicle tests

* mods

* mods

* rename some variables

* cleanup

* temp fix bionic

* temp fix treshold

* fuel tests

* adjust mod

* adjust mod

* adjust mod

* rename variable

* migration

* migration

* consumption_per_hour

* fuel does not need to count by charge

* actually is sort of has to
2022-09-08 13:53:47 +02:00