diff options
author | Christian Grothoff <christian@grothoff.org> | 2010-09-03 21:20:41 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2010-09-03 21:20:41 +0000 |
commit | 1c07f1fdcb46dece710954411547520128fce94c (patch) | |
tree | 3f2d7917004785267c8053d8f055e8b680354a2e /src/util/test_container_heap.c | |
parent | 114f589c0593d9c2c311fd8c22a45e44f52fcf38 (diff) | |
download | gnunet-1c07f1fdcb46dece710954411547520128fce94c.tar.gz gnunet-1c07f1fdcb46dece710954411547520128fce94c.zip |
nitpicks
Diffstat (limited to 'src/util/test_container_heap.c')
-rw-r--r-- | src/util/test_container_heap.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/util/test_container_heap.c b/src/util/test_container_heap.c index bb5b68a72..091e42ce1 100644 --- a/src/util/test_container_heap.c +++ b/src/util/test_container_heap.c | |||
@@ -49,6 +49,7 @@ check () | |||
49 | struct GNUNET_CONTAINER_HeapNode *n6; | 49 | struct GNUNET_CONTAINER_HeapNode *n6; |
50 | struct GNUNET_CONTAINER_HeapNode *n7; | 50 | struct GNUNET_CONTAINER_HeapNode *n7; |
51 | struct GNUNET_CONTAINER_HeapNode *n8; | 51 | struct GNUNET_CONTAINER_HeapNode *n8; |
52 | const char *r; | ||
52 | 53 | ||
53 | myHeap = GNUNET_CONTAINER_heap_create (GNUNET_CONTAINER_HEAP_ORDER_MIN); | 54 | myHeap = GNUNET_CONTAINER_heap_create (GNUNET_CONTAINER_HEAP_ORDER_MIN); |
54 | 55 | ||
@@ -101,14 +102,19 @@ check () | |||
101 | n6 = GNUNET_CONTAINER_heap_insert (myHeap, "30/200", 30); | 102 | n6 = GNUNET_CONTAINER_heap_insert (myHeap, "30/200", 30); |
102 | GNUNET_assert (5 == GNUNET_CONTAINER_heap_get_size (myHeap)); | 103 | GNUNET_assert (5 == GNUNET_CONTAINER_heap_get_size (myHeap)); |
103 | GNUNET_CONTAINER_heap_remove_node (myHeap, n5); | 104 | GNUNET_CONTAINER_heap_remove_node (myHeap, n5); |
105 | r = GNUNET_CONTAINER_heap_remove_root (myHeap); /* n1 */ | ||
106 | GNUNET_assert (NULL != r); | ||
104 | GNUNET_assert (0 == strcmp ("11", | 107 | GNUNET_assert (0 == strcmp ("11", |
105 | GNUNET_CONTAINER_heap_remove_root (myHeap))); /* n1 */ | 108 | r)); |
106 | GNUNET_CONTAINER_heap_update_cost (myHeap, n6, 200); | 109 | GNUNET_CONTAINER_heap_update_cost (myHeap, n6, 200); |
107 | GNUNET_CONTAINER_heap_remove_node (myHeap, n3); | 110 | GNUNET_CONTAINER_heap_remove_node (myHeap, n3); |
111 | r = GNUNET_CONTAINER_heap_remove_root (myHeap); /* n4 */ | ||
112 | GNUNET_assert (NULL != r); | ||
108 | GNUNET_assert (0 == strcmp ("50", | 113 | GNUNET_assert (0 == strcmp ("50", |
109 | GNUNET_CONTAINER_heap_remove_root (myHeap))); /* n4 */ | 114 | r)); |
110 | GNUNET_assert (0 == strcmp ("30/200", | 115 | r = GNUNET_CONTAINER_heap_remove_root (myHeap); /* n6 */ |
111 | GNUNET_CONTAINER_heap_remove_root (myHeap))); /* n6 */ | 116 | GNUNET_assert (NULL != r); |
117 | GNUNET_assert (0 == strcmp ("30/200", r)); | ||
112 | GNUNET_assert (0 == GNUNET_CONTAINER_heap_get_size (myHeap)); | 118 | GNUNET_assert (0 == GNUNET_CONTAINER_heap_get_size (myHeap)); |
113 | 119 | ||
114 | GNUNET_CONTAINER_heap_destroy (myHeap); | 120 | GNUNET_CONTAINER_heap_destroy (myHeap); |