Commit d504c06c authored by JINMEI Tatuya's avatar JINMEI Tatuya
Browse files

[2332] use EXPECT_DEATH_IF_SUPPORTED instead of ifdef.

avoiding ifdef is generally better, and _IF_SUPPORTED seems to have been
supported since googletest 1.4 and should be commonly available for us.
parent d3983e1e
......@@ -137,18 +137,16 @@ signalAndWait(CondVar* condvar, Mutex* mutex) {
TEST_F(CondVarTest, bad) {
// We'll destroy a CondVar object while the thread is still waiting
// on it. This will trigger an assertion failure.
CondVar cond;
Mutex::Locker locker(mutex_);
Thread t(boost::bind(&signalAndWait, &cond, &mutex_));
}, "");
TEST_F(CondVarTest, badWait) {
// In our implementation, wait() requires acquiring the lock beforehand.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment