mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-10 08:54:15 +00:00
* Wraps all instances of invoking Fail() into the TEST_FAIL Macro (#73407) We shouldn't really be invoking the proc itself because then we don't pass along the failing line/file to our consumers, let's use the macro in all instances that really need it. I noticed people were invoking the `Fail()` proc directly rather than using `TEST_FAIL` instead, so they weren't getting those neat annotations on their failing code because we never passed along the failing line/file to actually apply those annotations. That's silly. We don't even return on `TEST_FAIL` either, so there's no reason to not do this (only upsides wahoo). * Wraps all instances of invoking Fail() into the TEST_FAIL Macro * Correct macro in opfor unit test --------- Co-authored-by: san7890 <the@san7890.com> Co-authored-by: Tastyfish <crazychris32@gmail.com>
13 lines
863 B
Plaintext
13 lines
863 B
Plaintext
/datum/unit_test/limbsanity
|
|
|
|
/datum/unit_test/limbsanity/Run()
|
|
for(var/path in subtypesof(/obj/item/bodypart) - list(/obj/item/bodypart/arm, /obj/item/bodypart/leg)) /// removes the abstract items.
|
|
var/obj/item/bodypart/part = new path(null)
|
|
if(part.is_dimorphic)
|
|
if(!icon_exists(UNLINT(part.should_draw_greyscale ? part.icon_greyscale : part.icon_static), "[part.limb_id]_[part.body_zone]_m"))
|
|
TEST_FAIL("[path] does not have a valid icon for male variants")
|
|
if(!icon_exists(UNLINT(part.should_draw_greyscale ? part.icon_greyscale : part.icon_static), "[part.limb_id]_[part.body_zone]_f"))
|
|
TEST_FAIL("[path] does not have a valid icon for female variants")
|
|
else if(!icon_exists(UNLINT(part.should_draw_greyscale ? part.icon_greyscale : part.icon_static), "[part.limb_id]_[part.body_zone]"))
|
|
TEST_FAIL("[path] does not have a valid icon")
|