예제 #1
0
        protected void ExpressionsAreEquivalent(string a, string b)
        {
            var expA = UScheme.Eval(Parser.Parse(a), initialEnv);
            var expB = UScheme.Eval(Parser.Parse(b), initialEnv);

            Assert.IsTrue(expA.UEquals(expB));
        }
예제 #2
0
        public void OrReturnsLastTrueExpression(string expression, string expectedString)
        {
            var expected = UScheme.Eval(Parser.Parse(expectedString), initialEnv);

            WhenEvaluating(expression);
            ThenResultIsExp(expected);
        }
예제 #3
0
 protected void WhenEvaluating(string str)
 {
     evalResult = UScheme.Eval(Parser.Parse(str), initialEnv);
 }
예제 #4
0
        public void EvalConstant()
        {
            var exp = UScheme.Eval(Number1, Env.Global);

            Assert.AreSame(Number1, exp);
        }