C5UnitTests.heaps.IntervalHeapTests.Bug20130208 C# (CSharp) Method

Bug20130208() private method

private Bug20130208 ( ) : void
return void
        public void Bug20130208()
        {
            IPriorityQueue<double> q = new IntervalHeap<double>();
            IPriorityQueueHandle<double> h0 = null, h2 = null, h4 = null, h7 = null, h5 = null;
            // Add(43, 0);
            q.Add(ref h0, 43);
            // Remove();
            q.DeleteMin();
            // XAddMaxReplace(9, 2);
            q.Add(ref h2, Double.MaxValue);
            q[h2] = 9;
            // XAddMaxReplace(32, 4);
            q.Add(ref h4, Double.MaxValue);
            q[h4] = 32;
            // XAddMaxReplace(44, 7);
            q.Add(ref h7, Double.MaxValue);
            q[h7] = 44;
            // Remove();
            q.DeleteMin();
            // XAddMaxReplace(0, 5);
            q.Add(ref h5, Double.MaxValue);
            q[h5] = 0;
            // Internally inconsistent data structure already now
            Assert.IsTrue(q.Check());
        }