AjTalk.Tests.Compiler.ParserTests.CompileMethodWithLocals C# (CSharp) Method

CompileMethodWithLocals() private method

private CompileMethodWithLocals ( ) : void
return void
        public void CompileMethodWithLocals()
        {
            Machine machine = new Machine();
            IClass cls = machine.CreateClass("Rectangle");
            cls.DefineInstanceVariable("x");
            Parser compiler = new Parser("x | temp | temp := x. ^temp");
            var method = compiler.CompileInstanceMethod(cls);

            Assert.IsNotNull(method);
            Assert.AreEqual("x", method.Name);
            Assert.IsNotNull(method.ByteCodes);
        }
ParserTests