how to write a normal std::thread in UT with Gtest
Jump to turn (8)
- 1how to write a normal std::thread in UT with Gtest
- 2/! @Function runnerCfgThread(); @Return void @Description Runner thread for conf
- 3error: ‘cfgthread’ was not declared in this scope 198 | EXPECTTRUE(cfgthread.joi
- 4std::thread cfgthread; is defined in sysConfig.h and it is included in our sysCo
- 5expect a value from a function in UT
- 6how we can integrate gcov in my UT
- 7how this can be add in my cmakelist
- 8################################################################################
- User
how to write a normal std::thread in UT with Gtest
- Assistant
To write a normal
std::threadunit test with Google Test (GTest), you can follow these steps:- Include the necessary headers for GTest and any other dependencies you need, such as
threadandchrono.
cpp#include <gtest/gtest.h> #include <thread> #include <chrono> - Include the necessary headers for GTest and any other dependencies you need, such as