unit->game tests, /tg/ assertions and allocations (#27646)

* unit->game tests, /tg/ assertions and allocations

* whoopsies

* fix lint
This commit is contained in:
warriorstar-orion
2024-12-21 21:19:33 +00:00
committed by GitHub
parent 79bad427c8
commit bb60a027bf
53 changed files with 304 additions and 243 deletions
+11
View File
@@ -0,0 +1,11 @@
// Unit test to ensure people have appropriately set up their origin_techs in items, ensuring they give the appropriate resources in RnD breakdown
/datum/game_test/origin_tech/Run()
var/regex/nums = regex("^\[0-9]+")
for(var/tpath in subtypesof(/obj/item))
var/obj/item/I = tpath
var/tech_str = initial(I.origin_tech)
var/list/tech_list = params2list(tech_str)
for(var/k in tech_list)
TEST_ASSERT(length(nums.Replace(tech_list[k], "")) == 0, "Invalid origin tech for [tpath]: [tech_str]")