gtest: Added Google Test

Added Google Test for unit testing.  Currently NOT required by UPM
CMake.

    * Added a test fixture for the utilities library.
    * Fixed bug in delay methods provided by utilities library.

Signed-off-by: Noel Eck <noel.eck@intel.com>
This commit is contained in:
Noel Eck
2018-03-02 11:45:15 -08:00
parent c54d6de054
commit 92b0919f56
4 changed files with 94 additions and 6 deletions

12
tests/unit/CMakeLists.txt Normal file
View File

@ -0,0 +1,12 @@
# For now, Google Test is NOT required */
find_package(GTest)
# If not found, print a status message and return
if(NOT GTEST_FOUND)
message(STATUS "Install Google Test to enable additional unit testing")
return ()
endif()
add_executable(utilities_tests utilities/utilities_tests.cxx)
target_link_libraries(utilities_tests utilities GTest::GTest GTest::Main)
gtest_add_tests(utilities_tests "" AUTO)