mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
* 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
14 lines
706 B
Plaintext
14 lines
706 B
Plaintext
/// Verifies that roundstart dynamic rulesets are setup properly without external configuration.
|
|
/datum/unit_test/dynamic_roundstart_ruleset_sanity
|
|
|
|
/datum/unit_test/dynamic_roundstart_ruleset_sanity/Run()
|
|
for (var/datum/dynamic_ruleset/roundstart/ruleset as anything in subtypesof(/datum/dynamic_ruleset/roundstart))
|
|
|
|
var/has_scaling_cost = initial(ruleset.scaling_cost)
|
|
var/is_lone = initial(ruleset.flags) & (LONE_RULESET | HIGH_IMPACT_RULESET)
|
|
|
|
if (has_scaling_cost && is_lone)
|
|
TEST_FAIL("[ruleset] has a scaling_cost, but is also a lone/highlander ruleset.")
|
|
else if (!has_scaling_cost && !is_lone)
|
|
TEST_FAIL("[ruleset] has no scaling cost, but is also not a lone/highlander ruleset.")
|