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

          Line data    Source code
       1             : #include "passgen/pattern/segment_item.h"
       2             : #include "passgen/config.h"
       3             : #include "passgen/pattern/group.h"
       4             : #include "passgen/pattern/set.h"
       5             : #include "passgen/pattern/special.h"
       6             : 
       7       72113 : void passgen_pattern_item_free(passgen_pattern_item *item) {
       8       72113 :     switch(item->kind) {
       9        3119 :         case PASSGEN_PATTERN_SET:
      10        3119 :             passgen_pattern_set_free(&item->data.set);
      11        3119 :             break;
      12        3121 :         case PASSGEN_PATTERN_GROUP:
      13        3121 :             passgen_pattern_group_free(&item->data.group);
      14        3121 :             break;
      15         137 :         case PASSGEN_PATTERN_SPECIAL:
      16         137 :             passgen_pattern_special_free(&item->data.special);
      17         137 :             break;
      18       65736 :         default:
      19       65736 :             break;
      20             :     }
      21             : 
      22       72113 :     PASSGEN_CLEAR(item);
      23       72113 : }
      24             : 
      25       72266 : void passgen_pattern_item_init(passgen_pattern_item *item) {
      26       72266 :     item->repeat.min = 1;
      27       72266 :     item->repeat.max = 1;
      28       72266 :     item->maybe = 0;
      29       72266 : }

Generated by: LCOV version 1.14