commit | 531d1efc4c789bea95372b5303ce9cbf1a93e920 | [log] [tgz] |
---|---|---|
author | Kazuho Oku <kazuhooku@gmail.com> | Wed Dec 13 13:58:10 2023 +0900 |
committer | Kazuho Oku <kazuhooku@gmail.com> | Wed Dec 13 13:58:10 2023 +0900 |
tree | a6cd24c7092c3bd49ad72c8ba347df448efcd519 | |
parent | 55e28f44490967ec6ff73f40ec1750780c89f4c9 [diff] |
fix errors in tests
diff --git a/t/picotls.c b/t/picotls.c index a5a79dc..8bc5ab4 100644 --- a/t/picotls.c +++ b/t/picotls.c
@@ -1916,9 +1916,13 @@ src = buf.base; end = buf.base + buf.off; ptls_decode_block(src, end, len_encoded, { - ok(end - src == 255); - for (size_t i = 0; i < max_bytes; ++i) - ok(*src == i); + ok(end - src == max_bytes); + int bytes_eq = 1; + for (size_t i = 0; i < max_bytes; ++i) { + if (src[i] != (uint8_t)i) + bytes_eq = 0; + } + ok(bytes_eq); src = end; });