public void Pop_decrements_StackPointer() { var uut = new ThreadStack(); uut.Push(Variable.One); uut.Pop(); uut.StackPointer.Should().Be(0); }
public void Pop_with_param_decrements_StackPointer_by_same_value() { var uut = new ThreadStack(); uut.Push(Variable.One); uut.Push(2); uut.Pop(2); uut.StackPointer.Should().Be(0); }
public void Can_Pop_a_pushed_item() { var uut = new ThreadStack(); uut.Push(Variable.One); var result = uut.Pop(); result.Should().Be(Variable.One); }
public void Pop_with_param_returns_the_correct_item() { var uut = new ThreadStack(); uut.Push(Variable.One); uut.Push(2); var result = uut.Pop(2); result.Should().Be(Variable.One); }