Unit Tests now sets some config options if they aren't already set.

This commit is contained in:
ccomp5950
2015-12-31 13:08:05 -05:00
parent 9d9eee35ef
commit 4d24790c2e
2 changed files with 17 additions and 1 deletions
+11 -1
View File
@@ -22,9 +22,19 @@ datum/unit_test/proc/start_test()
fail("No test proc.")
datum/unit_test/proc/check_result()
fail("No check results")
fail("No check results proc")
return 1
proc/load_unit_test_changes()
if(config.generate_asteroid != 1)
log_unit_test("Overiding Configuration option for Asteroid Generation")
config.generate_asteroid = 1 // The default map requires it, the example config doesn't have this enabled.
proc/initialize_unit_tests()
log_unit_test("Initializing Unit Testing")
+6
View File
@@ -65,10 +65,16 @@ var/global/datum/global_init/init = new ()
. = ..()
#if !UNIT_TEST
sleep_offline = 1
#elseif
log_unit_test("Unit Tests Enabled. This will destroy the world when testing is complete.")
log_unit_test("If you did not intend to enable this please check code/__defines/unit_testing.dm")
load_unit_test_changes()
#endif
// Set up roundstart seed list.