I check the correct operation of my function
bool Core::IsMeta(void) { return mProc->GetCode(mPC)->Meta; }
using instructions
EXPECT_EQ(true,CC->IsMeta());
tests work fine, but two tests behave differently: the βtrueβ case compiles OK, the βfalseβ case presents a warning
In the file included in /..../build/gtest/src/gtest/include/gtest/gtest.h:1929:07, from /....cpp: 1: /....cpp: In function -membered virtual void ... :: TestBody (): /.../build/gtest/src/gtest/include/gtest/internal/gtest-internal.h:133:55: warning: converting 'false to pointer type for argument 1 of 'char testing :: internal :: IsNullLiteralHelper (testing :: internal :: Secret *) [-Wconversion-zero] (sizeof (:: testing :: internal :: IsNullLiteralHelper (x)) == 1) ^
Why does gtest want to convert 'false' to a pointer? And why not the "truth"? Did I miss something?
source share