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

CompileSetMethod() private method

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

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