Add uleb128 byte-at-a-time decoder.

This commit is contained in:
Jeroen van Rijn
2022-04-16 02:07:57 +02:00
parent de72754d7a
commit 44316401c9
3 changed files with 34 additions and 22 deletions
@@ -51,7 +51,7 @@ test_leb128 :: proc(t: ^testing.T) {
msg := fmt.tprintf("Expected %02x to decode to %v consuming %v bytes, got %v and %v", vector.encoded, vector.value, vector.size, val, size)
expect(t, size == vector.size && val == vector.value, msg)
msg = fmt.tprintf("Expected decoder to return error %v, got %v", vector.error, err)
msg = fmt.tprintf("Expected decoder to return error %v, got %v for vector %v", vector.error, err, vector)
expect(t, err == vector.error, msg)
if err == .None { // Try to roundtrip
BIN
View File
Binary file not shown.