Fix folly conversions for Clang with GCC5's libstdc++
[folly.git] / folly / test / SafeAssertTest.cpp
index 52069255ca5c8c9ded6b58aa2c5c74ef87e78f51..bfaa3dd6a0da1ee93f421db345a6234acc2158f7 100644 (file)
@@ -24,7 +24,7 @@
 using namespace folly;
 
 void fail() {
-  FOLLY_SAFE_CHECK(0, "hello");
+  FOLLY_SAFE_CHECK(0 + 0, "hello");
 }
 
 void succeed() {
@@ -33,5 +33,6 @@ void succeed() {
 
 TEST(SafeAssert, AssertionFailure) {
   succeed();
-  EXPECT_DEATH(fail(), ".*Assertion failure:.*hello.*");
+  EXPECT_DEATH(fail(), "Assertion failure: 0 \\+ 0");
+  EXPECT_DEATH(fail(), "Message: hello");
 }