Commit c752b6d4 authored by Victor Zverovich's avatar Victor Zverovich

Merge pull request #78 from amorozov/issue/76

sign-compare warnings fixes
parents 755ecb03 4d3126c5
...@@ -264,7 +264,7 @@ void check_move_buffer(const char *str, ...@@ -264,7 +264,7 @@ void check_move_buffer(const char *str,
// Move shouldn't destroy the inline content of the first buffer. // Move shouldn't destroy the inline content of the first buffer.
EXPECT_EQ(str, std::string(&buffer[0], buffer.size())); EXPECT_EQ(str, std::string(&buffer[0], buffer.size()));
EXPECT_EQ(str, std::string(&buffer2[0], buffer2.size())); EXPECT_EQ(str, std::string(&buffer2[0], buffer2.size()));
EXPECT_EQ(5, buffer2.capacity()); EXPECT_EQ(5u, buffer2.capacity());
// Move should transfer allocator. // Move should transfer allocator.
EXPECT_EQ(0, buffer.get_allocator().get()); EXPECT_EQ(0, buffer.get_allocator().get());
EXPECT_EQ(alloc, buffer2.get_allocator().get()); EXPECT_EQ(alloc, buffer2.get_allocator().get());
...@@ -297,7 +297,7 @@ void check_move_assign_buffer(const char *str, MemoryBuffer<char, 5> &buffer) { ...@@ -297,7 +297,7 @@ void check_move_assign_buffer(const char *str, MemoryBuffer<char, 5> &buffer) {
// Move shouldn't destroy the inline content of the first buffer. // Move shouldn't destroy the inline content of the first buffer.
EXPECT_EQ(str, std::string(&buffer[0], buffer.size())); EXPECT_EQ(str, std::string(&buffer[0], buffer.size()));
EXPECT_EQ(str, std::string(&buffer2[0], buffer2.size())); EXPECT_EQ(str, std::string(&buffer2[0], buffer2.size()));
EXPECT_EQ(5, buffer2.capacity()); EXPECT_EQ(5u, buffer2.capacity());
} }
TEST(MemoryBufferTest, MoveAssignment) { TEST(MemoryBufferTest, MoveAssignment) {
......
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