Exemplo n.º 1
0
        public void AndsBooleans()
        {
            OpAND band1 = new OpAND(new BooleanLiteralNode("true"), new BooleanLiteralNode("true"));

            Assert.AreEqual(true, band1.GetValue(null, null));

            OpAND band2 = new OpAND(new BooleanLiteralNode("true"), new BooleanLiteralNode("false"));

            Assert.AreEqual(false, band2.GetValue(null, null));
        }
Exemplo n.º 2
0
        public void AndsNumbers()
        {
            OpAND band = new OpAND(new IntLiteralNode("2"), new IntLiteralNode("3"));

            Assert.AreEqual(2 & 3, band.GetValue(null, null));
        }