public void TrimExcess_Usunięcie10p_Komórek() { stos = new StosWTablicy <char>(); for (int i = 0; i < 100; i++) { stos.Push(RandomElement); } stos.TrimExcess(); int ss = stos.Count; Assert.AreEqual(90, ss); }
public void TrimExcess(int d) { stos = new StosWTablicy <char>(); for (int i = 0; i < d; i++) { stos.Push(RandomElement); } stos.TrimExcess(); int l = stos.Count + (int)Math.Floor(stos.Count * 0.1); Assert.AreEqual(stos.Lenght, l); }
public void TrimExcessWTablicy() { stos = new StosWTablicy <char>(); for (int i = 0; i < 142; i++) { stos.Push(RandomElement); } stos.TrimExcess(); Assert.AreEqual(127, stos.Count); }
public void TrimExcess() { stos = new StosWTablicy <char>(); stos.Push(RandomElement); stos.Push(RandomElement); stos.Push(RandomElement); stos.Push(RandomElement); stos.Clear(); stos.TrimExcess(); Assert.AreEqual(0, stos.Count); }