public static TALinkedList NewList(int depth) { if (depth == 0) { return null; } var head = new TALinkedList (depth); head.next = NewList(depth - 1); return head; }
public static TALinkedList NewList(int depth) { if (depth == 0) { return(null); } var head = new TALinkedList (depth); head.next = NewList(depth - 1); return(head); }
/// <exception cref="System.Exception"></exception> public virtual void TestDeactivateDepth() { TALinkedListItem item = (TALinkedListItem)RetrieveOnlyInstance(); TALinkedList list = item.List(); TALinkedList next3 = list.NextN(3); TALinkedList next5 = list.NextN(5); Assert.IsNotNull(next3.Next()); Assert.IsNotNull(next5.Next()); Db().Deactivate(list, 4); Assert.IsNull(list.next); Assert.AreEqual(0, list.value); // FIXME: test fails if uncomenting the following assertion. // Assert.isNull(next3.next); Assert.IsNotNull(next5.next); }
private TALinkedList NewList() { return(TALinkedList.NewList(10)); }