summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xunittest/device_haltests.cpp17
1 files changed, 15 insertions, 2 deletions
diff --git a/unittest/device_haltests.cpp b/unittest/device_haltests.cpp
index e45533b..71d189f 100755
--- a/unittest/device_haltests.cpp
+++ b/unittest/device_haltests.cpp
@@ -1104,7 +1104,20 @@ TEST_F(USBGADGETHalTest, DeinitP)
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;
}