public void AddRemoveValues(T[] items) { var list = new DoublyCircularLinkedList <T>(items); for (var i = 0; i < items.Length; i++) { list.Add(items[i]); list.Remove(items[i]); list.Add(items[i]); Assert.Contains(items[i], list); //"Should contain item." } }
// 동서남북에 있는 탑다운카메라리그를 리스트에 넣어줌 private void ListSetUp() { Transform[] transforms = GetComponentsInChildren <Transform>(); camList = new DoublyCircularLinkedList <Transform>(); for (int i = 1; i < transforms.Length; ++i) { camList.Add(transforms[i]); } iter = camList.front; }
public void ContainsNullWhenReference(T[] items, T value) { if ((object)value != null) { throw new ArgumentException("invalid argument passed to testcase"); } var list = new DoublyCircularLinkedList <T>(items); list.Add(value); Assert.Contains(value, list); //"Should contain item." }
public void MultipleValues(T[] items, int times) { var list = new DoublyCircularLinkedList <T>(items); for (var i = 0; i < times; i++) { list.Add(items[items.Length / 2]); } for (var i = 0; i < times + 1; i++) { Assert.Contains(items[items.Length / 2], list); //"Should contain item." list.Remove(items[items.Length / 2]); } Assert.DoesNotContain(items[items.Length / 2], list); //"Should not contain item" }