Пример #1
0
 public override UInt64 Eval(Vars vars)
 {
     if (cond.Eval(vars) == 0)
     {
         return(trueExpr.Eval(vars));
     }
     else
     {
         return(falseExpr.Eval(vars));
     }
 }
Пример #2
0
        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);
        }
Пример #3
0
        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));
        }