Files
Aurora.3/code/unit_tests/species_tests.dm
Fluffy a4f8285686 Refactor of, and more, unit tests (#16065)
* Initial experiment

* holy shit the pain of this rabbit hole

* F

* F

* F

* F

* FFF

* FFFF

* FFFFFFFFF

* FFFFFFFFFF

* FF

* ffffff

* ffffffff

* F^F

* FFFFFF

* F

* Robusted

* F

* Some readability, hopefully

* Fear

* Aurora was a mistake

* Horrors beyond our comprehension

* Use the appropriate macro across the tests

* Brah

* FF

* Mute janitors robusting the ling

* Frail doctors revealing to be more trained than a KGB sleeper agent when the crew armory opens

* FFFFFFF

* gujbjh

* Shitcode, shitcode everywhere

* Pain

* Cursed codebase

* Fix AI mask qdel, SQL tests to macro

* Attempt at github grouping

* Take two

* Brah

* Maybe this looks better

* Different formatting

* FFS

* Visuals

* pain

* FFFFF

* hyuh

* fgdsgd

* igyguybujgb

* Just calling the parent here

* dsfs

* fdsaf

* Move more pieces to use the macros

* Finish moving to macro

* gah

* Changelog, some touchups

* Fix another found runtime

* GDI
2023-04-03 10:47:31 +00:00

27 lines
807 B
Plaintext

/datum/unit_test/species
name = "SPECIES template"
/datum/unit_test/species/injection_mod
name = "SPECIES: All species shall have a valid injection_mod"
// Check that injection_mod is larger than 0. 0 injection_mod is indistinguishable from a failed injection, and a negative injection_mod is meaningless.
/datum/unit_test/species/injection_mod/start_test()
var/list/failed_species = list()
for(var/S in typesof(/datum/species))
var/datum/species/species = S
if(initial(species.injection_mod) > 0)
continue
else
failed_species |= species.type
if(failed_species.len)
for(var/fail in failed_species)
TEST_FAIL("SPECIES: Invalid injection_mod var set on species: [english_list(failed_species)]")
else
TEST_PASS("SPECIES: All species had valid injection_mod vars set.")
return 1