Closed yfinkelstein closed 8 months ago
The problem is with return
under catch
and the bottom of the above. Just remove this return and it compiles
Looks like the return
comes from gtest FAIL()
.
This compiles and works as expected:
EXPECT(1 + 1 == 3, "my assert");
gtest macro chain:
FAIL() -> GTEST_FAIL()->GTEST_FATALFAILURE("Failed") -> return GTEST_MESSAGE_(message, ::testing::TestPartResult::kFatalFailure)
Ouh, this is because I was having this ASSERT outside of the gtest unit test code! It does work inside of unit test body. So, it's just not intended to be used like that. Just add a disclosure. Not a bug as such.
By missing headers in conan pckage is a real problem
Hello, thanks for opening this issue! The missing includes in the gtest header are a copy-paste mistake on my part, I’ll fix this asap.
Fixed on main, will do a 2.0.1 patch at some point soon
There are 2 issues in version 0.5.0:
tokenizer.hpp
andutils.hpp
included fromassert-gtest.hpp
are missing - they are not exported in conan packageASSERT(1 + 1 == 3, "my assert");
A more detailed info provided by clangd: