Commit c7720104 authored by paul.lind's avatar paul.lind Committed by Commit bot

Fix a -Wsign-compare error under GCC 4.9.2.

BUG=

Review URL: https://codereview.chromium.org/1322693004

Cr-Commit-Position: refs/heads/master@{#30603}
parent ce751ccf
......@@ -16,7 +16,7 @@ TEST(AtomicNumber, Constructor) {
AtomicNumber<size_t> zero_size_t;
AtomicNumber<intptr_t> zero_intptr_t;
EXPECT_EQ(0, zero_int.Value());
EXPECT_EQ(0, zero_size_t.Value());
EXPECT_EQ(0U, zero_size_t.Value());
EXPECT_EQ(0, zero_intptr_t.Value());
}
......@@ -27,7 +27,7 @@ TEST(AtomicNumber, Value) {
AtomicNumber<int> b(-1);
EXPECT_EQ(-1, b.Value());
AtomicNumber<size_t> c(1);
EXPECT_EQ(1, c.Value());
EXPECT_EQ(1U, c.Value());
AtomicNumber<size_t> d(static_cast<size_t>(-1));
EXPECT_EQ(std::numeric_limits<size_t>::max(), d.Value());
}
......@@ -53,7 +53,7 @@ TEST(AtomicNumber, Increment) {
// Should work as decrement as well.
AtomicNumber<size_t> c(1);
c.Increment(-1);
EXPECT_EQ(0, c.Value());
EXPECT_EQ(0U, c.Value());
c.Increment(-1);
EXPECT_EQ(std::numeric_limits<size_t>::max(), c.Value());
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment