Commit 6bc33db2 authored by Eric Niebler's avatar Eric Niebler Committed by Facebook Github Bot 9

Make Synchronized tests work with gtest-1.7

Summary: Gtest-1.7's ASSERT macros don't work with types with explicit conversions to bool, so do the cast for it.

Reviewed By: yfeldblum

Differential Revision: D3570782

fbshipit-source-id: 885a1022675e63afca00219c5b9de3791742207f
parent d0a6ecc6
...@@ -598,7 +598,7 @@ void testTimed() { ...@@ -598,7 +598,7 @@ void testTimed() {
// Make sure we can lock with various timeout duration units // Make sure we can lock with various timeout duration units
{ {
auto lv = v.contextualLock(std::chrono::milliseconds(5)); auto lv = v.contextualLock(std::chrono::milliseconds(5));
EXPECT_TRUE(lv); EXPECT_TRUE(bool(lv));
EXPECT_FALSE(lv.isNull()); EXPECT_FALSE(lv.isNull());
auto lv2 = v.contextualLock(std::chrono::microseconds(5)); auto lv2 = v.contextualLock(std::chrono::microseconds(5));
// We may or may not acquire lv2 successfully, depending on whether // We may or may not acquire lv2 successfully, depending on whether
...@@ -606,7 +606,7 @@ void testTimed() { ...@@ -606,7 +606,7 @@ void testTimed() {
} }
{ {
auto lv = v.contextualLock(std::chrono::seconds(1)); auto lv = v.contextualLock(std::chrono::seconds(1));
EXPECT_TRUE(lv); EXPECT_TRUE(bool(lv));
} }
} }
......
Markdown is supported
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