summaryrefslogtreecommitdiff
path: root/src/components/protocol_handler/test/protocol_packet_test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/protocol_handler/test/protocol_packet_test.cc')
-rw-r--r--src/components/protocol_handler/test/protocol_packet_test.cc12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/components/protocol_handler/test/protocol_packet_test.cc b/src/components/protocol_handler/test/protocol_packet_test.cc
index 7819c4b5b0..71c7726243 100644
--- a/src/components/protocol_handler/test/protocol_packet_test.cc
+++ b/src/components/protocol_handler/test/protocol_packet_test.cc
@@ -125,7 +125,9 @@ TEST_F(ProtocolPacketTest, SerializePacketWithDiffServiceType) {
for (size_t i = 0; i < serv_types.size(); ++i) {
RawMessagePtr res =
GetRawMessage(PROTOCOL_VERSION_3, FRAME_TYPE_CONTROL, serv_types[i]);
- EXPECT_EQ(PROTOCOL_VERSION_3, res->protocol_version());
+ EXPECT_EQ(PROTOCOL_VERSION_3,
+ static_cast< ::protocol_handler::MajorProtocolVersion>(
+ res->protocol_version()));
EXPECT_EQ(serv_types[i], res->service_type());
EXPECT_EQ(PROTOCOL_HEADER_V2_SIZE, res->data_size());
}
@@ -146,7 +148,9 @@ TEST_F(ProtocolPacketTest, SerializePacketWithWrongServiceType) {
for (size_t i = 0; i < serv_types.size(); ++i) {
RawMessagePtr res =
GetRawMessage(PROTOCOL_VERSION_3, FRAME_TYPE_CONTROL, serv_types[i]);
- EXPECT_EQ(PROTOCOL_VERSION_3, res->protocol_version());
+ EXPECT_EQ(PROTOCOL_VERSION_3,
+ static_cast< ::protocol_handler::MajorProtocolVersion>(
+ res->protocol_version()));
EXPECT_EQ(kInvalidServiceType, res->service_type());
}
}
@@ -156,7 +160,9 @@ TEST_F(ProtocolPacketTest, SetPacketWithDiffFrameType) {
for (frame_type = FRAME_TYPE_CONTROL + 1; frame_type <= FRAME_TYPE_MAX_VALUE;
++frame_type) {
RawMessagePtr res = GetRawMessage(PROTOCOL_VERSION_3, frame_type, kControl);
- EXPECT_EQ(PROTOCOL_VERSION_3, res->protocol_version());
+ EXPECT_EQ(PROTOCOL_VERSION_3,
+ static_cast< ::protocol_handler::MajorProtocolVersion>(
+ res->protocol_version()));
EXPECT_EQ(kControl, res->service_type());
}
}