Fix [-Werror=sign-compare] in autovector_test

This commit is contained in:
kailiu 2013-12-26 15:47:07 -08:00
parent 079a21ba99
commit 113a08c929

View File

@ -147,7 +147,8 @@ TEST(AutoVectorTest, Iterators) {
} }
pos = vec.begin(); pos = vec.begin();
for (size_t i = 0; i < vec.size(); i += 2) { typedef autovector<std::string>::difference_type diff_type;
for (diff_type i = 0; i < vec.size(); i += 2) {
// Cannot use ASSERT_EQ since that macro depends on iostream serialization // Cannot use ASSERT_EQ since that macro depends on iostream serialization
ASSERT_TRUE(pos + 2 - 2 == pos); ASSERT_TRUE(pos + 2 - 2 == pos);
pos += 2; pos += 2;