Merge pull request #5155 from ligfx/expecttruefalse
UnitTests: use EXPECT_TRUE/EXPECT_FALSE (fixes warnings)
This commit is contained in:
commit
e05b6cf3f4
|
@ -11,8 +11,8 @@ TEST(BitSet, Basics)
|
||||||
BitSet32 bs;
|
BitSet32 bs;
|
||||||
BitSet64 bs2(1);
|
BitSet64 bs2(1);
|
||||||
BitSet64 bs3(2);
|
BitSet64 bs3(2);
|
||||||
EXPECT_EQ(true, !!bs2);
|
EXPECT_TRUE(!!bs2);
|
||||||
EXPECT_EQ(false, !!bs);
|
EXPECT_FALSE(!!bs);
|
||||||
EXPECT_EQ(bs2, bs2);
|
EXPECT_EQ(bs2, bs2);
|
||||||
EXPECT_NE(bs2, bs3);
|
EXPECT_NE(bs2, bs3);
|
||||||
EXPECT_EQ(BitSet32(0xfff), BitSet32::AllTrue(12));
|
EXPECT_EQ(BitSet32(0xfff), BitSet32::AllTrue(12));
|
||||||
|
@ -23,8 +23,8 @@ TEST(BitSet, BitGetSet)
|
||||||
{
|
{
|
||||||
BitSet32 bs;
|
BitSet32 bs;
|
||||||
bs[3] = bs[8] = bs[11] = true;
|
bs[3] = bs[8] = bs[11] = true;
|
||||||
EXPECT_EQ(true, bs[3]);
|
EXPECT_TRUE(bs[3]);
|
||||||
EXPECT_EQ(false, bs[4]);
|
EXPECT_FALSE(bs[4]);
|
||||||
EXPECT_EQ((u32)((1 << 3) | (1 << 8) | (1 << 11)), bs.m_val);
|
EXPECT_EQ((u32)((1 << 3) | (1 << 8) | (1 << 11)), bs.m_val);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,24 +19,24 @@ TEST(StringUtil, JoinStrings)
|
||||||
|
|
||||||
TEST(StringUtil, StringBeginsWith)
|
TEST(StringUtil, StringBeginsWith)
|
||||||
{
|
{
|
||||||
EXPECT_EQ(true, StringBeginsWith("abc", "a"));
|
EXPECT_TRUE(StringBeginsWith("abc", "a"));
|
||||||
EXPECT_EQ(false, StringBeginsWith("abc", "b"));
|
EXPECT_FALSE(StringBeginsWith("abc", "b"));
|
||||||
EXPECT_EQ(true, StringBeginsWith("abc", "ab"));
|
EXPECT_TRUE(StringBeginsWith("abc", "ab"));
|
||||||
EXPECT_EQ(false, StringBeginsWith("a", "ab"));
|
EXPECT_FALSE(StringBeginsWith("a", "ab"));
|
||||||
EXPECT_EQ(false, StringBeginsWith("", "a"));
|
EXPECT_FALSE(StringBeginsWith("", "a"));
|
||||||
EXPECT_EQ(false, StringBeginsWith("", "ab"));
|
EXPECT_FALSE(StringBeginsWith("", "ab"));
|
||||||
EXPECT_EQ(true, StringBeginsWith("abc", ""));
|
EXPECT_TRUE(StringBeginsWith("abc", ""));
|
||||||
EXPECT_EQ(true, StringBeginsWith("", ""));
|
EXPECT_TRUE(StringBeginsWith("", ""));
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(StringUtil, StringEndsWith)
|
TEST(StringUtil, StringEndsWith)
|
||||||
{
|
{
|
||||||
EXPECT_EQ(true, StringEndsWith("abc", "c"));
|
EXPECT_TRUE(StringEndsWith("abc", "c"));
|
||||||
EXPECT_EQ(false, StringEndsWith("abc", "b"));
|
EXPECT_FALSE(StringEndsWith("abc", "b"));
|
||||||
EXPECT_EQ(true, StringEndsWith("abc", "bc"));
|
EXPECT_TRUE(StringEndsWith("abc", "bc"));
|
||||||
EXPECT_EQ(false, StringEndsWith("a", "ab"));
|
EXPECT_FALSE(StringEndsWith("a", "ab"));
|
||||||
EXPECT_EQ(false, StringEndsWith("", "a"));
|
EXPECT_FALSE(StringEndsWith("", "a"));
|
||||||
EXPECT_EQ(false, StringEndsWith("", "ab"));
|
EXPECT_FALSE(StringEndsWith("", "ab"));
|
||||||
EXPECT_EQ(true, StringEndsWith("abc", ""));
|
EXPECT_TRUE(StringEndsWith("abc", ""));
|
||||||
EXPECT_EQ(true, StringEndsWith("", ""));
|
EXPECT_TRUE(StringEndsWith("", ""));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue