From 74579fbadf0f89154cba5d9157a57f59fcda8f70 Mon Sep 17 00:00:00 2001 From: Mattes D Date: Mon, 26 Aug 2019 21:38:34 +0200 Subject: Improved testing framework. (#4376) --- tests/BlockTypeRegistry/BlockStateTest.cpp | 39 ++++-------------------------- 1 file changed, 5 insertions(+), 34 deletions(-) (limited to 'tests/BlockTypeRegistry/BlockStateTest.cpp') diff --git a/tests/BlockTypeRegistry/BlockStateTest.cpp b/tests/BlockTypeRegistry/BlockStateTest.cpp index d3ce92455..57317cbdf 100644 --- a/tests/BlockTypeRegistry/BlockStateTest.cpp +++ b/tests/BlockTypeRegistry/BlockStateTest.cpp @@ -109,37 +109,8 @@ static void testReplacing() -int main() -{ - LOGD("BlockStateTest started"); - - try - { - testStaticCreation(); - testDynamicCreation(); - testReplacing(); - } - catch (const TestException & exc) - { - LOGERROR("BlockStateTest has failed explicitly: %s", exc.mMessage.c_str()); - return 1; - } - catch (const std::runtime_error & exc) - { - LOGERROR("BlockStateTest has failed, an unhandled exception was thrown: %s", exc.what()); - return 1; - } - catch (...) - { - LOGERROR("BlockStateTest has failed, an unknown exception was thrown."); - return 1; - } - - LOGD("BlockStateTest finished"); - - return 0; -} - - - - +IMPLEMENT_TEST_MAIN("BlockStateTest", + testStaticCreation(); + testDynamicCreation(); + testReplacing(); +) -- cgit v1.2.3