diff --git a/test/test-main.cc b/test/test-main.cc index 9f5426ee..350044da 100644 --- a/test/test-main.cc +++ b/test/test-main.cc @@ -25,6 +25,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include #include #ifdef _WIN32 @@ -52,5 +53,10 @@ int main(int argc, char **argv) { _CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG); _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR); testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); + try { + return RUN_ALL_TESTS(); + } catch (...) { + // Catch all exceptions to make Coverity happy. + } + return EXIT_FAILURE; }