public GetInstanceVariableOffset ( string name ) : int | ||
name | string | |
Результат | int |
public void GetInstanceVariableOffsetWithOuter() { Machine machine = new Machine(); IClass cls = machine.CreateClass("TestClass"); cls.DefineInstanceVariable("x"); Method method = new Method(cls, "mymethod"); Block block = new Block("x", method); Assert.AreEqual(0, block.GetInstanceVariableOffset("x")); }
public void GetInstanceVariableOffset() { Block block = new Block(); Assert.AreEqual(-1, block.GetInstanceVariableOffset("x")); }