public void ExecuteDefineRectangleFile()
{
Loader loader = new Loader(@"DefineRectangle.st", new VmCompiler());
Machine machine = CreateMachine();
Assert.IsNull(machine.GetGlobalObject("Rectangle"));
loader.LoadAndExecute(machine);
object obj = machine.GetGlobalObject("Rectangle");
Assert.IsNotNull(obj);
Assert.IsInstanceOfType(obj, typeof(IClass));
IClass cls = (IClass)obj;
Assert.AreEqual(0, cls.GetInstanceVariableOffset("x"));
Assert.AreEqual(1, cls.GetInstanceVariableOffset("y"));
Assert.AreEqual(2, cls.GetInstanceVariableOffset("width"));
Assert.AreEqual(3, cls.GetInstanceVariableOffset("height"));
Assert.IsNotNull(cls.GetInstanceMethod("x"));
Assert.IsNotNull(cls.GetInstanceMethod("x:"));
Assert.IsNotNull(cls.GetInstanceMethod("y"));
Assert.IsNotNull(cls.GetInstanceMethod("y:"));
}