DescriptionUse EXPECT_FALSE instead of EXPECT_EQ for comparing false
Using EXPECT_EQ(false, condition_expr) assertion gets the following error with gcc 4.8.x toolchain on linux
when building unit test:
error: converting ‘false’ to pointer type for argument 1 of ‘char testing::
internal::IsNullLiteralHelper(testing::internal::Secret*)’ [-Werror=conversion-null]
It is a mysterious problem occurred in gtest. Only EXPECT_EQ(false, condition_expr) cause the compile error, while EXPECT_EQ(true, condition_expr) can work well.
BUG=139326
TBR=rkc@chromium.org
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=289586
Patch Set 1 #
Messages
Total messages: 6 (0 generated)
|