There are two ways we can create a unit test cases using google test framework
1. Unit test case with int main: Here we need to link libgtest.a library or ${GTEST_LIBRARIES} in cmake
2 Unit test case without int main: Here we need to link libgtest_main.a library or ${GTEST_MAIN_LIBRARIES} in cmake
When libgtest_main.a is linked, then int main is generated automatically during compilation process
#cpp #programming #googletest #gtest #development #developers
Ещё видео!