Converts unit testing checks into #ifdef and #ifndef.

As per Mloc's comment in #11917.
This commit is contained in:
PsiOmegaDelta
2016-01-06 22:09:33 +01:00
parent c4ea60ea2f
commit a4d9220bfa
3 changed files with 5 additions and 16 deletions
-1
View File
@@ -11,7 +11,6 @@
// END_PREFERENCES
// BEGIN_INCLUDE
#include "code\_macros.dm"
#include "code\_unit_testing.dm"
#include "code\global.dm"
#include "code\hub.dm"
#include "code\names.dm"
-10
View File
@@ -1,10 +0,0 @@
/*
*
* This file is used by Travis to indicate that Unit Tests are to be ran.
* Do not add anything but the UNIT_TEST definition here as it will be overwritten by Travis when running tests.
*
*
* Should you wish to edit set UNIT_TEST to 1 like so:
* #define UNIT_TEST 1
*/
#define UNIT_TEST 0
+5 -5
View File
@@ -39,7 +39,7 @@ var/global/datum/global_init/init = new ()
#define RECOMMENDED_VERSION 508
#define RECOMMENDED_VERSION 509
/world/New()
//logs
var/date_string = time2text(world.realtime, "YYYY/MM-Month/DD-Day")
@@ -69,11 +69,11 @@ var/global/datum/global_init/init = new ()
. = ..()
#if !UNIT_TEST
#ifndef UNIT_TEST
sleep_offline = 1
#elseif
#else
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")
@@ -115,10 +115,10 @@ var/global/datum/global_init/init = new ()
processScheduler.deferSetupFor(/datum/controller/process/ticker)
processScheduler.setup()
master_controller.setup()
#if UNIT_TEST
#ifdef UNIT_TEST
initialize_unit_tests()
#endif
spawn(3000) //so we aren't adding to the round-start lag