From: SooChan Lim Date: Thu, 15 Mar 2018 01:05:09 +0000 (+0900) Subject: utest: add error exception X-Git-Tag: accepted/tizen/unified/20180320.065900~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7d8bd6dc404cabdc458cf2c4b2f9ab96b13f2772;p=platform%2Fcore%2Fuifw%2Fwayland-tbm.git utest: add error exception Change-Id: I8223dbbd0be45cc7f0b3165a5543ee882dff6de1 --- diff --git a/utests/src/ut_main.cpp b/utests/src/ut_main.cpp index 02f2f0b..4112179 100644 --- a/utests/src/ut_main.cpp +++ b/utests/src/ut_main.cpp @@ -45,13 +45,21 @@ int main(int argc, char **argv) ::testing::InitGoogleTest(&argc, argv); ::testing::FLAGS_gtest_death_test_style = "fast"; } catch ( ... ) { + std::cout << "error while trying to init google tests.\n"; exit(EXIT_FAILURE); } - AllTestSuccess = RUN_ALL_TESTS(); + try { + AllTestSuccess = RUN_ALL_TESTS() == 0 ? true : false; + } catch (const ::testing::internal::GoogleTestFailureException & e) { + AllTestSuccess = false; + std::cout << "GoogleTestFailureException was thrown:" << e.what() << std::endl; + std::cout << "\n"; + } #ifdef TIZEN_TEST_GCOV __gcov_flush(); #endif + return AllTestSuccess; } \ No newline at end of file