Skip to content

Commit

Permalink
Improved test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
sakno committed Dec 5, 2024
1 parent 3e3e5c2 commit 8f60859
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/DotNext.Tests/Buffers/Binary/Leb128Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,11 @@ private static void EncodeDecode<T>(ReadOnlySpan<T> values)

[Fact]
public static void EncodeDecodeUInt32() => EncodeDecode([uint.MinValue, uint.MaxValue, 0x80U]);

[Fact]
public static void EncodeDecodeEmptyBuffer()
{
False(Leb128<int>.TryGetBytes(42, Span<byte>.Empty, out _));
False(Leb128<short>.TryParse(ReadOnlySpan<byte>.Empty, out _, out _));
}
}

0 comments on commit 8f60859

Please sign in to comment.