MCPcopy Create free account
hub / github.com/BVLC/caffe / DeathTestThreadWarning

Function DeathTestThreadWarning

src/gtest/gtest-all.cpp:6375–6384  ·  view source on GitHub ↗

Generates a textual failure message when a death test finds more than one thread running, or cannot determine the number of threads, prior to executing the given statement. It is the responsibility of the caller not to pass a thread_count of 1.

Source from the content-addressed store, hash-verified

6373// to executing the given statement. It is the responsibility of the
6374// caller not to pass a thread_count of 1.
6375static String DeathTestThreadWarning(size_t thread_count) {
6376 Message msg;
6377 msg << "Death tests use fork(), which is unsafe particularly"
6378 << " in a threaded context. For this test, " << GTEST_NAME_ << " ";
6379 if (thread_count == 0)
6380 msg << "couldn't detect the number of threads.";
6381 else
6382 msg << "detected " << thread_count << " threads.";
6383 return msg.GetString();
6384}
6385# endif // !GTEST_OS_WINDOWS
6386
6387// Flag characters for reporting a death test that did not die.

Callers 1

AssumeRoleMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected