Exemple #1
0
        private static void Compare(BethesdaField first, BethesdaField second, StringBuilder sb, int indentLevel)
        {
            if (SpanExtensions.SequenceEqual(first.Payload, second.Payload))
            {
                return;
            }

            string indent = Indent(indentLevel);

            sb.Append(indent).AppendLine(first.ToString())
            .Append(indent).AppendLine("vs.")
            .Append(indent).AppendLine(second.ToString());
        }
    public void SpanSequenceEqual()
    {
        for (int i = 0; i < M; i++)
        {
            for (int j = 0; j < M; j++)
            {
                Span <byte> a = items[i];
                Span <byte> b = items[j];

                var x = i == j;
                var y = SpanExtensions.SequenceEqual(a, b);

                if (x != y)
                {
                    throw new Exception();
                }
            }
        }
    }