public void Poke_modifies_top_value() { var uut = new ThreadStack(); uut.Poke(Variable.One); var result = uut.Peek(); result.Should().Be(Variable.One); }
public void Peek_with_param_returns_the_item_offset_from_StackPointer() { var uut = new ThreadStack(); uut.Push(Variable.One); uut.Push(2); var result = uut.Peek(-2); result.Should().Be(Variable.One); }
public void Peek_returns_the_top_item() { var uut = new ThreadStack(); uut.Push(Variable.One); uut.Push(2); var result = uut.Peek(); result.Should().BeNull(); }
public void Poke_with_param_modifies_the_item_offset_from_StackPointer() { var uut = new ThreadStack(); uut.Push(Variable.One); uut.Push(2); uut.Poke(-2, 15); var result = uut.Peek(-2); result.GetInteger().Should().Be(15); }