Fix stale include re-enabling test/item, fix dead sort-by-type coverage

test/item/test_inventory.c was disabled via a commented-out
add_subdirectory(item) with no explanation - the actual cause was a stale
"item/inventory.h" include left over from before the rpg/ reorg (real path
is rpg/item/inventory.h). The current inventory.h/.c API it tests hasn't
drifted; only the include path had rotted.

Also fixes a copy-paste bug in test_inventorySort: the "sort by type"
assertions were calling INVENTORY_SORT_BY_ID again instead of
INVENTORY_SORT_BY_TYPE, so inventorySortByType/Reverse had zero real
coverage. Asserts on type grouping only (not the tied FOOD-vs-FOOD order),
since the underlying sort() is qsort and not stable.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-30 12:33:00 -05:00
parent 717902462b
commit c0292842a5
2 changed files with 20 additions and 10 deletions
+1 -1
View File
@@ -11,6 +11,6 @@ add_subdirectory(error)
add_subdirectory(thread)
add_subdirectory(display)
add_subdirectory(rpg)
# add_subdirectory(item)
add_subdirectory(item)
add_subdirectory(time)
add_subdirectory(util)