Tests: fix signed/unsigned comparison warning
This commit is contained in:
parent
fa3cc05753
commit
46becfc06b
|
@ -11,8 +11,8 @@ TEST(CommonFuncs, ArraySizeMacro)
|
|||
char test[4];
|
||||
u32 test2[42];
|
||||
|
||||
EXPECT_EQ(4, ArraySize(test));
|
||||
EXPECT_EQ(42, ArraySize(test2));
|
||||
EXPECT_EQ(4u, ArraySize(test));
|
||||
EXPECT_EQ(42u, ArraySize(test2));
|
||||
}
|
||||
|
||||
TEST(CommonFuncs, RoundUpPow2Macro)
|
||||
|
@ -41,6 +41,6 @@ TEST(CommonFuncs, Swap)
|
|||
{
|
||||
EXPECT_EQ(0xf0, Common::swap8(0xf0));
|
||||
EXPECT_EQ(0x1234, Common::swap16(0x3412));
|
||||
EXPECT_EQ(0x12345678, Common::swap32(0x78563412));
|
||||
EXPECT_EQ(0x12345678u, Common::swap32(0x78563412));
|
||||
EXPECT_EQ(0x123456789abcdef0ull, Common::swap64(0xf0debc9a78563412ull));
|
||||
}
|
||||
|
|
|
@ -11,22 +11,22 @@ TEST(FifoQueue, Simple)
|
|||
{
|
||||
Common::FifoQueue<u32> q;
|
||||
|
||||
EXPECT_EQ(0, q.Size());
|
||||
EXPECT_EQ(0u, q.Size());
|
||||
EXPECT_TRUE(q.Empty());
|
||||
|
||||
q.Push(1);
|
||||
EXPECT_EQ(1, q.Size());
|
||||
EXPECT_EQ(1u, q.Size());
|
||||
EXPECT_FALSE(q.Empty());
|
||||
|
||||
u32 v; q.Pop(v);
|
||||
EXPECT_EQ(1, v);
|
||||
EXPECT_EQ(0, q.Size());
|
||||
EXPECT_EQ(1u, v);
|
||||
EXPECT_EQ(0u, q.Size());
|
||||
EXPECT_TRUE(q.Empty());
|
||||
|
||||
// Test the FIFO order.
|
||||
for (u32 i = 0; i < 1000; ++i)
|
||||
q.Push(i);
|
||||
EXPECT_EQ(1000, q.Size());
|
||||
EXPECT_EQ(1000u, q.Size());
|
||||
for (u32 i = 0; i < 1000; ++i)
|
||||
{
|
||||
u32 v2; q.Pop(v2);
|
||||
|
|
|
@ -10,7 +10,7 @@ TEST(FixedSizeQueue, Simple)
|
|||
{
|
||||
FixedSizeQueue<int, 5> q;
|
||||
|
||||
EXPECT_EQ(0, q.size());
|
||||
EXPECT_EQ(0u, q.size());
|
||||
|
||||
q.push(0);
|
||||
q.push(1);
|
||||
|
@ -29,5 +29,5 @@ TEST(FixedSizeQueue, Simple)
|
|||
EXPECT_EQ(1003, q.pop_front());
|
||||
EXPECT_EQ(1004, q.pop_front());
|
||||
|
||||
EXPECT_EQ(0, q.size());
|
||||
EXPECT_EQ(0u, q.size());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue