Execute() public method

public Execute ( AbstractMachineState state ) : void
state AbstractMachineState
return void
        public void GetStructure()
        {
            AbstractMachineState state = SetupMachine();

            GetStructureInstruction i = new GetStructureInstruction();

            object[] args = { "s/2", "X0" };

            i.Process(args);

            i.Execute(state);

            Assert.AreEqual("get_structure", i.Name());
            Assert.AreEqual(2, i.NumberOfArguments());

            AbstractTerm X0 = ((AbstractTerm)state["X0"]).Dereference();

            Assert.AreEqual("s", X0.Name);
            Assert.AreEqual(2, X0.Arity);
        }