mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-14 16:51:28 +00:00
29 lines
666 B
C#
29 lines
666 B
C#
using UnityEngine.Assertions;
|
|
|
|
namespace Obfuz.Utils
|
|
{
|
|
public static class AssertUtil
|
|
{
|
|
private static bool IsArrayEqual(byte[] a, byte[] b)
|
|
{
|
|
if (a.Length != b.Length)
|
|
{
|
|
return false;
|
|
}
|
|
for (int i = 0; i < a.Length; i++)
|
|
{
|
|
if (a[i] != b[i])
|
|
{
|
|
return false;
|
|
}
|
|
}
|
|
return true;
|
|
}
|
|
|
|
public static void AreArrayEqual(byte[] expected, byte[] actual, string message)
|
|
{
|
|
Assert.IsTrue(IsArrayEqual(expected, actual), message);
|
|
}
|
|
}
|
|
}
|