Ejemplo n.º 1
0
        public void TestEvalOperationEvaluationContextFails()
        {
            OperationEvaluationContext ctx = CreateContext();

            ValueEval[] args   = new ValueEval[] { ctx.GetRefEval(0, 0), ctx.GetRefEval(0, 0) };
            ValueEval   result = new Hex2Dec().Evaluate(args, ctx);

            Assert.AreEqual(typeof(ErrorEval), result.GetType());
            Assert.AreEqual(ErrorEval.VALUE_INVALID, result);
        }
Ejemplo n.º 2
0
        public void TestEvalOperationEvaluationContext()
        {
            OperationEvaluationContext ctx = CreateContext();

            ValueEval[] args   = new ValueEval[] { ctx.GetRefEval(0, 0) };
            ValueEval   result = new Hex2Dec().Evaluate(args, ctx);

            Assert.AreEqual(typeof(NumberEval), result.GetType());
            Assert.AreEqual("0", ((NumberEval)result).StringValue);
        }