mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 12:41:09 +01:00
Security Level Datums (#67949)
This commit is contained in:
@@ -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]!")
|
||||
Reference in New Issue
Block a user