| 15 | { |
| 16 | template <typename T> |
| 17 | void TestVarUint(T const x) |
| 18 | { |
| 19 | vector<unsigned char> data; |
| 20 | PushBackByteSink<vector<uint8_t>> dst(data); |
| 21 | WriteVarUint(dst, x); |
| 22 | |
| 23 | ArrayByteSource src(&data[0]); |
| 24 | TEST_EQUAL(ReadVarUint<T>(src), x, ()); |
| 25 | |
| 26 | size_t const bytesRead = src.PtrUint8() - data.data(); |
| 27 | TEST_EQUAL(bytesRead, data.size(), (x)); |
| 28 | } |
| 29 | |
| 30 | template <typename T> |
| 31 | void TestVarInt(T const x) |
no test coverage detected