Execute() public method

public Execute ( AbstractMachineState state ) : void
state AbstractMachineState
return void
コード例 #1
0
        public void UnifyValue()
        {
            AbstractMachineState state = SetupMachine();

            UnifyValueInstruction i = new UnifyValueInstruction();

            object[] args = { "X0" };

            state.S = new ConstantTerm("ali");

            i.Process(args);
            i.Execute(state);

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

            Assert.AreEqual("unify_value", i.Name());
            Assert.AreEqual(1, i.NumberOfArguments());
            Assert.AreEqual("ali", X0.Data());
        }