Example #1
0
        public void RemoveMinimumTest()
        {
            BinaryHeap <int, int> heap = BinaryHeapFactory.ExampleHeap01();

            heap.RemoveMinimum();
            Assert.AreEqual(14, heap.Count);
            heap.AssertInvariants();
        }
Example #2
0
        public void UpdateTest()
        {
            BinaryHeap <int, int> heap = BinaryHeapFactory.ExampleHeap01();

            heap.Update(1, 4);
            Assert.AreEqual(15, heap.Count);
            heap.AssertInvariants();
        }