mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-22 12:29:46 +01:00
Converts unit testing checks into #ifdef and #ifndef.
As per Mloc's comment in #11917.
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user