public void TestForAppealingByAddress2() { LM3 aLM3 = new LM3(String.Empty); Variable aVariable = new Variable(new BigInteger(23).ToString()); aLM3.SetCellByAddress("213", aVariable); Assert.AreSame(aVariable, aLM3.GetMemorySection().GetCellByAddress("213")); }
public void SetAndGetCellNameMethods() { LM3Memory memory = new LM3Memory(); Variable var = new Variable("10"); memory.SetCellByAddress("0100", var); memory.SetCellNameByAddress("0100", "X"); Assert.AreEqual("X", memory.GetCellNameByAddress("0100")); }
public void SetAndGetCellMethods() { LM3Memory memory = new LM3Memory(); //EmptyCell cell = new EmptyCell(); Variable var = new Variable("10"); memory.SetCellByAddress("0100", var); Assert.AreEqual(var, memory.GetCellByAddress("0100")); }
public void SetAndGetCellPositionMethods() { LM3Memory memory = new LM3Memory(); Variable var = new Variable("10"); CommandPosition position = new CommandPosition(10, 2, 5); memory.SetCellByAddress("0100", var); memory.SetCellNameByAddress("0100", "X"); memory.SetCellPositionByAddress("0100", position); Assert.AreEqual(position, memory.GetCellPositionByAddress("0100")); }