public Execute ( AbstractMachineState state ) : void | ||
state | AbstractMachineState | |
Результат | void |
public void GetVariable() { AbstractMachineState state = SetupMachine(); GetVariableInstruction i = new GetVariableInstruction(); object[] args = { "X1", "X0" }; i.Process(args); AbstractTerm X0 = (AbstractTerm)state["X0"]; AbstractTerm X1 = (AbstractTerm)state["X1"]; X0.Assign(new ConstantTerm("ali")); i.Execute(state); Assert.AreEqual("get_variable", i.Name()); Assert.AreEqual(2, i.NumberOfArguments()); Assert.AreEqual(X1.Data(), "ali"); }