public void Compile()
{
Machine machine = new Machine();
IClass cls = machine.CreateClass("TestClass");
cls.DefineClassVariable("count");
cls.DefineInstanceVariable("x");
Method mth;
mth = new Method(cls, "x:");
mth.CompileArgument("newX");
mth.CompileGet("newX");
mth.CompileSet("x");
cls.DefineInstanceMethod(mth);
Assert.AreEqual(mth, cls.GetInstanceMethod("x:"));
Assert.AreEqual("x", mth.GetInstanceVariableName(0));
}