Matteo Martincigh | 0aed4f9 | 2019-10-01 14:25:34 +0100 | [diff] [blame] | 1 | // |
| 2 | // Copyright © 2019 Arm Ltd. All rights reserved. |
| 3 | // SPDX-License-Identifier: MIT |
| 4 | // |
| 5 | |
| 6 | #include <ProfilingUtils.hpp> |
| 7 | |
| 8 | #include <boost/test/unit_test.hpp> |
| 9 | #include <boost/numeric/conversion/cast.hpp> |
| 10 | |
| 11 | using namespace armnn::profiling; |
| 12 | |
| 13 | BOOST_AUTO_TEST_SUITE(TimelinePacketTests) |
| 14 | |
| 15 | BOOST_AUTO_TEST_CASE(TimelineLabelPacketTest1) |
| 16 | { |
| 17 | const uint64_t profilingGuid = 123456u; |
| 18 | const std::string label = "some label"; |
| 19 | unsigned int numberOfBytesWritten = 789u; |
| 20 | TimelinePacketStatus result = WriteTimelineLabelBinaryPacket(profilingGuid, |
| 21 | label, |
| 22 | nullptr, |
| 23 | 512u, |
| 24 | numberOfBytesWritten); |
| 25 | BOOST_CHECK(result == TimelinePacketStatus::BufferExhaustion); |
| 26 | BOOST_CHECK(numberOfBytesWritten == 0); |
| 27 | } |
| 28 | |
| 29 | BOOST_AUTO_TEST_CASE(TimelineLabelPacketTest2) |
| 30 | { |
| 31 | std::vector<unsigned char> buffer(512, 0); |
| 32 | |
| 33 | const uint64_t profilingGuid = 123456u; |
| 34 | const std::string label = "some label"; |
| 35 | unsigned int numberOfBytesWritten = 789u; |
| 36 | TimelinePacketStatus result = WriteTimelineLabelBinaryPacket(profilingGuid, |
| 37 | label, |
| 38 | buffer.data(), |
| 39 | 0, |
| 40 | numberOfBytesWritten); |
| 41 | BOOST_CHECK(result == TimelinePacketStatus::BufferExhaustion); |
| 42 | BOOST_CHECK(numberOfBytesWritten == 0); |
| 43 | } |
| 44 | |
| 45 | BOOST_AUTO_TEST_CASE(TimelineLabelPacketTest3) |
| 46 | { |
| 47 | std::vector<unsigned char> buffer(10, 0); |
| 48 | |
| 49 | const uint64_t profilingGuid = 123456u; |
| 50 | const std::string label = "some label"; |
| 51 | unsigned int numberOfBytesWritten = 789u; |
| 52 | TimelinePacketStatus result = WriteTimelineLabelBinaryPacket(profilingGuid, |
| 53 | label, |
| 54 | buffer.data(), |
| 55 | boost::numeric_cast<unsigned int>(buffer.size()), |
| 56 | numberOfBytesWritten); |
| 57 | BOOST_CHECK(result == TimelinePacketStatus::BufferExhaustion); |
| 58 | BOOST_CHECK(numberOfBytesWritten == 0); |
| 59 | } |
| 60 | |
| 61 | BOOST_AUTO_TEST_CASE(TimelineLabelPacketTest4) |
| 62 | { |
| 63 | std::vector<unsigned char> buffer(512, 0); |
| 64 | |
| 65 | const uint64_t profilingGuid = 123456u; |
| 66 | const std::string label = "s0m€ l@b€l"; |
| 67 | unsigned int numberOfBytesWritten = 789u; |
| 68 | TimelinePacketStatus result = WriteTimelineLabelBinaryPacket(profilingGuid, |
| 69 | label, |
| 70 | buffer.data(), |
| 71 | boost::numeric_cast<unsigned int>(buffer.size()), |
| 72 | numberOfBytesWritten); |
| 73 | BOOST_CHECK(result == TimelinePacketStatus::Error); |
| 74 | BOOST_CHECK(numberOfBytesWritten == 0); |
| 75 | } |
| 76 | |
| 77 | BOOST_AUTO_TEST_CASE(TimelineLabelPacketTest5) |
| 78 | { |
| 79 | std::vector<unsigned char> buffer(512, 0); |
| 80 | |
| 81 | const uint64_t profilingGuid = 123456u; |
| 82 | const std::string label = "some label"; |
| 83 | unsigned int numberOfBytesWritten = 789u; |
| 84 | TimelinePacketStatus result = WriteTimelineLabelBinaryPacket(profilingGuid, |
| 85 | label, |
| 86 | buffer.data(), |
| 87 | boost::numeric_cast<unsigned int>(buffer.size()), |
| 88 | numberOfBytesWritten); |
| 89 | BOOST_CHECK(result == TimelinePacketStatus::Ok); |
| 90 | BOOST_CHECK(numberOfBytesWritten == 32); |
| 91 | |
| 92 | unsigned int uint32_t_size = sizeof(uint32_t); |
| 93 | unsigned int uint64_t_size = sizeof(uint64_t); |
| 94 | |
| 95 | // Check the packet header |
| 96 | unsigned int offset = 0; |
| 97 | uint32_t packetHeaderWord0 = ReadUint32(buffer.data(), offset); |
| 98 | uint32_t packetFamily = (packetHeaderWord0 >> 26) & 0x0000003F; |
| 99 | uint32_t packetClass = (packetHeaderWord0 >> 19) & 0x0000007F; |
| 100 | uint32_t packetType = (packetHeaderWord0 >> 16) & 0x00000007; |
| 101 | uint32_t streamId = (packetHeaderWord0 >> 0) & 0x00000007; |
| 102 | BOOST_CHECK(packetFamily == 1); |
| 103 | BOOST_CHECK(packetClass == 0); |
| 104 | BOOST_CHECK(packetType == 1); |
| 105 | BOOST_CHECK(streamId == 0); |
| 106 | |
| 107 | offset += uint32_t_size; |
| 108 | uint32_t packetHeaderWord1 = ReadUint32(buffer.data(), offset); |
| 109 | uint32_t sequenceNumbered = (packetHeaderWord1 >> 24) & 0x00000001; |
| 110 | uint32_t dataLength = (packetHeaderWord1 >> 0) & 0x00FFFFFF; |
| 111 | BOOST_CHECK(sequenceNumbered == 0); |
| 112 | BOOST_CHECK(dataLength == 24); |
| 113 | |
| 114 | // Check the profiling GUID |
| 115 | offset += uint32_t_size; |
| 116 | uint64_t readProfilingGuid = ReadUint64(buffer.data(), offset); |
| 117 | BOOST_CHECK(readProfilingGuid == profilingGuid); |
| 118 | |
| 119 | // Check the SWTrace label |
| 120 | offset += uint64_t_size; |
| 121 | uint32_t swTraceLabelLength = ReadUint32(buffer.data(), offset); |
| 122 | BOOST_CHECK(swTraceLabelLength == 11); // Label length including the null-terminator |
| 123 | |
| 124 | offset += uint32_t_size; |
| 125 | BOOST_CHECK(std::memcmp(buffer.data() + offset, // Offset to the label in the buffer |
| 126 | label.data(), // The original label |
| 127 | swTraceLabelLength - 1) == 0); // The length of the label |
| 128 | |
| 129 | offset += swTraceLabelLength * uint32_t_size; |
| 130 | BOOST_CHECK(buffer[offset] == '\0'); // The null-terminator at the end of the SWTrace label |
| 131 | } |
| 132 | |
Sadik Armagan | 784db77 | 2019-10-08 15:05:38 +0100 | [diff] [blame] | 133 | BOOST_AUTO_TEST_CASE(TimelineMessageDirectoryPacketTest1) |
| 134 | { |
| 135 | unsigned int numberOfBytesWritten = 789u; |
| 136 | TimelinePacketStatus result = WriteTimelineMessageDirectoryPackage(nullptr, |
| 137 | 512u, |
| 138 | numberOfBytesWritten); |
| 139 | BOOST_CHECK(result == TimelinePacketStatus::BufferExhaustion); |
| 140 | BOOST_CHECK(numberOfBytesWritten == 0); |
| 141 | } |
| 142 | |
| 143 | BOOST_AUTO_TEST_CASE(TimelineMessageDirectoryPacketTest2) |
| 144 | { |
| 145 | std::vector<unsigned char> buffer(512, 0); |
| 146 | |
| 147 | unsigned int numberOfBytesWritten = 789u; |
| 148 | TimelinePacketStatus result = WriteTimelineMessageDirectoryPackage(buffer.data(), |
| 149 | 0, |
| 150 | numberOfBytesWritten); |
| 151 | BOOST_CHECK(result == TimelinePacketStatus::BufferExhaustion); |
| 152 | BOOST_CHECK(numberOfBytesWritten == 0); |
| 153 | } |
| 154 | |
| 155 | BOOST_AUTO_TEST_CASE(TimelineMessageDirectoryPacketTest3) |
| 156 | { |
| 157 | std::vector<unsigned char> buffer(512, 0); |
| 158 | unsigned int numberOfBytesWritten = 789u; |
| 159 | TimelinePacketStatus result = WriteTimelineMessageDirectoryPackage(buffer.data(), |
| 160 | boost::numeric_cast<unsigned int>(buffer.size()), |
| 161 | numberOfBytesWritten); |
| 162 | BOOST_CHECK(result == TimelinePacketStatus::Ok); |
| 163 | |
| 164 | BOOST_CHECK(numberOfBytesWritten == 424); |
| 165 | |
| 166 | unsigned int uint32_t_size = sizeof(uint32_t); |
| 167 | |
| 168 | // Check the packet header |
| 169 | unsigned int offset = 0; |
| 170 | uint32_t packetHeaderWord0 = ReadUint32(buffer.data(), offset); |
| 171 | uint32_t packetFamily = (packetHeaderWord0 >> 26) & 0x0000003F; |
| 172 | uint32_t packetClass = (packetHeaderWord0 >> 19) & 0x0000007F; |
| 173 | uint32_t packetType = (packetHeaderWord0 >> 16) & 0x00000007; |
| 174 | uint32_t streamId = (packetHeaderWord0 >> 0) & 0x00000007; |
| 175 | BOOST_CHECK(packetFamily == 1); |
| 176 | BOOST_CHECK(packetClass == 0); |
| 177 | BOOST_CHECK(packetType == 0); |
| 178 | BOOST_CHECK(streamId == 0); |
| 179 | |
| 180 | offset += uint32_t_size; |
| 181 | uint32_t packetHeaderWord1 = ReadUint32(buffer.data(), offset); |
| 182 | uint32_t sequenceNumbered = (packetHeaderWord1 >> 24) & 0x00000001; |
| 183 | uint32_t dataLength = (packetHeaderWord1 >> 0) & 0x00FFFFFF; |
| 184 | BOOST_CHECK(sequenceNumbered == 0); |
| 185 | BOOST_CHECK(dataLength == 416); |
| 186 | |
| 187 | // Check the decl_id |
| 188 | offset += uint32_t_size; |
| 189 | uint32_t readDeclId = ReadUint32(buffer.data(), offset); |
| 190 | BOOST_CHECK(readDeclId == 0); |
| 191 | |
| 192 | // SWTrace "namestring" format |
| 193 | // length of the string (first 4 bytes) + string + null terminator |
| 194 | |
| 195 | // Check the decl_name |
| 196 | offset += uint32_t_size; |
| 197 | uint32_t swTraceDeclNameLength = ReadUint32(buffer.data(), offset); |
| 198 | BOOST_CHECK(swTraceDeclNameLength == 13); // decl_name length including the null-terminator |
| 199 | |
| 200 | std::string label = "declareLabel"; |
| 201 | offset += uint32_t_size; |
| 202 | BOOST_CHECK(std::memcmp(buffer.data() + offset, // Offset to the label in the buffer |
| 203 | label.data(), // The original label |
| 204 | swTraceDeclNameLength - 1) == 0); // The length of the label |
| 205 | |
| 206 | // Check the ui_name |
| 207 | std::vector<uint32_t> swTraceString; |
| 208 | StringToSwTraceString<SwTraceCharPolicy>(label, swTraceString); |
| 209 | offset += (boost::numeric_cast<unsigned int>(swTraceString.size()) - 1) * uint32_t_size; |
| 210 | uint32_t swTraceUINameLength = ReadUint32(buffer.data(), offset); |
| 211 | BOOST_CHECK(swTraceUINameLength == 14); // ui_name length including the null-terminator |
| 212 | |
| 213 | label = "declare label"; |
| 214 | offset += uint32_t_size; |
| 215 | BOOST_CHECK(std::memcmp(buffer.data() + offset, // Offset to the label in the buffer |
| 216 | label.data(), // The original label |
| 217 | swTraceUINameLength - 1) == 0); // The length of the label |
| 218 | |
| 219 | // Check arg_types |
| 220 | StringToSwTraceString<SwTraceCharPolicy>(label, swTraceString); |
| 221 | offset += (boost::numeric_cast<unsigned int>(swTraceString.size()) - 1) * uint32_t_size; |
| 222 | uint32_t swTraceArgTypesLength = ReadUint32(buffer.data(), offset); |
| 223 | BOOST_CHECK(swTraceArgTypesLength == 3); // arg_types length including the null-terminator |
| 224 | |
| 225 | label = "ps"; |
| 226 | offset += uint32_t_size; |
| 227 | BOOST_CHECK(std::memcmp(buffer.data() + offset, // Offset to the label in the buffer |
| 228 | label.data(), // The original label |
| 229 | swTraceArgTypesLength - 1) == 0); // The length of the label |
| 230 | |
| 231 | // Check arg_names |
| 232 | StringToSwTraceString<SwTraceCharPolicy>(label, swTraceString); |
| 233 | offset += (boost::numeric_cast<unsigned int>(swTraceString.size()) - 1) * uint32_t_size; |
| 234 | uint32_t swTraceArgNamesLength = ReadUint32(buffer.data(), offset); |
| 235 | BOOST_CHECK(swTraceArgNamesLength == 11); // arg_names length including the null-terminator |
| 236 | |
| 237 | label = "guid,value"; |
| 238 | offset += uint32_t_size; |
| 239 | BOOST_CHECK(std::memcmp(buffer.data() + offset, // Offset to the label in the buffer |
| 240 | label.data(), // The original label |
| 241 | swTraceArgNamesLength - 1) == 0); // The length of the label |
| 242 | |
| 243 | // Check second message decl_id |
| 244 | StringToSwTraceString<SwTraceCharPolicy>(label, swTraceString); |
| 245 | offset += (boost::numeric_cast<unsigned int>(swTraceString.size()) - 1) * uint32_t_size; |
| 246 | readDeclId = ReadUint32(buffer.data(), offset); |
| 247 | BOOST_CHECK(readDeclId == 1); |
| 248 | |
| 249 | // Check second decl_name |
| 250 | offset += uint32_t_size; |
| 251 | swTraceDeclNameLength = ReadUint32(buffer.data(), offset); |
| 252 | BOOST_CHECK(swTraceDeclNameLength == 14); // decl_name length including the null-terminator |
| 253 | |
| 254 | label = "declareEntity"; |
| 255 | offset += uint32_t_size; |
| 256 | BOOST_CHECK(std::memcmp(buffer.data() + offset, // Offset to the label in the buffer |
| 257 | label.data(), // The original label |
| 258 | swTraceDeclNameLength - 1) == 0); // The length of the label |
| 259 | } |
| 260 | |
Matteo Martincigh | 0aed4f9 | 2019-10-01 14:25:34 +0100 | [diff] [blame] | 261 | BOOST_AUTO_TEST_SUITE_END() |
David Monahan | f21f606 | 2019-10-07 15:11:15 +0100 | [diff] [blame] | 262 | |
| 263 | BOOST_AUTO_TEST_SUITE(TimelineEntityTests) |
| 264 | |
| 265 | BOOST_AUTO_TEST_CASE(TimelineEntityPacketTest1) |
| 266 | { |
| 267 | const uint64_t profilingGuid = 123456u; |
| 268 | unsigned int numberOfBytesWritten = 789u; |
| 269 | TimelinePacketStatus result = WriteTimelineEntityBinaryPacket(profilingGuid, |
| 270 | nullptr, |
| 271 | 512u, |
| 272 | numberOfBytesWritten); |
| 273 | BOOST_CHECK(result == TimelinePacketStatus::BufferExhaustion); |
| 274 | BOOST_CHECK(numberOfBytesWritten == 0); |
| 275 | } |
| 276 | |
| 277 | BOOST_AUTO_TEST_CASE(TimelineEntityPacketTest2) |
| 278 | { |
| 279 | std::vector<unsigned char> buffer(512, 0); |
| 280 | |
| 281 | const uint64_t profilingGuid = 123456u; |
| 282 | unsigned int numberOfBytesWritten = 789u; |
| 283 | TimelinePacketStatus result = WriteTimelineEntityBinaryPacket(profilingGuid, |
| 284 | buffer.data(), |
| 285 | 0, |
| 286 | numberOfBytesWritten); |
| 287 | BOOST_CHECK(result == TimelinePacketStatus::BufferExhaustion); |
| 288 | BOOST_CHECK(numberOfBytesWritten == 0); |
| 289 | } |
| 290 | |
| 291 | BOOST_AUTO_TEST_CASE(TimelineEntityPacketTest3) |
| 292 | { |
| 293 | std::vector<unsigned char> buffer(10, 0); |
| 294 | |
| 295 | const uint64_t profilingGuid = 123456u; |
| 296 | unsigned int numberOfBytesWritten = 789u; |
| 297 | TimelinePacketStatus result = WriteTimelineEntityBinaryPacket(profilingGuid, |
| 298 | buffer.data(), |
| 299 | boost::numeric_cast<unsigned int>(buffer.size()), |
| 300 | numberOfBytesWritten); |
| 301 | BOOST_CHECK(result == TimelinePacketStatus::BufferExhaustion); |
| 302 | BOOST_CHECK(numberOfBytesWritten == 0); |
| 303 | } |
| 304 | |
| 305 | BOOST_AUTO_TEST_CASE(TimelineEntityPacketTest4) |
| 306 | { |
| 307 | std::vector<unsigned char> buffer(512, 0); |
| 308 | |
| 309 | const uint64_t profilingGuid = 123456u; |
| 310 | unsigned int numberOfBytesWritten = 789u; |
| 311 | TimelinePacketStatus result = WriteTimelineEntityBinaryPacket(profilingGuid, |
| 312 | buffer.data(), |
| 313 | boost::numeric_cast<unsigned int>(buffer.size()), |
| 314 | numberOfBytesWritten); |
| 315 | BOOST_CHECK(result == TimelinePacketStatus::Ok); |
| 316 | BOOST_CHECK(numberOfBytesWritten == 16); |
| 317 | |
| 318 | unsigned int uint32_t_size = sizeof(uint32_t); |
| 319 | |
| 320 | // Check the packet header |
| 321 | unsigned int offset = 0; |
| 322 | uint32_t packetHeaderWord0 = ReadUint32(buffer.data(), offset); |
| 323 | uint32_t packetFamily = (packetHeaderWord0 >> 26) & 0x0000003F; |
| 324 | uint32_t packetClass = (packetHeaderWord0 >> 19) & 0x0000007F; |
| 325 | uint32_t packetType = (packetHeaderWord0 >> 16) & 0x00000007; |
| 326 | uint32_t streamId = (packetHeaderWord0 >> 0) & 0x00000007; |
| 327 | BOOST_CHECK(packetFamily == 1); |
| 328 | BOOST_CHECK(packetClass == 0); |
| 329 | BOOST_CHECK(packetType == 1); |
| 330 | BOOST_CHECK(streamId == 0); |
| 331 | |
| 332 | offset += uint32_t_size; |
| 333 | uint32_t packetHeaderWord1 = ReadUint32(buffer.data(), offset); |
| 334 | uint32_t sequenceNumbered = (packetHeaderWord1 >> 24) & 0x00000001; |
| 335 | uint32_t dataLength = (packetHeaderWord1 >> 0) & 0x00FFFFFF; |
| 336 | BOOST_CHECK(sequenceNumbered == 0); |
| 337 | BOOST_CHECK(dataLength == 8); |
| 338 | |
| 339 | // Check the profiling GUID |
| 340 | offset += uint32_t_size; |
| 341 | uint64_t readProfilingGuid = ReadUint64(buffer.data(), offset); |
| 342 | BOOST_CHECK(readProfilingGuid == profilingGuid); |
| 343 | } |
| 344 | |
Jan Eilers | 92fa15b | 2019-10-15 15:23:25 +0100 | [diff] [blame^] | 345 | BOOST_AUTO_TEST_SUITE_END() |
| 346 | |
| 347 | |
| 348 | BOOST_AUTO_TEST_SUITE(TimelineEventClassTests) |
| 349 | |
| 350 | BOOST_AUTO_TEST_CASE(TimelineEventClassTest1) |
| 351 | { |
| 352 | const uint64_t profilingGuid = 123456u; |
| 353 | unsigned int numberOfBytesWritten = 789u; |
| 354 | TimelinePacketStatus result = WriteTimelineEventClassBinaryPacket(profilingGuid, |
| 355 | nullptr, |
| 356 | 512u, |
| 357 | numberOfBytesWritten); |
| 358 | BOOST_CHECK(result == TimelinePacketStatus::BufferExhaustion); |
| 359 | BOOST_CHECK(numberOfBytesWritten == 0); |
| 360 | } |
| 361 | |
| 362 | BOOST_AUTO_TEST_CASE(TimelineEventClassTest2) |
| 363 | { |
| 364 | std::vector<unsigned char> buffer(512, 0); |
| 365 | |
| 366 | const uint64_t profilingGuid = 123456u; |
| 367 | unsigned int numberOfBytesWritten = 789u; |
| 368 | TimelinePacketStatus result = WriteTimelineEventClassBinaryPacket(profilingGuid, |
| 369 | buffer.data(), |
| 370 | 0, |
| 371 | numberOfBytesWritten); |
| 372 | BOOST_CHECK(result == TimelinePacketStatus::BufferExhaustion); |
| 373 | BOOST_CHECK(numberOfBytesWritten == 0); |
| 374 | } |
| 375 | |
| 376 | BOOST_AUTO_TEST_CASE(TimelineEventClassTest3) |
| 377 | { |
| 378 | std::vector<unsigned char> buffer(10, 0); |
| 379 | |
| 380 | const uint64_t profilingGuid = 123456u; |
| 381 | unsigned int numberOfBytesWritten = 789u; |
| 382 | TimelinePacketStatus result = WriteTimelineEventClassBinaryPacket(profilingGuid, |
| 383 | buffer.data(), |
| 384 | boost::numeric_cast<unsigned int>(buffer.size()), |
| 385 | numberOfBytesWritten); |
| 386 | BOOST_CHECK(result == TimelinePacketStatus::BufferExhaustion); |
| 387 | BOOST_CHECK(numberOfBytesWritten == 0); |
| 388 | } |
| 389 | |
| 390 | BOOST_AUTO_TEST_CASE(TimelineEventClassTest4) |
| 391 | { |
| 392 | std::vector<unsigned char> buffer(512, 0); |
| 393 | |
| 394 | const uint64_t profilingGuid = 123456u; |
| 395 | unsigned int numberOfBytesWritten = 789u; |
| 396 | TimelinePacketStatus result = WriteTimelineEventClassBinaryPacket(profilingGuid, |
| 397 | buffer.data(), |
| 398 | boost::numeric_cast<unsigned int>(buffer.size()), |
| 399 | numberOfBytesWritten); |
| 400 | BOOST_CHECK(result == TimelinePacketStatus::Ok); |
| 401 | BOOST_CHECK(numberOfBytesWritten == 20); |
| 402 | |
| 403 | unsigned int uint32_t_size = sizeof(uint32_t); |
| 404 | |
| 405 | // Check the packet header |
| 406 | unsigned int offset = 0; |
| 407 | uint32_t packetHeaderWord0 = ReadUint32(buffer.data(), offset); |
| 408 | uint32_t packetFamily = (packetHeaderWord0 >> 26) & 0x0000003F; |
| 409 | uint32_t packetClass = (packetHeaderWord0 >> 19) & 0x0000007F; |
| 410 | uint32_t packetType = (packetHeaderWord0 >> 16) & 0x00000007; |
| 411 | uint32_t streamId = (packetHeaderWord0 >> 0) & 0x00000007; |
| 412 | BOOST_CHECK(packetFamily == 1); |
| 413 | BOOST_CHECK(packetClass == 0); |
| 414 | BOOST_CHECK(packetType == 1); |
| 415 | BOOST_CHECK(streamId == 0); |
| 416 | |
| 417 | offset += uint32_t_size; |
| 418 | uint32_t packetHeaderWord1 = ReadUint32(buffer.data(), offset); |
| 419 | uint32_t sequenceNumbered = (packetHeaderWord1 >> 24) & 0x00000001; |
| 420 | uint32_t dataLength = (packetHeaderWord1 >> 0) & 0x00FFFFFF; |
| 421 | BOOST_CHECK(sequenceNumbered == 0); |
| 422 | BOOST_CHECK(dataLength == 12); |
| 423 | |
| 424 | // Check the decl_id |
| 425 | offset += uint32_t_size; |
| 426 | uint32_t declId = ReadUint32(buffer.data(), offset); |
| 427 | BOOST_CHECK(declId == uint32_t(2)); |
| 428 | |
| 429 | // Check the profiling GUID |
| 430 | offset += uint32_t_size; |
| 431 | uint64_t readProfilingGuid = ReadUint64(buffer.data(), offset); |
| 432 | BOOST_CHECK(readProfilingGuid == profilingGuid); |
| 433 | } |
| 434 | |
David Monahan | f21f606 | 2019-10-07 15:11:15 +0100 | [diff] [blame] | 435 | BOOST_AUTO_TEST_SUITE_END() |