Change-Id: Ifbfa3fd48e57debb70a4f9f6e3954f46c29ecdd7
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
int main(int argc, char **argv)
{
- testing::InitGoogleTest(&argc, argv);
+ int ret = -1;
- return RUN_ALL_TESTS();
+ try {
+ testing::InitGoogleTest(&argc, argv);
+ } catch(...) {
+ std::cout << "Exception occurred." << std::endl;
+ }
+
+ try {
+ ret = RUN_ALL_TESTS();
+ } catch (const ::testing::internal::GoogleTestFailureException& e) {
+ ret = -1;
+ std::cout << "GoogleTestFailureException was thrown:" << e.what() << std::endl;
+ }
+
+ return ret;
}