Axiom.Runtime.Instructions.DeallocateInstruction.Name C# (CSharp) Method

Name() public method

public Name ( ) : string
return string
        public override string Name()
        {
            return "deallocate";
        }

Usage Example

        public void Deallocate()
        {
            AbstractMachineState state = SetupMachine();
            AMProgram program = (AMProgram)state.Program;

            ProgramNode CP = new ProgramNode();
            EnvironmentFrame env = new EnvironmentFrame();
            state.E = new EnvironmentFrame(env, CP, 2);

            DeallocateInstruction i = new DeallocateInstruction();

            i.Execute(state);

            Assert.AreEqual("deallocate", i.Name());
            Assert.AreEqual(0, i.NumberOfArguments());
            Assert.AreSame(CP, program.CP);
            Assert.AreSame(env, state.E);
        }