Security Level Datums (#67949)

This commit is contained in:
Gandalf
2022-06-24 17:01:45 -07:00
committed by GitHub
parent 120ef3c94b
commit 110edaa153
25 changed files with 243 additions and 130 deletions
+1
View File
@@ -137,6 +137,7 @@
#include "screenshot_basic.dm"
#include "screenshot_humanoids.dm"
#include "security_officer_distribution.dm"
#include "security_levels.dm"
#include "serving_tray.dm"
#include "siunit.dm"
#include "slips.dm"
@@ -0,0 +1,16 @@
/**
* Security Level Unit Test
*
* This test is here to ensure there are no security levels with the same name or number level. Having the same name or number level will cause problems.
*/
/datum/unit_test/security_levels
/datum/unit_test/security_levels/Run()
var/list/comparison = subtypesof(/datum/security_level)
for(var/datum/security_level/iterating_level in comparison)
for(var/datum/security_level/iterating_level_check in comparison)
if(iterating_level == iterating_level_check) // If they are the same type, don't check
continue
TEST_ASSERT_NOTEQUAL(iterating_level.name, iterating_level_check.name, "Security level [iterating_level] has the same name as [iterating_level_check]!")
TEST_ASSERT_NOTEQUAL(iterating_level.number_level, iterating_level_check.number_level, "Security level [iterating_level] has the same level number as [iterating_level_check]!")