コード例 #1
0
        public void AscendingPriorityQueueGetValueTest()
        {
            AscendingPriorityQueue <int, int> priorityQueue = new AscendingPriorityQueue <int, int>();

            priorityQueue.Insert(3, 33);
            priorityQueue.Insert(2, 22);
            priorityQueue.Insert(1, 11);
            Assert.AreEqual(3, priorityQueue.Size);
            Assert.AreEqual(11, priorityQueue.GetValue(0));
            Assert.AreEqual(22, priorityQueue.GetValue(1));
            Assert.AreEqual(33, priorityQueue.GetValue(2));
            Assert.AreEqual(3, priorityQueue.Size);
        }
コード例 #2
0
        public void AscendingPriorityQueueGetValueGuardCase2Test()
        {
            AscendingPriorityQueue <int, int> priorityQueue = new AscendingPriorityQueue <int, int>();

            priorityQueue.Insert(1, 11);
            var result = priorityQueue.GetValue(1);
        }
コード例 #3
0
 public void AscendingPriorityQueueGetValueGuardCase3Test()
 {
     AscendingPriorityQueue <int, int> priorityQueue = new AscendingPriorityQueue <int, int>();
     var result = priorityQueue.GetValue(0);
 }