public void CompileWithLocals()
{
Machine machine = new Machine();
IClass cls = machine.CreateClass("TestClass");
cls.DefineInstanceVariable("x");
Method mth;
mth = new Method(cls, "x:");
mth.CompileArgument("newX");
mth.CompileLocal("l");
mth.CompileGet("newX");
mth.CompileSet("l");
mth.CompileGet("l");
mth.CompileSet("x");
cls.DefineInstanceMethod(mth);
Assert.AreEqual(mth, cls.GetInstanceMethod("x:"));
}