9 Commits

Author SHA1 Message Date
Anton Simakov 9b727b51de Silence chemistry test (#88733)
* Silence chemistry test

* Update tests/battery_density_test.cpp

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-09-19 18:24:48 -05:00
gettingusedto d08f01d55d Portable Power Station (#88289)
* Update battery.json

* Update battery.json

* Update activities_hobbies.json

* Update locations_commercial.json

* Update battery.json

* Update battery.json

* Update battery.json

* Update data/json/items/vehicle/battery.json

Co-authored-by: Anton Simakov <67688115+GuardianDll@users.noreply.github.com>

* Update battery_density_test.cpp

* Update battery.json

* Update battery.json

---------

Co-authored-by: Anton Simakov <67688115+GuardianDll@users.noreply.github.com>
2026-08-11 21:10:47 -05:00
dumb-kevin 05ab42807e tests/: wrap TU-local test fixture types in anon namespaces
- addiction_test: wrap addict_effect_totals
- battery_density_test: wrap battery_chemistry_family
- comestible_test: wrap all_stats
- encumbrance_test: wrap add_trait
- invlet_test: fuse inventory_location + invlet_state + test_action enums
- throwing_test: fuse throw_test_data + throw_test_pstats, move operator<< inside anon-ns
- vehicle_test: wrap vehicle_preset, damage_preset, folded_item_damage_preset, fuse rack_activation + rack_preset
- vision_test: wrap vision_test_case
- water_movement_test: fuse 6 swimmer/swim structs into one block
- weakpoint_test: wrap weakpoint_test_data, weakpoint_expectation, weakpoint_report
2026-05-12 10:53:28 +04:00
dumb-kevin ce95db8a8d Call Item_factory::find statically in overmap_test
- replace item_controller->find with Item_factory::find at three call sites
- silences readability-static-accessed-through-instance
2026-05-09 10:02:29 +04:00
salartarium 9962efbb59 Fix numerous basic typos in comments and documentation files (#83564)
* Update overmap_water.cpp

Fix typo

* Update horde_map_test.cpp

fix typo

* Update OPTIONS.md

fix typos and grammar

* Update overmap.h

fix typos

* Update condition.cpp

fix typo

* Update HELP_MENU.md

fix typo

* Update itype.cpp

fix typos

* Update sdlsound.cpp

fix typo

* Update construction.cpp

fix typo

* Update character_attire.cpp

fix typos

* Update battery_density_test.cpp

fix typos

* Update coverage_test.cpp

fix typo

* Update NPCs.md

fix typos

* Update MUTATIONS.md

fix typos

* Update subbodypart.h

fix typos

* Update contributing.md

fix typo

* Update itype.h

fix typo

* Update ranged_weapon_balance.md

fix typo

* Update achievements.json

fix typo

* Update advanced_inv.cpp

fix typo

* Update mapdata.h

fix typos

* Update item_degrade.cpp

fix typos

* Update ISSUE_TRIAGE.md

fix typo

* Update OVERMAP.md

fix typos

* Update MAPGEN.md

fix typo

* Update nest_conditional_placement_test.cpp

fix typos

* Update FREQUENTLY_MADE_SUGGESTIONS.md

fix typo

* Update REGION_SETTINGS.md

fix typo

* Update mutation.h

fix typos

* Update diary.h

fix typos

* Update doxygen_conf.txt

fix typo

* Update npc.h

fix typo

* Update lore.md

fix typo

* Update character.h

fix typos

* Update PowerDescriptionSpoilers.md

fix typo
2025-11-03 10:27:12 +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
Anton Simakov 2db2a2ea19 Second nail into the battery coffin (#75865)
* update batteries

* migrate all removed batteries, clean up

* sprinkle occasional batteries in boxes around the world

* fix density test fail

* fix wrong chemistry on some batteries

* obsolete medium_disposable_cell, replace current medium_battery_cell(D battery) with modern 18650 battery

* fix redefinition of 'itype_medium_battery_cell'

* remove light_disposable_cell, change the names and descriptions of baterries to match what they are

* migrate light_disposable_cell, astyle battery density test

* fix test failures

* swap battery to please ups crafting test

* swap ids for tool batteries to make more sense (and not replace all ids in the entire game)

* migrate removed vehicle parts, fix unreachable cell recipe

* fix missed afs battery
2024-08-26 12:43:26 -07:00
Kevin Granade 8679ccb835 Fix dereference into an empty container
This was somehow only crashing on LTO builds
2024-08-12 14:19:28 -07:00
Kevin Granade 86415a2a6f Add an energy density test for batteries and do a hack job of pulling conventional batteries in line. 2024-08-02 15:52:30 -07:00