Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(52)

Unified Diff: base/allocator/allocator_unittests.cc

Issue 6300001: Clang: enable -Wbool-conversions and -Wunused-variables on Linux. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase, undo indent Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | base/message_loop_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/allocator/allocator_unittests.cc
diff --git a/base/allocator/allocator_unittests.cc b/base/allocator/allocator_unittests.cc
index b1aa9cbd3f2ac917efdb1e1ff7efaa78519602f8..d935cf9092f1d24fc6e2ad4afad4ba532182ffdd 100644
--- a/base/allocator/allocator_unittests.cc
+++ b/base/allocator/allocator_unittests.cc
@@ -313,9 +313,9 @@ static void TestOneNewWithoutExceptions(void* (*func)(size_t),
try {
void* rv = (*func)(kTooBig);
EXPECT_EQ(NULL, rv);
- EXPECT_EQ(false, should_throw) << "allocation should have thrown.";
+ EXPECT_FALSE(should_throw) << "allocation should have thrown.";
} catch(...) {
- EXPECT_EQ(true, should_throw) << "allocation threw unexpected exception.";
+ EXPECT_TRUE(should_throw) << "allocation threw unexpected exception.";
}
}
@@ -359,7 +359,7 @@ TEST(Allocators, Malloc) {
unsigned char* ptr = reinterpret_cast<unsigned char*>(malloc(size));
CheckAlignment(ptr, 2); // Should be 2 byte aligned
Fill(ptr, size);
- EXPECT_EQ(true, Valid(ptr, size));
+ EXPECT_TRUE(Valid(ptr, size));
free(ptr);
}
}
@@ -420,9 +420,9 @@ TEST(Allocators, Realloc2) {
Fill(src, src_size);
unsigned char* dst =
reinterpret_cast<unsigned char*>(realloc(src, dst_size));
- EXPECT_EQ(true, Valid(dst, min(src_size, dst_size)));
+ EXPECT_TRUE(Valid(dst, min(src_size, dst_size)));
Fill(dst, dst_size);
- EXPECT_EQ(true, Valid(dst, dst_size));
+ EXPECT_TRUE(Valid(dst, dst_size));
if (dst != NULL) free(dst);
}
}
@@ -468,13 +468,13 @@ TEST(Allocators, Recalloc) {
for (int dst_size = 0; dst_size >= 0; dst_size = NextSize(dst_size)) {
unsigned char* src =
reinterpret_cast<unsigned char*>(_recalloc(NULL, 1, src_size));
- EXPECT_EQ(true, IsZeroed(src, src_size));
+ EXPECT_TRUE(IsZeroed(src, src_size));
Fill(src, src_size);
unsigned char* dst =
reinterpret_cast<unsigned char*>(_recalloc(src, 1, dst_size));
- EXPECT_EQ(true, Valid(dst, min(src_size, dst_size)));
+ EXPECT_TRUE(Valid(dst, min(src_size, dst_size)));
Fill(dst, dst_size);
- EXPECT_EQ(true, Valid(dst, dst_size));
+ EXPECT_TRUE(Valid(dst, dst_size));
if (dst != NULL)
free(dst);
}
« no previous file with comments | « no previous file | base/message_loop_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698