public void Evaluate_Negate_Bool_True_Test()
        {
            Expression expression = CreateBoolLiteral(false);

            Expression negate = new Negate(expression, pos);

            Values.Bool value = ((Values.Bool)negate.Accept(evaluator));

            Assert.IsTrue(value.GetValue());
        }
示例#2
0
        public void Evaluate_Negate_Bool_True_Test()
        {
            Expression expression = CreateBoolLiteral(false);

            Expression negate = new Negate(expression, pos);

            Values.Bool value = ((Values.Bool)negate.Accept(evaluator));

            Assert.IsTrue(value.GetValue());
        }
示例#3
0
        public override Value Visit(Negate node)
        {
            Value value = node.Accept(this);

            return(value.Negate());
        }