107 i.WriteHtonU16(0x6568);
110 i.WriteHtonU16(0x6369);
112 i.WriteHtonU32(0xdeadbeaf);
122 ENSURE_WRITTEN_BYTES(buffer, 10, 0, 0, 0x63, 0x69, 0xde, 0xad, 0xbe, 0xaf, 0, 0);
138 uint16_t
saved =
i.ReadU16();
140 i.WriteHtonU16(0xff00);
163 i.WriteU64(0x0123456789ABCDEFLLU);
167 i.WriteHtolsbU64(0x0123456789ABCDEFLLU);
171 0x0123456789abcdefLLU,
172 "Could not read expected value");
174 i.WriteHtonU64(0x0123456789ABCDEFLLU);
182#if defined(__clang__)
183#if __has_warning("-Wself-assign-overloaded")
184#pragma clang diagnostic push
185#pragma clang diagnostic ignored "-Wself-assign-overloaded"
189#if defined(__clang__)
190#if __has_warning("-Wself-assign-overloaded")
191#pragma clang diagnostic pop
214 i.WriteHtonU32(0xdeadbeaf);
248 ENSURE_WRITTEN_BYTES(buffer, 11, 0x30, 0x31, 0x32, 0, 0, 0xac, 0xad, 0xae, 0xaf, 0xba, 0xbb);
255 i.WriteHtonU16(0xabcd);
338 ENSURE_WRITTEN_BYTES(buffer, 9, 0x1, 0x2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3, 0x4);
343 ENSURE_WRITTEN_BYTES(
other, 9, 0x1, 0x2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3, 0x4);
346 std::string
ct(
"This is the next content of the buffer.");
350 i.
Write((
const uint8_t*)
ct.c_str(),
ct.size());
361 *(((
const uint8_t*)
ct.c_str()) +
i),
362 "Bad buffer copied data");
377 uint16_t
val1 =
i.ReadNtohU16();