diff --git a/base/base_tests/exception_tests.cpp b/base/base_tests/exception_tests.cpp index 38dd9f20d4..8b1f9bb5b6 100644 --- a/base/base_tests/exception_tests.cpp +++ b/base/base_tests/exception_tests.cpp @@ -9,6 +9,7 @@ namespace int FuncDoesNotThrow() noexcept { return 1; } int FuncThrowsRootException() { throw RootException("RootException", "RootException"); } int FuncThrowsException() { throw std::exception(); } +int FuncThrowsRuntimeError() { throw std::runtime_error("runtime_error"); } int FuncThrowsNumber() { throw 1; }; int FuncDoesNotThrowArg(int) noexcept { return 1; } @@ -18,30 +19,30 @@ int FuncThrowsNumberArg(int) { throw 1; }; UNIT_TEST(ExceptionCatcher_FunctionsWithoutArgs) { - ExceptionCatcher("ExceptionCatcher_Smoke", FuncDoesNotThrow); - ExceptionCatcher("ExceptionCatcher_Smoke", FuncThrowsRootException); - ExceptionCatcher("ExceptionCatcher_Smoke", FuncThrowsException); - ExceptionCatcher("ExceptionCatcher_Smoke", FuncThrowsNumber); + ExceptionCatcher("Function without arg.", FuncDoesNotThrow); + ExceptionCatcher("Function without arg.", FuncThrowsRootException); + ExceptionCatcher("Function without arg.", FuncThrowsException); + ExceptionCatcher("Function without arg.", FuncThrowsRuntimeError); + ExceptionCatcher("Function without arg.", FuncThrowsNumber); } UNIT_TEST(ExceptionCatcher_Functions) { - ExceptionCatcher("ExceptionCatcher", FuncDoesNotThrowArg, 7); - ExceptionCatcher("ExceptionCatcher", FuncThrowsRootExceptionArg, 7); - ExceptionCatcher("ExceptionCatcher", FuncThrowsExceptionArg, 7); - ExceptionCatcher("ExceptionCatcher", FuncThrowsNumberArg, 7); + ExceptionCatcher("Function with arg.", FuncDoesNotThrowArg, 7); + ExceptionCatcher("Function with arg.", FuncThrowsRootExceptionArg, 7); + ExceptionCatcher("Function with arg.", FuncThrowsExceptionArg, 7); + ExceptionCatcher("Function with arg.", FuncThrowsNumberArg, 7); } UNIT_TEST(ExceptionCatcher_Lambdas) { ExceptionCatcher( - "ExceptionCatcher", [](int) { return 1; }, 7); + "Lambda", [](int) { return 1; }, 7); ExceptionCatcher( - "ExceptionCatcher", [](int) -> int { throw RootException("RootException", "RootException"); }, - 7); + "Lambda", [](int) -> int { throw RootException("RootException", "RootException"); }, 7); ExceptionCatcher( - "ExceptionCatcher", [](int) -> int { throw std::exception(); }, 7); + "Lambda", [](int) -> int { throw std::exception(); }, 7); ExceptionCatcher( - "ExceptionCatcher", [](int) -> int { throw 1; }, 7); + "Lambda", [](int) -> int { throw 1; }, 7); } } // namespace