feat: add EM planner contracts
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
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 + ".");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user