Change unittest package name and improves code coverage
[platform/core/appfw/appcore-widget.git] / test / unit_tests / main.cc
1 // Copyright (c) 2020 Samsung Electronics Co., Ltd All Rights Reserved
2 // Use of this source code is governed by a apache 2.0 license that can be
3 // found in the LICENSE file.
4
5 #include <gtest/gtest.h>
6 #include <gmock/gmock.h>
7
8 int main(int argc, char** argv) {
9   int ret = -1;
10   try {
11     testing::InitGoogleTest(&argc, argv);
12   } catch(...) {/* LCOV_EXCL_LINE */
13     std::cout << "Exception occurred" << std::endl;/* LCOV_EXCL_LINE */
14   }
15
16   try {
17     ret = RUN_ALL_TESTS();
18   } catch (const ::testing::internal::GoogleTestFailureException& e) {/* LCOV_EXCL_LINE */
19     ret = -1;/* LCOV_EXCL_LINE */
20     std::cout << "GoogleTestFailureException was thrown:" << e.what()/* LCOV_EXCL_LINE */
21               << std::endl;/* LCOV_EXCL_LINE */
22   }
23
24   return ret;
25 }