Skip to content

Commit

Permalink
Debug print
Browse files Browse the repository at this point in the history
  • Loading branch information
mikir committed Dec 16, 2024
1 parent 03f53fc commit 0f906ef
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions test/language/expressions/cpp/LengthOfOperatorTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,21 @@ TEST(LengthOfOperatorTest, writeRead)
data.strArray = VectorType<StringType>{"text1", "text2", "text3", "text4"};
data.bytesArray = VectorType<BytesType>{{0x01, 0x02}, {0x03, 0x04}};

EXPECT_EQ(576, zserio::detail::bitSizeOf(zserio::View(data)))
<< "literalLengthField: " << data.literalLengthField;
EXPECT_EQ(575, zserio::detail::bitSizeOf(zserio::View(data)))
<< "fixedArray[0]: " << data.fixedArray[0] << std::endl
<< "fixedArray.size: " << data.fixedArray.size() << std::endl
<< "numElements: " << static_cast<unsigned>(data.numElements) << std::endl
<< "variableArray[0]: " << static_cast<unsigned>(data.variableArray[0]) << std::endl
<< "variableArray.size: " << data.variableArray.size() << std::endl
<< "strField: " << data.strField << std::endl
<< "literalLengthField: " << data.literalLengthField << std::endl
<< "bytesField[0]: " << data.bytesField[0] << std::endl
<< "bytesField.size: " << data.bytesField.size() << std::endl
<< "strArray[0]: " << data.strArray[0] << std::endl
<< "strArray.size: " << data.strArray.size() << std::endl
<< "bytesArray[0][0]: " << static_cast<unsigned>(data.bytesArray[0][0]) << std::endl
<< "bytesArray[0].size: " << data.bytesArray[0].size() << std::endl
<< "bytesArray.size: " << data.bytesArray.size();

test_utils::writeReadTest(data);
}
Expand Down

0 comments on commit 0f906ef

Please sign in to comment.