Coverage Report

Created: 2026-11-10 14:14

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
src/list.c
Line
Count
Source
1
#include "prism/internal/list.h"
2
3
/**
4
 * Returns the size of the list.
5
 */
6
size_t
7
53.3k
pm_list_size(pm_list_t *list) {
8
53.3k
    return list->size;
9
53.3k
}
10
11
/**
12
 * Append a node to the given list.
13
 */
14
void
15
491k
pm_list_append(pm_list_t *list, pm_list_node_t *node) {
16
491k
    if (list->head == NULL) {
  Branch (16:9): [True: 33.5k, False: 457k]
17
33.5k
        list->head = node;
18
457k
    } else {
19
457k
        list->tail->next = node;
20
457k
    }
21
22
491k
    list->tail = node;
23
491k
    list->size++;
24
491k
}