Skip to content

Commit

Permalink
fix errors in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kazuho committed Dec 13, 2023
1 parent 55e28f4 commit 531d1ef
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions t/picotls.c
Original file line number Diff line number Diff line change
Expand Up @@ -1916,9 +1916,13 @@ static void do_test_tlsblock(size_t len_encoded, size_t max_bytes)
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;
});

Expand Down

0 comments on commit 531d1ef

Please sign in to comment.