From 5f342aa0154e59503fbb22e46ac95ef655aaad1a Mon Sep 17 00:00:00 2001 From: est31 Date: Mon, 26 Oct 2015 04:13:27 +0100 Subject: Remove some abort() calls abort() doesn't benefit from the high level abstractions from FATAL_ERROR. --- src/unittest/test.cpp | 5 ++--- src/unittest/test.h | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'src/unittest') diff --git a/src/unittest/test.cpp b/src/unittest/test.cpp index 1f3b31017..41ccf0d2d 100644 --- a/src/unittest/test.cpp +++ b/src/unittest/test.cpp @@ -215,7 +215,7 @@ void TestGameDef::defineSomeNodes() //// run_tests //// -void run_tests() +bool run_tests() { DSTACK(FUNCTION_NAME); @@ -253,8 +253,7 @@ void run_tests() << "++++++++++++++++++++++++++++++++++++++++" << "++++++++++++++++++++++++++++++++++++++++" << std::endl; - if (num_modules_failed) - abort(); + return num_modules_failed; } //// diff --git a/src/unittest/test.h b/src/unittest/test.h index f6c4711a5..e60e657cc 100644 --- a/src/unittest/test.h +++ b/src/unittest/test.h @@ -142,6 +142,6 @@ extern content_t t_CONTENT_WATER; extern content_t t_CONTENT_LAVA; extern content_t t_CONTENT_BRICK; -void run_tests(); +bool run_tests(); #endif -- cgit v1.2.3