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

Unified Diff: snapshot/mac/mach_o_image_reader_test.cc

Issue 700383007: Use implicit_cast<> instead of static_cast<> whenever possible (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Created 6 years, 1 month 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
Index: snapshot/mac/mach_o_image_reader_test.cc
diff --git a/snapshot/mac/mach_o_image_reader_test.cc b/snapshot/mac/mach_o_image_reader_test.cc
index 3412aabd6b5fee4d46e1e03dd96f26e142354f52..23510df4add248e1f89b010b58b9bf1233e56d12 100644
--- a/snapshot/mac/mach_o_image_reader_test.cc
+++ b/snapshot/mac/mach_o_image_reader_test.cc
@@ -510,7 +510,7 @@ TEST(MachOImageReader, Self_MainExecutable) {
ASSERT_TRUE(image_reader.Initialize(
&process_reader, mh_execute_header_address, "executable"));
- EXPECT_EQ(static_cast<uint32_t>(MH_EXECUTE), image_reader.FileType());
+ EXPECT_EQ(implicit_cast<uint32_t>(MH_EXECUTE), image_reader.FileType());
// The main executable has image index 0.
intptr_t image_slide = _dyld_get_image_vmaddr_slide(0);
@@ -556,7 +556,7 @@ TEST(MachOImageReader, Self_DyldImages) {
uint32_t file_type = image_reader.FileType();
if (index == 0) {
- EXPECT_EQ(static_cast<uint32_t>(MH_EXECUTE), file_type);
+ EXPECT_EQ(implicit_cast<uint32_t>(MH_EXECUTE), file_type);
} else {
EXPECT_TRUE(file_type == MH_DYLIB || file_type == MH_BUNDLE);
}
@@ -588,7 +588,7 @@ TEST(MachOImageReader, Self_DyldImages) {
ASSERT_TRUE(
image_reader.Initialize(&process_reader, image_address, "dyld"));
- EXPECT_EQ(static_cast<uint32_t>(MH_DYLINKER), image_reader.FileType());
+ EXPECT_EQ(implicit_cast<uint32_t>(MH_DYLINKER), image_reader.FileType());
// There’s no good API to get dyld’s slide, so don’t bother checking it.
ASSERT_NO_FATAL_FAILURE(ExpectMachImage(

Powered by Google App Engine
This is Rietveld 408576698