diff options
author | Mattes D <github@xoft.cz> | 2019-08-26 21:38:34 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-26 21:38:34 +0200 |
commit | 74579fbadf0f89154cba5d9157a57f59fcda8f70 (patch) | |
tree | 2aca1ce5d8e41e91adcfe25dfb4bb51369fb865e /tests/BlockTypeRegistry | |
parent | Added BlockState implementation for 1.13 support. (diff) | |
download | cuberite-74579fbadf0f89154cba5d9157a57f59fcda8f70.tar cuberite-74579fbadf0f89154cba5d9157a57f59fcda8f70.tar.gz cuberite-74579fbadf0f89154cba5d9157a57f59fcda8f70.tar.bz2 cuberite-74579fbadf0f89154cba5d9157a57f59fcda8f70.tar.lz cuberite-74579fbadf0f89154cba5d9157a57f59fcda8f70.tar.xz cuberite-74579fbadf0f89154cba5d9157a57f59fcda8f70.tar.zst cuberite-74579fbadf0f89154cba5d9157a57f59fcda8f70.zip |
Diffstat (limited to 'tests/BlockTypeRegistry')
-rw-r--r-- | tests/BlockTypeRegistry/BlockStateTest.cpp | 39 | ||||
-rw-r--r-- | tests/BlockTypeRegistry/BlockTypeRegistryTest.cpp | 30 |
2 files changed, 8 insertions, 61 deletions
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(); +) diff --git a/tests/BlockTypeRegistry/BlockTypeRegistryTest.cpp b/tests/BlockTypeRegistry/BlockTypeRegistryTest.cpp index 3479e55d7..6616dfdc0 100644 --- a/tests/BlockTypeRegistry/BlockTypeRegistryTest.cpp +++ b/tests/BlockTypeRegistry/BlockTypeRegistryTest.cpp @@ -236,30 +236,6 @@ static void testBlockTypeRegistry() -int main() -{ - LOGD("BlockTypeRegistryTest started"); - - try - { - testBlockTypeRegistry(); - } - catch (const TestException & exc) - { - LOGERROR("BlockTypeRegistryTest has failed, an unhandled exception was thrown: %s", exc.mMessage.c_str()); - return 1; - } - catch (...) - { - LOGERROR("BlockTypeRegistryTest has failed, an unhandled exception was thrown."); - return 1; - } - - LOGD("BlockTypeRegistryTest finished"); - - return 0; -} - - - - +IMPLEMENT_TEST_MAIN("BlockTypeRegistryTest", + testBlockTypeRegistry(); +) |