public void TestConstants(string s) { var fs = FiniteString(s); var f = new ZenFunction <FiniteString>(() => fs); Assert.IsTrue(f.Assert(x => x == fs)); }
/// <summary> /// Check that the backends agree on the result. /// </summary> /// <param name="function">The function.</param> public static void CheckAgreement(Func <Zen <bool> > function) { foreach (var p in parameters) { var f = new ZenFunction <bool>(function); var result = f.Assert(o => Simplify(o, p), backend: p.Backend); Assert.AreEqual(f.Evaluate(), result); f.Compile(); Assert.AreEqual(f.Evaluate(), result); } }