diff --git a/src/DotNext.Tests/Buffers/Binary/Leb128Tests.cs b/src/DotNext.Tests/Buffers/Binary/Leb128Tests.cs index 8433f2395..9316f8f22 100644 --- a/src/DotNext.Tests/Buffers/Binary/Leb128Tests.cs +++ b/src/DotNext.Tests/Buffers/Binary/Leb128Tests.cs @@ -29,4 +29,11 @@ private static void EncodeDecode(ReadOnlySpan values) [Fact] public static void EncodeDecodeUInt32() => EncodeDecode([uint.MinValue, uint.MaxValue, 0x80U]); + + [Fact] + public static void EncodeDecodeEmptyBuffer() + { + False(Leb128.TryGetBytes(42, Span.Empty, out _)); + False(Leb128.TryParse(ReadOnlySpan.Empty, out _, out _)); + } } \ No newline at end of file