| 9 | namespace TestUtil { |
| 10 | |
| 11 | AutoDeleteTempFile MakeStorageTempFileWith3Records() |
| 12 | { |
| 13 | AutoDeleteTempFile tempfile; |
| 14 | |
| 15 | // clang-format off |
| 16 | std::vector<uint16_t> bytes { |
| 17 | // HEADER |
| 18 | 0x0001, 0x0000, 0x0002, 0x0000, // count=1, version=2 |
| 19 | 0x0000, 0x0000, 0x0000, 0x0000, // reserved_0 |
| 20 | 0x0000, 0x0000, 0x0000, 0x0000, // reserved_1 |
| 21 | 0x0000, 0x0000, 0x0000, 0x0000, // reserved_2 |
| 22 | 0x0000, 0x0000, 0x0000, 0x0000, // reserved_3 |
| 23 | 0x0000, 0x0000, 0x0000, 0x0000, // reserved_4 |
| 24 | 0x0000, 0x0000, 0x0000, 0x0000, // reserved_5 |
| 25 | 0x0000, 0x0000, 0x0000, 0x0000, // reserved_6 |
| 26 | // 64 Bytes |
| 27 | // METADATA 1 |
| 28 | 0xBEEF, 0xDEAD, 0x0003, 0x0000, // sentinel=0xDEADBEEF, mil_dtype=uint8_t |
| 29 | 0x0005, 0x0000, 0x0000, 0x0000, // sizeInBytes=5 bytes |
| 30 | 0x0080, 0x0000, 0x0000, 0x0000, // offset |
| 31 | 0x0000, 0x0000, 0x0000, 0x0000, // reserved_0 |
| 32 | 0x0000, 0x0000, 0x0000, 0x0000, // reserved_1 |
| 33 | 0x0001, 0x0000, 0x0000, 0x0000, // reserved_2 |
| 34 | 0x0000, 0x0000, 0x0000, 0x0000, // reserved_3 |
| 35 | 0x0000, 0x0000, 0x0000, 0x0000, // reserved_4 |
| 36 | // 128 Bytes |
| 37 | // DATA 1 |
| 38 | 0x0002, 0x0040, 0x0007, 0x0000, |
| 39 | // Padding |
| 40 | 0x0000, 0x0000, 0x0000, 0x0000, |
| 41 | 0x0000, 0x0000, 0x0000, 0x0000, |
| 42 | 0x0000, 0x0000, 0x0000, 0x0000, |
| 43 | 0x0000, 0x0000, 0x0000, 0x0000, |
| 44 | 0x0000, 0x0000, 0x0000, 0x0000, |
| 45 | 0x0000, 0x0000, 0x0000, 0x0000, |
| 46 | 0x0000, 0x0000, 0x0000, 0x0000, |
| 47 | // 192 Bytes |
| 48 | // METADATA 2 |
| 49 | 0xBEEF, 0xDEAD, 0x0001, 0x0000, // sentinel=0xDEADBEEF, mil_dtype=Fp16 |
| 50 | 0x0008, 0x0000, 0x0000, 0x0000, // sizeInBytes=8 bytes |
| 51 | 0x0100, 0x0000, 0x0000, 0x0000, // offset |
| 52 | 0x0000, 0x0000, 0x0000, 0x0000, // reserved_0 |
| 53 | 0x0000, 0x0000, 0x0000, 0x0000, // reserved_1 |
| 54 | 0x0001, 0x0000, 0x0000, 0x0000, // reserved_2 |
| 55 | 0x0000, 0x0000, 0x0000, 0x0000, // reserved_3 |
| 56 | 0x0000, 0x0000, 0x0000, 0x0000, // reserved_4 |
| 57 | // 256 Bytes |
| 58 | // DATA 2 |
| 59 | 0x000E, 0xC0FE, 0x0810, 0x0000, |
| 60 | // Padding |
| 61 | 0x0000, 0x0000, 0x0000, 0x0000, |
| 62 | 0x0000, 0x0000, 0x0000, 0x0000, |
| 63 | 0x0000, 0x0000, 0x0000, 0x0000, |
| 64 | 0x0000, 0x0000, 0x0000, 0x0000, |
| 65 | 0x0000, 0x0000, 0x0000, 0x0000, |
| 66 | 0x0000, 0x0000, 0x0000, 0x0000, |
| 67 | 0x0000, 0x0000, 0x0000, 0x0000, |
| 68 | // 320 Bytes |
no test coverage detected