mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-28 23:51:17 +01:00
Unit Tests now sets some config options if they aren't already set.
This commit is contained in:
@@ -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")
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user