NumberOfArguments() public method

public NumberOfArguments ( ) : int
return int
        public void PutStructure()
        {
            AbstractMachineState state = SetupMachine();

            PutStructureInstruction i = new PutStructureInstruction();

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

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

            i.Process(args);

            i.Execute(state);

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

            Assert.IsTrue(H.IsStructure);
            Assert.AreEqual(2, H.Arity);
            Assert.AreEqual("s", H.Name);

            AbstractTerm X0 = (AbstractTerm)state["X0"];
            Assert.AreSame(H.Dereference(), X0.Dereference());

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