Files
Yogstation/code/modules/unit_tests/component_tests.dm
John Willard 74fcaf2af6 Updates unit testing (+ adds some new ones) (#19186)
* Updates our unit testing to be much better than it is now

Updates our unit testing to somewhat more functional ones ported from TG
I also added 2 new unit tests to serve as examples, mapping and job landmarks.

* Revert some minor things

* Fixes the log file

* Update unit_tests.dm

* adds a missing icon

* additional changes
2023-06-13 19:49:40 -05:00

12 lines
497 B
Plaintext

/datum/unit_test/component_duping/Run()
var/list/bad_dms = list()
var/list/bad_dts = list()
for(var/datum/component/comp as anything in typesof(/datum/component))
if(!isnum(initial(comp.dupe_mode)))
bad_dms += comp
var/dupe_type = initial(comp.dupe_type)
if(dupe_type && !ispath(dupe_type))
bad_dts += comp
if(length(bad_dms) || length(bad_dts))
TEST_FAIL("Components with invalid dupe modes: ([bad_dms.Join(",")]) ||| Components with invalid dupe types: ([bad_dts.Join(",")])")