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

Unified Diff: util/mach/mach_message_server_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: util/mach/mach_message_server_test.cc
diff --git a/util/mach/mach_message_server_test.cc b/util/mach/mach_message_server_test.cc
index b4862ec420c601c55ba375ad0ccf05eaa4589091..7cfa9bb42f6be93d0c45714579445cf8ba575e5c 100644
--- a/util/mach/mach_message_server_test.cc
+++ b/util/mach/mach_message_server_test.cc
@@ -224,10 +224,10 @@ class TestMachMessageServer : public MachMessageServer::Interface,
EXPECT_EQ(1u, request->body.msgh_descriptor_count);
EXPECT_NE(kMachPortNull, request->port_descriptor.name);
parent_complex_message_port_ = request->port_descriptor.name;
- EXPECT_EQ(static_cast<mach_msg_type_name_t>(MACH_MSG_TYPE_MOVE_SEND),
+ EXPECT_EQ(implicit_cast<mach_msg_type_name_t>(MACH_MSG_TYPE_MOVE_SEND),
request->port_descriptor.disposition);
EXPECT_EQ(
- static_cast<mach_msg_descriptor_type_t>(MACH_MSG_PORT_DESCRIPTOR),
+ implicit_cast<mach_msg_descriptor_type_t>(MACH_MSG_PORT_DESCRIPTOR),
request->port_descriptor.type);
} else {
EXPECT_EQ(0u, request->body.msgh_descriptor_count);
@@ -252,7 +252,7 @@ class TestMachMessageServer : public MachMessageServer::Interface,
trailer = &request->trailer;
}
- EXPECT_EQ(static_cast<mach_msg_trailer_type_t>(MACH_MSG_TRAILER_FORMAT_0),
+ EXPECT_EQ(implicit_cast<mach_msg_trailer_type_t>(MACH_MSG_TRAILER_FORMAT_0),
trailer->msgh_trailer_type);
EXPECT_EQ(MACH_MSG_TRAILER_MINIMUM_SIZE, trailer->msgh_trailer_size);
@@ -525,7 +525,7 @@ class TestMachMessageServer : public MachMessageServer::Interface,
MACH_PORT_NULL);
ASSERT_EQ(MACH_MSG_SUCCESS, kr) << MachErrorMessage(kr, "mach_msg");
- ASSERT_EQ(static_cast<mach_msg_bits_t>(
+ ASSERT_EQ(implicit_cast<mach_msg_bits_t>(
MACH_MSGH_BITS(0, MACH_MSG_TYPE_MOVE_SEND)), reply.Head.msgh_bits);
ASSERT_EQ(sizeof(ReplyMessage), reply.Head.msgh_size);
ASSERT_EQ(kMachPortNull, reply.Head.msgh_remote_port);
@@ -534,7 +534,7 @@ class TestMachMessageServer : public MachMessageServer::Interface,
ASSERT_EQ(0, memcmp(&reply.NDR, &NDR_record, sizeof(NDR_record)));
ASSERT_EQ(options_.server_mig_retcode, reply.RetCode);
ASSERT_EQ(replies_, reply.number);
- ASSERT_EQ(static_cast<mach_msg_trailer_type_t>(MACH_MSG_TRAILER_FORMAT_0),
+ ASSERT_EQ(implicit_cast<mach_msg_trailer_type_t>(MACH_MSG_TRAILER_FORMAT_0),
reply.trailer.msgh_trailer_type);
ASSERT_EQ(MACH_MSG_TRAILER_MINIMUM_SIZE, reply.trailer.msgh_trailer_size);

Powered by Google App Engine
This is Rietveld 408576698