27 #include <gtest/gtest.h> 28 #include <boost/asio.hpp> 72 for (
EIP_UINT i = 10000; i < 10000 + 1000; ++i)
82 EXPECT_EQ(
sizeof(d), reader.getByteCount());
131 for (
int i = 0; i < 1000; ++i)
140 EXPECT_EQ(
sizeof(d), writer.getByteCount());
142 EXPECT_EQ(d[0], 0xEF);
143 EXPECT_EQ(d[1], 0xBE);
144 EXPECT_EQ(d[2], 0xAD);
145 EXPECT_EQ(d[3], 0xDE);
146 EXPECT_EQ(d[4], 0x40);
147 EXPECT_EQ(d[5], 0x9C);
150 EXPECT_EQ(d[8], 0xAA);
151 EXPECT_EQ(d[9], 0x55);
152 EXPECT_EQ(d[10], 0xAA);
153 EXPECT_EQ(d[11], 0x55);
154 EXPECT_EQ(d[12], 0x45);
155 EXPECT_EQ(d[13], 0xA9);
162 EXPECT_EQ(d[20], 0x45);
164 EXPECT_EQ(d[22], 0xAA);
166 EXPECT_EQ(d[24], 0x0F);
168 EXPECT_EQ(d[26], 0x07);
170 EXPECT_EQ(d[28], 0x03);
172 EXPECT_EQ(d[30], 0x02);
173 EXPECT_EQ(d[31], 0x04);
174 EXPECT_EQ(d[32], 0xAA);
175 EXPECT_EQ(d[33], 0x55);
176 EXPECT_EQ(d[34], 0xA5);
177 EXPECT_EQ(d[35], 0x5A);
196 EXPECT_EQ(d[54], 0xE8);
197 EXPECT_EQ(d[55], 0x03);
199 for (
int i = 0; i < 1000; ++i)
202 EXPECT_EQ((exp_value)&0x00FF, d[56 + i * 2]);
203 EXPECT_EQ((exp_value >> 8) & 0x00FF, d[56 + i * 2 + 1]);
vector< EIP_UINT > measurement_data
TEST_F(MeasurementReportTest, test_deserialize)
MeasurementReportHeader header
virtual Writer & serialize(Writer &writer) const
virtual size_t getLength() const
virtual Reader & deserialize(Reader &reader, size_t length)