public void UnifyVariable() { AbstractMachineState state = SetupMachine(); state.IsReadMode = true; AbstractTerm sVar = new AbstractTerm(); state.S = sVar; UnifyVariableInstruction i = new UnifyVariableInstruction(); object[] args = { "X0" }; i.Process(args); i.Execute(state); Assert.AreEqual("unify_variable", i.Name()); Assert.AreEqual(1, i.NumberOfArguments()); AbstractTerm X0 = ((AbstractTerm)state["X0"]).Dereference(); Assert.AreSame(X0.Dereference(), sVar); Assert.IsNull(state.S); }