LCOV - code coverage report
Current view: top level - src/pattern - set.c (source / functions) Hit Total Coverage
Test: passgen-test.info Lines: 12 12 100.0 %
Date: 2024-04-26 06:05:40 Functions: 4 4 100.0 %

          Line data    Source code
       1             : #include "passgen/pattern/set.h"
       2             : #include "passgen/pattern/range.h"
       3             : #include <stdlib.h>
       4             : 
       5        3146 : void passgen_pattern_set_init(passgen_pattern_set *set) {
       6        3146 :     passgen_stack_init(&set->items, sizeof(passgen_pattern_range));
       7             : 
       8        3146 :     set->choices_list = NULL;
       9        3146 : }
      10             : 
      11        3146 : void passgen_pattern_set_free(passgen_pattern_set *set) {
      12        3146 :     passgen_stack_free(&set->items);
      13             : 
      14        3146 :     free(set->choices_list);
      15        3146 : }
      16             : 
      17             : passgen_pattern_range *
      18       19627 : passgen_pattern_set_range_append(passgen_pattern_set *set) {
      19       19627 :     return passgen_stack_push(&set->items, NULL);
      20             : }
      21             : 
      22             : passgen_pattern_range *
      23           8 : passgen_pattern_set_range_get(passgen_pattern_set *set, size_t n) {
      24           8 :     return passgen_stack_get(&set->items, n);
      25             : }

Generated by: LCOV version 1.14