// Check the remove functionality of the CPriorityQueue<Tschar>. void UT_ASSERT_CHECK_REMOVE(CPriorityQueue<Tschar>& a_rPriorityQueue) { CALL Tuint priority = 1; Tschar value = ASC('A'); CPriorityQueue<Tschar>::TIterator it = a_rPriorityQueue.getItLast(); while (it.isValid()) { UT_ASSERT((it.getPriorityRef() == priority++) && (*it == value++)); UT_ASSERT(it.remove()); } UT_ASSERT((priority == 10) && (value == ASC('J'))); }
// Check the show functionality of the CPriorityQueue<Tschar>. void UT_ASSERT_CHECK_SHOW(const CPriorityQueue<Tschar>& a_crPriorityQueue) { CALL Tuint priority = 1; Tschar value = ASC('A'); CPriorityQueue<Tschar>::TIteratorConst it = a_crPriorityQueue.getItLast(); if (it.isValid()) { do { UT_ASSERT((it.getPriorityRef() == priority++) && (*it == value++)); } while (it.stepBackward() == 1); } UT_ASSERT((priority == 10) && (value == ASC('J'))); }