public override UInt64 Eval(Vars vars) { if (cond.Eval(vars) == 0) { return(trueExpr.Eval(vars)); } else { return(falseExpr.Eval(vars)); } }
public override UInt64 Eval(Vars vars) { vars.foldAccumulator = Start.Eval(vars); var bytes = BitConverter.GetBytes(Collection.Eval(vars)); foreach (var b in bytes) { vars.foldItem = b; vars.foldAccumulator = Func.Eval(vars); } return(vars.foldAccumulator); }
public void Eval(TestCase t) { var actual = Expr.Eval(t.Program, t.Arg); Assert.That(actual, Is.EqualTo(t.ExpectedValue), string.Format("Was: 0x{0:x}", actual)); }