public void TestClear() { var queue = new TreeQueue <int>(branchingFactor: 3); queue.Clear(); Assert.Empty(queue); foreach (int item in Enumerable.Range(0, 10)) { queue.Enqueue(item); } Assert.NotEmpty(queue); queue.Clear(); Assert.Empty(queue); }
public void Reset() { TreeQueue.Clear(); CurrentRoseTree = null; TreeQueue.Push(new Lazy <RoseTree <T> >(() => OriginalTree)); }