From 72be5848ce46b89f3de57d5e353f2d5c3769c2be Mon Sep 17 00:00:00 2001 From: Ladislas de Toldi Date: Fri, 13 Sep 2019 17:55:15 +0200 Subject: [PATCH 1/2] update googletest to v1.8.1 --- UNITTESTS/CMakeLists.txt | 4 ++-- UNITTESTS/googletest-CMakeLists.txt.in | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/UNITTESTS/CMakeLists.txt b/UNITTESTS/CMakeLists.txt index 926d13b8a4..9b395daaca 100644 --- a/UNITTESTS/CMakeLists.txt +++ b/UNITTESTS/CMakeLists.txt @@ -52,8 +52,8 @@ add_subdirectory(${CMAKE_BINARY_DIR}/googletest-src # dependencies automatically when using CMake 2.8.11 or # later. target_include_directories(gmock_main SYSTEM BEFORE INTERFACE - "${gtest_SOURCE_DIR}/include" - "${gmock_SOURCE_DIR}/include") + "$" + "$") #################### # TESTING diff --git a/UNITTESTS/googletest-CMakeLists.txt.in b/UNITTESTS/googletest-CMakeLists.txt.in index 9041496e1b..f4b4894a51 100644 --- a/UNITTESTS/googletest-CMakeLists.txt.in +++ b/UNITTESTS/googletest-CMakeLists.txt.in @@ -5,7 +5,7 @@ project(googletest-download NONE) include(ExternalProject) ExternalProject_Add(googletest GIT_REPOSITORY https://github.com/google/googletest.git - GIT_TAG 8bc11c040a1dcbe50c340b21d78175d152dd3837 + GIT_TAG release-1.8.1 SOURCE_DIR "${CMAKE_BINARY_DIR}/googletest-src" BINARY_DIR "${CMAKE_BINARY_DIR}/googletest-build" CONFIGURE_COMMAND "" From fa217c5bec5712474c29ef5cc9275f94c5656217 Mon Sep 17 00:00:00 2001 From: Ladislas de Toldi Date: Mon, 30 Sep 2019 09:47:44 +0200 Subject: [PATCH 2/2] Update README with Google Test version 1.8.1 --- UNITTESTS/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/UNITTESTS/README.md b/UNITTESTS/README.md index 1351c0250e..d45b3b1076 100644 --- a/UNITTESTS/README.md +++ b/UNITTESTS/README.md @@ -85,6 +85,8 @@ Mbed CLI supports unit tests through the `mbed test --unittests` command. For in A unit tests suite consists of one or more test cases. The test cases should cover all the functions in a class under test. All the external dependencies are stubbed including the other classes in the same module. Avoid stubbing header files. Finally, analyze code coverage to ensure all code is tested, and no dead code is found. +Unit tests are written using [Google Test v1.8.1](https://github.com/google/googletest/releases/tag/release-1.8.1). + Please see the [documentation for Google Test](https://github.com/google/googletest/blob/master/googletest/docs/primer.md) to learn how to write unit tests using its framework. See the [documentation for Google Mock](https://github.com/google/googletest/blob/master/googlemock/docs/Documentation.md) if you want to write and use C++ mock classes instead of stubs. #### Test suite configuration