Ejemplo n.º 1
0
        public void MetaOperatorNew()
        {
            object rez = Script.RunCode("<! 1+1; !>;");

            Assert.IsType <ScriptProg>(rez);

            ScriptAst prog = (ScriptAst)rez;
            object    rez1 = prog.Execute(new ScriptContext());

            Assert.Equal(2, rez1);
        }
Ejemplo n.º 2
0
        public void MetaOperatorNew()
        {
            object rez = Script.RunCode("<! 1+1; !>;");

            ///Should be ScriptProg
            Assert.IsInstanceOfType(rez, typeof(ScriptAst));

            ScriptAst prog = (ScriptAst)rez;
            object    rez1 = prog.Execute(new ScriptContext());

            Assert.AreEqual(2, rez1);
        }