refactor: add a test for matching of non-u8 slices
This commit is contained in:
parent
2edec49b7f
commit
03ab65ee31
1 changed files with 8 additions and 0 deletions
|
|
@ -397,6 +397,14 @@ test "cbor.extract_number_limits" {
|
|||
try expectError(error.IntegerTooLarge, match(m, extract(&i)));
|
||||
}
|
||||
|
||||
test "cbor.match non-u8 slice" {
|
||||
var buf: [128]u8 = undefined;
|
||||
var writer: Io.Writer = .fixed(&buf);
|
||||
const v: []const u32 = &.{ 1, 2, 3 };
|
||||
try writeValue(&writer, v);
|
||||
try expect(try match(writer.buffered(), v));
|
||||
}
|
||||
|
||||
test "cbor.writeValue large usize" {
|
||||
var buf: [128]u8 = undefined;
|
||||
var writer: Io.Writer = .fixed(&buf);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue