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

          Line data    Source code
       1             : #include "passgen/pattern/literal.h"
       2             : 
       3       65548 : void passgen_pattern_literal_init(passgen_pattern_literal *literal) {
       4       65548 :     literal->count = 0;
       5       65548 :     literal->tainted = 0;
       6       65548 : }
       7             : 
       8        4232 : void passgen_pattern_literal_taint(passgen_pattern_literal *literal) {
       9        4232 :     literal->tainted = 1;
      10        4232 : }
      11             : 
      12      331968 : int passgen_pattern_literal_append(
      13             :     passgen_pattern_literal *literal,
      14             :     uint32_t codepoint) {
      15      331968 :     if(literal->count >= 7 || literal->tainted) {
      16       29565 :         return 1;
      17             :     }
      18             : 
      19      302403 :     literal->codepoints[literal->count] = codepoint;
      20      302403 :     literal->count += 1;
      21             : 
      22      302403 :     return 0;
      23             : }

Generated by: LCOV version 1.14