Guarding tests against exit/death
I’m using googletest to test multi-threading code with std::thread
. In broken code, it often happens that a std::thread
is destroyed before the thread has joined, causing a program termination. Unfortunately, the testing framework does not catch this case and therefore stops execution. The test case is not marked as failed.