diff --git a/include/GUnit/GAssert.h b/include/GUnit/GAssert.h index 13ae2db..6f0743a 100644 --- a/include/GUnit/GAssert.h +++ b/include/GUnit/GAssert.h @@ -213,7 +213,7 @@ void prevent_commas(T&&) {} (::testing::detail::op{ \ ::testing::detail::info{__FILE__, __LINE__, #__VA_ARGS__, \ ::testing::TestPartResult::kNonFatalFailure}} \ - << __VA_ARGS__) + << (__VA_ARGS__)) #define EXPECT(...) \ GUNIT_PREVENT_COMMAS(__VA_ARGS__); \ @@ -223,14 +223,14 @@ void prevent_commas(T&&) {} if (::testing::detail::op{ \ ::testing::detail::info{__FILE__, __LINE__, #__VA_ARGS__, \ ::testing::TestPartResult::kFatalFailure}} \ - << __VA_ARGS__) \ + << (__VA_ARGS__)) \ void(::testing::detail::drop{}); \ else \ return ::testing::detail::ret_void{} == \ (::testing::detail::op{::testing::detail::info{ \ __FILE__, __LINE__, #__VA_ARGS__, \ ::testing::TestPartResult::kFatalFailure}} \ - << __VA_ARGS__) + << (__VA_ARGS__)) #define ASSERT(...) \ GUNIT_PREVENT_COMMAS(__VA_ARGS__); \ diff --git a/test/GAssert.cpp b/test/GAssert.cpp index 16ab0b4..2cdff3c 100644 --- a/test/GAssert.cpp +++ b/test/GAssert.cpp @@ -37,6 +37,8 @@ TEST(GAssert, ShouldSupportExpect) { EXPECT(not convertible{}); EXPECT(false == convertible{}); + + EXPECT(false or true); } TEST(GAssert, ShouldSupportASSERT) { @@ -69,4 +71,6 @@ TEST(GAssert, ShouldSupportASSERT) { ASSERT(convertible{}); ASSERT(false == not convertible{}); + + ASSERT(false or true); }