private void Verify(string expected, string script) { var env = new Environment(); var result = new Interpreter().Interpret(script, "{test}", env); Assert.AreEqual(expected, result.ToString()); }
public void TestEnvSbyteGet() { const sbyte b = 12; var env = Environment.GetBaseEnvironment(); env.Put("test", b); Assert.AreEqual(12, env.Get("test", null).AsInt().GetValue()); }
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()); }