Unit testing (#18329)

* Unit testing

* Fixes
This commit is contained in:
DamianX
2018-05-31 13:32:18 +02:00
committed by jknpj
parent c10e0b89e5
commit 191b694b95
13 changed files with 286 additions and 56 deletions

View File

@@ -101,7 +101,8 @@
desclines += " (This error will now be silenced for [configured_error_silence_time / 600] minutes)"
// Now to actually output the error info...
world.log << "\[[time_stamp()]] Runtime in [e.file],[e.line]: [e]"
var/main_line = "\[[time_stamp()]] Runtime in [e.file],[e.line]: [e]"
world.log << main_line
for (var/line in desclines)
world.log << line
@@ -109,4 +110,9 @@
if (global.error_cache)
global.error_cache.log_error(e, desclines)
#ifdef UNIT_TESTS
if(global.current_test)
global.current_test.fail("[main_line]\n[desclines.Join("\n")]")
#endif
#endif