From 3cef0a39bc70308fd5a1fb3783c5f4ca716aca80 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Sun, 6 Dec 2009 09:32:19 +0000 Subject: I corrected a peculiar heap corner case that caused an infinite loop. --- src/tests/heap.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/tests') diff --git a/src/tests/heap.cpp b/src/tests/heap.cpp index b1f510a..9a2daf0 100644 --- a/src/tests/heap.cpp +++ b/src/tests/heap.cpp @@ -71,6 +71,8 @@ int main() Bu::Heap hStr; int j = 0; + hStr.enqueue("George"); + printHeap( hStr, j++ ); hStr.enqueue("George"); printHeap( hStr, j++ ); hStr.enqueue("Sam"); @@ -95,6 +97,7 @@ int main() Bu::List lStr; + lStr.insertSorted("George"); lStr.insertSorted("George"); lStr.insertSorted("Sam"); lStr.insertSorted("Abby"); -- cgit v1.2.3