From b90acb898c07c467e51f3a7cac43eff2cb1161c5 Mon Sep 17 00:00:00 2001 From: Roxy <75404941+TealSeer@users.noreply.github.com> Date: Thu, 16 Oct 2025 19:30:57 -0400 Subject: [PATCH] Improvement for trash food unit test (#93473) ## About The Pull Request `TEST_ASSERT` returns on failure, in a loop like this test that means if you encounter a single failure the whole test fails immediately. We want every failure listed, `TEST_FAIL` fails without returning. ## Why It's Good For The Game I thought my code base had one failure but it didn't it had 60+ --- code/modules/unit_tests/trash_food.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/unit_tests/trash_food.dm b/code/modules/unit_tests/trash_food.dm index 570531c187d..8b545d5a751 100644 --- a/code/modules/unit_tests/trash_food.dm +++ b/code/modules/unit_tests/trash_food.dm @@ -30,5 +30,5 @@ continue if(trash in food_trash_blacklist) continue - - TEST_ASSERT(food_trash[trash], "[food] must include its trash_type for loot table /obj/effect/spawner/random/trash/food_packaging or be added to this unit tests food_trash_blacklist") + if(!food_trash[trash]) + TEST_FAIL("[food] must include its trash_type for loot table /obj/effect/spawner/random/trash/food_packaging or be added to this unit tests food_trash_blacklist")