public void LoadObject()
{
Machine machine = CreateMachine();
Loader loader = new Loader(@"Object.st", new VmCompiler());
loader.LoadAndExecute(machine);
loader = new Loader(@"ObjectTest.st", new VmCompiler());
loader.LoadAndExecute(machine);
object obj = machine.GetGlobalObject("Object");
Assert.IsNotNull(obj);
Assert.IsInstanceOfType(obj, typeof(IClass));
IClass cls = (IClass)obj;
Assert.IsNotNull(cls.GetClassMethod("new"));
Assert.IsNotNull(cls.GetClassMethod("basicNew"));
object result = machine.GetGlobalObject("result");
Assert.IsNotNull(result);
Assert.IsInstanceOfType(result, typeof(IObject));
Assert.AreEqual(cls, ((IObject)result).Behavior);
object rcls = machine.GetGlobalObject("resultclass");
Assert.AreEqual(cls, rcls);
Assert.AreEqual(true, machine.GetGlobalObject("aresame"));
Assert.AreEqual(false, machine.GetGlobalObject("arenotsame"));
Assert.AreEqual(true, machine.GetGlobalObject("areequal"));
Assert.AreEqual(false, machine.GetGlobalObject("arenotequal"));
Assert.AreEqual(false, machine.GetGlobalObject("notaresame"));
Assert.AreEqual(true, machine.GetGlobalObject("notarenotsame"));
Assert.AreEqual(false, machine.GetGlobalObject("notareequal"));
Assert.AreEqual(true, machine.GetGlobalObject("notarenotequal"));
}