Пример #1
0
        private void Verify(string expected, string script)
        {
            var env    = new Environment();
            var result = new Interpreter().Interpret(script, "{test}", env);

            Assert.AreEqual(expected, result.ToString());
        }
Пример #2
0
        public void TestEnvSbyteGet()
        {
            const sbyte b   = 12;
            var         env = Environment.GetBaseEnvironment();

            env.Put("test", b);
            Assert.AreEqual(12, env.Get("test", null).AsInt().GetValue());
        }
Пример #3
0
        private void Verify(string expected, string script, string variable, object value)
        {
            var env = new Environment();

            env.Put(variable, value);
            var result = new Interpreter().Interpret(script, "{test}", env);

            Assert.AreEqual(expected, result.ToString());
        }