Formats UO Content (#201)
This commit is contained in:
parent
86b7b3aed1
commit
ad3775c4d7
3249 changed files with 431083 additions and 440981 deletions
|
|
@ -1,24 +1,24 @@
|
|||
using System;
|
||||
using System.Text;
|
||||
|
||||
namespace Server.Tests
|
||||
{
|
||||
public static partial class AssertThat
|
||||
{
|
||||
public static string SpanToString(ReadOnlySpan<byte> bytes)
|
||||
{
|
||||
StringBuilder builder = new StringBuilder();
|
||||
builder.Append("[");
|
||||
builder.AppendJoin(", ", bytes.ToArray());
|
||||
builder.Append("]");
|
||||
|
||||
return builder.ToString();
|
||||
}
|
||||
|
||||
public static void Equal(ReadOnlySpan<byte> actual, ReadOnlySpan<byte> expected) =>
|
||||
Xunit.Assert.True(
|
||||
expected.SequenceEqual(actual),
|
||||
$"Expected does not match actual.\nExpected:\t{SpanToString(expected)}\nActual:\t\t{SpanToString(actual)}"
|
||||
);
|
||||
}
|
||||
}
|
||||
using System;
|
||||
using System.Text;
|
||||
|
||||
namespace Server.Tests
|
||||
{
|
||||
public static class AssertThat
|
||||
{
|
||||
public static string SpanToString(ReadOnlySpan<byte> bytes)
|
||||
{
|
||||
var builder = new StringBuilder();
|
||||
builder.Append("[");
|
||||
builder.AppendJoin(", ", bytes.ToArray());
|
||||
builder.Append("]");
|
||||
|
||||
return builder.ToString();
|
||||
}
|
||||
|
||||
public static void Equal(ReadOnlySpan<byte> actual, ReadOnlySpan<byte> expected) =>
|
||||
Xunit.Assert.True(
|
||||
expected.SequenceEqual(actual),
|
||||
$"Expected does not match actual.\nExpected:\t{SpanToString(expected)}\nActual:\t\t{SpanToString(actual)}"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue