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

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

Generated by: LCOV version 1.14