public static unsafe void GetUtf8SpanFromSBytePointerTest()
    {
        Assert.That(() => MarshalUtilities.GetUtf8Span(null, -1).ToArray(),
                    Is.EqualTo(Array.Empty <sbyte>())
                    );

        fixed(sbyte *source = Array.Empty <sbyte>())
        {
            var pSource = source;

            Assert.That(() => MarshalUtilities.GetUtf8Span(pSource, -1).ToArray(),
                        Is.EqualTo(Array.Empty <sbyte>())
                        );
        }

        fixed(sbyte *source = new sbyte[] { (sbyte)'A', (sbyte)'B', (sbyte)'C' })
        {
            var pSource = source;

            Assert.That(() => MarshalUtilities.GetUtf8Span(pSource, -1).ToArray(),
                        Is.EqualTo(new sbyte[] { (sbyte)'A', (sbyte)'B', (sbyte)'C' })
                        );

            Assert.That(() => MarshalUtilities.GetUtf8Span(pSource, 2).ToArray(),
                        Is.EqualTo(new sbyte[] { (sbyte)'A', (sbyte)'B' })
                        );
        }
    }
    public static void GetUtf8SpanFromStringTest()
    {
        Assert.That(() => MarshalUtilities.GetUtf8Span(null).ToArray(),
                    Is.EqualTo(Array.Empty <sbyte>())
                    );

        Assert.That(() => MarshalUtilities.GetUtf8Span(string.Empty).ToArray(),
                    Is.EqualTo(Array.Empty <sbyte>())
                    );

        Assert.That(() => MarshalUtilities.GetUtf8Span("ABC").ToArray(),
                    Is.EqualTo(new sbyte[] { (sbyte)'A', (sbyte)'B', (sbyte)'C' })
                    );
    }
    public static unsafe void GetUtf8SpanFromSByteReferenceTest()
    {
        Assert.That(() => MarshalUtilities.GetUtf8Span(UnsafeUtilities.NullRef <sbyte>(), -1).ToArray(),
                    Is.EqualTo(Array.Empty <sbyte>())
                    );

        var source = new sbyte[] { (sbyte)'A', (sbyte)'B', (sbyte)'C' };

        Assert.That(() => MarshalUtilities.GetUtf8Span(in source[0], -1).ToArray(),
                    Is.EqualTo(new sbyte[] { (sbyte)'A', (sbyte)'B', (sbyte)'C' })
                    );

        Assert.That(() => MarshalUtilities.GetUtf8Span(in source[0], 2).ToArray(),
                    Is.EqualTo(new sbyte[] { (sbyte)'A', (sbyte)'B' })
                    );
    }