Exemplo n.º 1
0
        public void Evaluate_Equal_String_False_Test()
        {
            Expression left = CreateStringLiteral("equal");
            Expression right = CreateStringLiteral("notEqual");

            Expression equal = new Equal(left, right, pos);

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

            Assert.IsFalse(value.GetValue());
        }
Exemplo n.º 2
0
        public void Evaluate_Equal_Bool_True_Test()
        {
            Expression left = CreateBoolLiteral(false);
            Expression right = CreateBoolLiteral(false);

            Expression equal = new Equal(left, right, pos);

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

            Assert.IsTrue(value.GetValue());
        }
Exemplo n.º 3
0
        public void Evaluate_Equal_Int_False_Test()
        {
            Expression left = CreateIntLiteral(1);
            Expression right = CreateIntLiteral(2);

            Expression equal = new Equal(left, right, pos);

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

            Assert.IsFalse(value.GetValue());
        }