Files
Aurora.3/code/unit_tests/spawner_tests.dm
Fluffy 8cf49025ae CI improvements (#17632)
* the boulder must be pushed

* awk?

* sadfasdf

* sadf

* sadfsda

* asdf

* sdfasafd

* asdfsad

* asdf

* dsfafa

* despair

* sadfsda

* sdfsadf

* 1589

* sdaf

* sadfasd

* asdf

* safsadf

* fdsafsa

* add create and destroy

* fdsa

* sdafasfsda

* pods for away sites

* oopsie

* hgdfs

* i am speed

* sdafas

* hopefully this works first trAHAHAHAH

* asdf

* dfsadasf

* sfasdf

* 6461

* dsfasfd

* sfda

* fsd

* sdfas

* fsdaf

* sadf

* safasf

* sudo

* sadfsad

* dfsdf
2023-11-13 21:25:33 +01:00

41 lines
1.1 KiB
Plaintext

/*
*
* Unit Test Template
* This file is not used.
*
*/
/datum/unit_test/template
name = "Ghost Spawner Tests" // If it's a template leave the word "template" in it's name so it's not ran.
groups = list("generic")
/datum/unit_test/template/start_test()
var/list/ignore_spawners = list(
/datum/ghostspawner/human,
/datum/ghostspawner/human/admin,
/datum/ghostspawner/human/admin/corporate,
/datum/ghostspawner/simplemob,
/datum/ghostspawner/human/ert
)
var/failed_checks = 0
var/checks = 0
for(var/spawner in subtypesof(/datum/ghostspawner))
checks++
var/datum/ghostspawner/G = new spawner
if(instances_of_type_in_list(G,ignore_spawners, strict = TRUE))
continue
//Check if we hae name, short_name and desc set
if(!G.short_name || !G.name || !G.desc)
TEST_FAIL("Invalid Spawner: Type:[G.type], Short-Name:[G.short_name], Name:[G.name]")
failed_checks++
if(failed_checks)
TEST_FAIL("\[[failed_checks] / [checks]\] Ghost Spawners are invalid")
else
TEST_PASS("All Ghost Spawners are valid.")
return 1
// ============================================================================