Skip to content

Commit

Permalink
test: more coverage
Browse files Browse the repository at this point in the history
Signed-off-by: Shiwei Zhang <[email protected]>
  • Loading branch information
shizhMSFT committed Feb 20, 2023
1 parent e648281 commit bb6b49e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions cbor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,16 @@ func Test_deterministicBinaryString(t *testing.T) {
data: gen([]byte{0x5a, 0x00, 0x00, 0x01, 0x00}, 256),
want: gen([]byte{0x59, 0x01, 0x00}, 256),
},
{
name: "optimal uint64 length",
data: gen([]byte{0x5b,
0x00, 0x00, 0x00, 0x01,
0x00, 0x00, 0x00, 0x00,
}, 1<<32),
want: gen([]byte{0x5b,
0x00, 0x00, 0x00, 0x01,
0x00, 0x00, 0x00, 0x00,
}, 1<<32)},
{
name: "non-optimal uint64 length, target short",
data: gen([]byte{0x5b,
Expand Down

0 comments on commit bb6b49e

Please sign in to comment.