Process() public method

public Process ( object arguments ) : void
arguments object
return void
        public void CallVar()
        {
            AbstractMachineState state = SetupMachine();

            CallVariableInstruction i = new CallVariableInstruction();

            i.Process(new string [] { "X0" });

            AMProgram program = (AMProgram)state.Program;

            ProgramClause x = new ProgramClause("male", 1);

            program.AddLabel("male/1", x);

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

            StructureTerm s = new StructureTerm("male", 1);
            s.Next = new ConstantTerm("ali");

            X0.Assign(s);

            i.Execute(state);

            Assert.AreSame(program.P, x);
            Assert.AreEqual("callvar", i.Name());
            Assert.AreEqual(1, i.NumberOfArguments());
        }