LibHac/tests/LibHac.Tests/ResultAsserts.cs

24 lines
519 B
C#
Raw Normal View History

using LibHac;
using Xunit.Sdk;
// ReSharper disable once CheckNamespace
2021-11-14 20:08:57 +01:00
namespace Xunit;
public partial class Assert
{
2021-11-14 20:08:57 +01:00
public static void Success(Result result)
{
2021-11-14 20:08:57 +01:00
Equal(LibHac.Result.Success, result);
}
2021-11-14 20:08:57 +01:00
public static void Failure(Result result)
{
NotEqual(LibHac.Result.Success, result);
}
2021-11-14 20:08:57 +01:00
public static void Result(Result.Base expected, Result actual)
{
if (!expected.Includes(actual))
throw new EqualException(expected.Value, actual);
}
}