Files
ParkingRobot/ClumsyPilot/tests/EMPlannerVerificationHost/Verification.cs
T

19 lines
573 B
C#

using System;
namespace EMPlannerVerificationHost;
internal static class Verification
{
public static void Equal<T>(T expected, T actual, string name)
{
if (!Equals(expected, actual))
throw new InvalidOperationException(name + " expected " + expected + " but was " + actual + ".");
}
public static void NearlyEqual(double expected, double actual, string name)
{
if (Math.Abs(expected - actual) > 1e-12d)
throw new InvalidOperationException(name + " expected " + expected + " but was " + actual + ".");
}
}