Skip to content

Commit 8f60859

Browse files
committed
Improved test coverage
1 parent 3e3e5c2 commit 8f60859

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/DotNext.Tests/Buffers/Binary/Leb128Tests.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,11 @@ private static void EncodeDecode<T>(ReadOnlySpan<T> values)
2929

3030
[Fact]
3131
public static void EncodeDecodeUInt32() => EncodeDecode([uint.MinValue, uint.MaxValue, 0x80U]);
32+
33+
[Fact]
34+
public static void EncodeDecodeEmptyBuffer()
35+
{
36+
False(Leb128<int>.TryGetBytes(42, Span<byte>.Empty, out _));
37+
False(Leb128<short>.TryParse(ReadOnlySpan<byte>.Empty, out _, out _));
38+
}
3239
}

0 commit comments

Comments
 (0)