From 6382911b1e47509c836748cbba9063d14eefed24 Mon Sep 17 00:00:00 2001 From: Kostiantyn Grygoriev Date: Tue, 28 Jan 2020 20:53:00 +0200 Subject: Update malformed message's criterias according the documentation (#2516) * Update malformed message's criterias according the documentation * Change UT according new rules * Unify logger's message * fixup! Update malformed message's criterias according the documentation * Fix build with ENABLE_LOG_OFF * fixup! Fix build with ENABLE_LOG_OFF * Add short condition for variable and fix build with Enable_log off * fixup! Add short condition for variable and fix build with Enable_log off Co-authored-by: Ira Lytvynenko (GitHub) Co-authored-by: Yevhenii Dementieiev (GitHub) <57259850+ydementieiev@users.noreply.github.com> --- src/components/protocol_handler/test/protocol_header_validator_test.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/components/protocol_handler/test/protocol_header_validator_test.cc') diff --git a/src/components/protocol_handler/test/protocol_header_validator_test.cc b/src/components/protocol_handler/test/protocol_header_validator_test.cc index e69e44dbac..ee48d2eb3d 100644 --- a/src/components/protocol_handler/test/protocol_header_validator_test.cc +++ b/src/components/protocol_handler/test/protocol_header_validator_test.cc @@ -491,8 +491,10 @@ TEST_F(ProtocolHeaderValidatorTest, Malformed_MessageID) { message_header.frameType = FRAME_TYPE_FIRST; message_header.version = PROTOCOL_VERSION_1; + message_header.dataSize = FIRST_FRAME_DATA_SIZE; EXPECT_EQ(RESULT_OK, header_validator.validate(message_header)); + message_header.dataSize = 0u; message_header.version = PROTOCOL_VERSION_2; EXPECT_EQ(RESULT_FAIL, header_validator.validate(message_header)); message_header.version = PROTOCOL_VERSION_3; -- cgit v1.2.1