Example #1
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());
        }
 public Interpreter(bool secure = true, bool legacy = true)
 {
     baseEnvironment = Environment.GetBaseEnvironment(secure, legacy);
     environment     = baseEnvironment.NewEnv();
     baseEnvironment.Put("stdout", new ValueOutput(new StringWriter()));
     baseEnvironment.Put("stdin", new ValueInput(new StringReader("")));
     if (!secure)
     {
         baseEnvironment.Put("run", new FuncRun(this));
     }
 }