aboutsummaryrefslogtreecommitdiffstats
path: root/test/testheap.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/testheap.c')
-rw-r--r--test/testheap.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/testheap.c b/test/testheap.c
index 2740f8a9e..d71b5563c 100644
--- a/test/testheap.c
+++ b/test/testheap.c
@@ -47,7 +47,7 @@ static void heap1_execute(void) {
chHeapFree(p1); /* Does not merge */
chHeapFree(p2); /* Merges backward */
chHeapFree(p3); /* Merges both sides */
- test_assert(chHeapStatus(&n) == 1, "#1"); /* Heap fragmented.*/
+ test_assert(1, chHeapStatus(&n) == 1, "heap fragmented");
/* Reverse order */
p1 = chHeapAlloc(SIZE);
@@ -56,26 +56,26 @@ static void heap1_execute(void) {
chHeapFree(p3); /* Merges forward */
chHeapFree(p2); /* Merges forward */
chHeapFree(p1); /* Merges forward */
- test_assert(chHeapStatus(&n) == 1, "#2"); /* Heap fragmented.*/
+ test_assert(2, chHeapStatus(&n) == 1, "heap fragmented");
/* Small fragments handling */
p1 = chHeapAlloc(SIZE + 1);
p2 = chHeapAlloc(SIZE);
chHeapFree(p1);
- test_assert(chHeapStatus(&n) == 2, "#3"); /* Heap must contain 2 blocks.*/
+ test_assert(3, chHeapStatus(&n) == 2, "invalid state");
p1 = chHeapAlloc(SIZE);
- test_assert(chHeapStatus(&n) == 1, "#4"); /* Heap fragmented.*/
+ test_assert(4, chHeapStatus(&n) == 1, "heap fragmented");
chHeapFree(p2);
chHeapFree(p1);
/* Allocate all handling */
(void)chHeapStatus(&n);
p1 = chHeapAlloc(n);
- test_assert(chHeapStatus(&n) == 0, "#5"); /* Heap must be empty.*/
+ test_assert(5, chHeapStatus(&n) == 0, "not empty");
chHeapFree(p1);
- test_assert(chHeapStatus(&n) == 1, "#6"); /* Heap fragmented.*/
- test_assert(n == sz, "#7"); /* Heap size changed.*/
+ test_assert(6, chHeapStatus(&n) == 1, "heap fragmented");
+ test_assert(7, n == sz, "size changed");
}
else {
test_print("--- Size : ");