public static void TestIntArithmetic()
        {
            var calculator = new Python3Calculator();
            var l = new Literal(3);
            var r = new Literal(5);
            var zero = new Literal(0);

            AssertEquals(calculator.Add(l, l).AsValue(), 6);
            AssertEquals(calculator.Add(l, r).AsValue(), 8);
            AssertEquals(calculator.Add(r, l).AsValue(), 8);
            AssertEquals(calculator.Add(r, r).AsValue(), 10);
            AssertEquals(calculator.Add(l, zero).AsValue(), 3);
            AssertEquals(calculator.Add(r, zero).AsValue(), 5);

            AssertEquals(calculator.Subtract(l, l).AsValue(), 0);
            AssertEquals(calculator.Subtract(l, r).AsValue(), -2);
            AssertEquals(calculator.Subtract(r, l).AsValue(), 2);
            AssertEquals(calculator.Subtract(r, r).AsValue(), 0);
            AssertEquals(calculator.Subtract(l, zero).AsValue(), 3);
            AssertEquals(calculator.Subtract(r, zero).AsValue(), 5);

            AssertEquals(calculator.Multiply(l, l).AsValue(), 9);
            AssertEquals(calculator.Multiply(l, r).AsValue(), 15);
            AssertEquals(calculator.Multiply(r, l).AsValue(), 15);
            AssertEquals(calculator.Multiply(r, r).AsValue(), 25);
            AssertEquals(calculator.Multiply(l, zero).AsValue(), 0);
            AssertEquals(calculator.Multiply(r, zero).AsValue(), 0);

            AssertEquals(calculator.Divide(l, l).AsValue(), 1);
            AssertEquals(calculator.Divide(l, r).AsValue(), 0);
            AssertEquals(calculator.Divide(r, l).AsValue(), 1);
            AssertEquals(calculator.Divide(r, r).AsValue(), 1);

            AssertException<DivideByZeroException>(() => calculator.Divide(l, zero));

            AssertEquals(calculator.Mod(l, r), l);
            AssertEquals(calculator.Mod(r, l).AsValue(), 2);
            AssertException<DivideByZeroException>(() => calculator.Mod(l, zero));
            AssertException<DivideByZeroException>(() => calculator.Mod(r, zero));
        }
        public static void TestIntFloatArithmetic()
        {
            var calculator = new Python3Calculator();
            var l = new Literal(3);
            var r = new Literal(5.0f);
            var zeroInt = new Literal(0);
            var zeroFloat = new Literal(0.0f);

            AssertEquals(calculator.Add(l, r).AsValue(), 8.0f);
            AssertEquals(calculator.Add(r, l).AsValue(), 8.0f);

            AssertEquals(calculator.Subtract(l, r).AsValue(), -2.0f);
            AssertEquals(calculator.Subtract(r, l).AsValue(), 2.0f);

            AssertEquals(calculator.Multiply(l, r).AsValue(), 15.0f);
            AssertEquals(calculator.Multiply(r, l).AsValue(), 15.0f);

            AssertEquals(calculator.Divide(l, r).AsValue(), 3 / 5.0f);
            AssertEquals(calculator.Divide(r, l).AsValue(), 5.0f / 3);

            AssertException<DivideByZeroException>(() => calculator.Divide(l, zeroFloat));
            AssertException<DivideByZeroException>(() => calculator.Divide(r, zeroInt));

            AssertEquals(calculator.Mod(l, r).AsValue(), 3.0f);
            AssertEquals(calculator.Mod(r, l).AsValue(), 2.0f);
            AssertException<DivideByZeroException>(() => calculator.Mod(l, zeroFloat));
            AssertException<DivideByZeroException>(() => calculator.Mod(r, zeroInt));
        }
        public static void TestBooleanArithmetic()
        {
            var calculator = new Python3Calculator();
            var t = new Literal(true);
            var f = new Literal(false);

            AssertEquals(calculator.Add(t, t).AsValue(), 2);
            AssertEquals(calculator.Add(t, f).AsValue(), 1);
            AssertEquals(calculator.Add(f, t).AsValue(), 1);
            AssertEquals(calculator.Add(f, f).AsValue(), 0);

            AssertEquals(calculator.Subtract(t, t).AsValue(), 0);
            AssertEquals(calculator.Subtract(t, f).AsValue(), 1);
            AssertEquals(calculator.Subtract(f, t).AsValue(), -1);
            AssertEquals(calculator.Subtract(f, f).AsValue(), 0);

            AssertEquals(calculator.Multiply(t, t).AsValue(), 1);
            AssertEquals(calculator.Multiply(t, f).AsValue(), 0);
            AssertEquals(calculator.Multiply(f, t).AsValue(), 0);
            AssertEquals(calculator.Multiply(f, f).AsValue(), 0);

            AssertEquals(calculator.Divide(t, t).AsValue(), 1);
            AssertEquals(calculator.Divide(f, t).AsValue(), 0);

            AssertException<DivideByZeroException>(() => calculator.Divide(f, f));
            AssertException<DivideByZeroException>(() => calculator.Divide(t, f));

            AssertEquals(calculator.Mod(t, t), new Literal(0));
            AssertEquals(calculator.Mod(f, t), f);
            AssertException<DivideByZeroException>(() => calculator.Mod(f, f));
            AssertException<DivideByZeroException>(() => calculator.Mod(t, f));
        }