From: gichan-jang Date: Tue, 11 Feb 2020 02:31:27 +0000 (+0900) Subject: Fix/Coverity/1123652/1123668 : Handle thrown exception X-Git-Tag: submit/tizen/20200212.101153~9 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f5fcf4be3a70761bcafd949a6e60859e7456d88b;p=platform%2Fupstream%2Fnnstreamer.git Fix/Coverity/1123652/1123668 : Handle thrown exception Fix to catch exception from GTest Coverity CID : 1123652, 1123668 Signed-off-by: gichan-jang --- diff --git a/tests/tizen_capi/unittest_tizen_capi.cc b/tests/tizen_capi/unittest_tizen_capi.cc index be4b5d8..5b2a6f8 100644 --- a/tests/tizen_capi/unittest_tizen_capi.cc +++ b/tests/tizen_capi/unittest_tizen_capi.cc @@ -3734,15 +3734,23 @@ TEST (nnstreamer_capi_singleshot, set_input_info_success_02) int main (int argc, char **argv) { - int result; + int result = -1; - testing::InitGoogleTest (&argc, argv); + try { + testing::InitGoogleTest (&argc, argv); + } catch (...) { + g_warning ("catch 'testing::internal::::ClassUniqueToAlwaysTrue'"); + } /* ignore tizen feature status while running the testcases */ set_feature_state (1); - result = RUN_ALL_TESTS (); - + try { + result = RUN_ALL_TESTS (); + } catch (...) { + g_warning ("catch `testing::internal::GoogleTestFailureException`"); + } + set_feature_state (-1); return result;