Branch Coverage

gzip-libdeflate-perl.c
Criterion Covered Total %
branch 45 118 38.1


line true false branch
51 6 0 for (i = 0; i < N_TYPES; i++) {
54 3 3 if (gl->t == b->value) {
64 36 0 if (type < 1 || type > 3) {
0 36 if (type < 1 || type > 3) {
68 0 36 MSG ("Setting type to %d", type);
81 36 0 if (level < 0 || level > 12) {
0 36 if (level < 0 || level > 12) {
85 0 36 MSG ("Setting level to %d", level);
92 0 149 if (! gl->init_ok) {
106 72 0 key = SvPV (key_sv, keyl);
107 0 72 MSG ("Handling key %s", key);
108 36 36 if (strcmp (key, "type") == 0) {
110 0 36 if (SvIOK (value_sv)) {
111 0 0 gl_set_type (gl, SvIV (value_sv));
114 36 0 value = SvPV (value_sv, valuel);
115 72 0 for (i = 0; i < 3; i++) {
118 48 24 if (valuel == b->namelen && strcmp (value, b->name) == 0) {
36 12 if (valuel == b->namelen && strcmp (value, b->name) == 0) {
126 36 0 if (strcmp (key, "level") == 0) {
127 36 0 if (SvIOK (value_sv)) {
128 36 0 gl_set_level (gl, SvIV (value_sv));
134 0 0 if (strcmp (key, "verbose") == 0) {
135 0 0 gl->verbose = !! SvTRUE (value_sv);
0 0 gl->verbose = !! SvTRUE (value_sv);
0 0 gl->verbose = !! SvTRUE (value_sv);
0 0 gl->verbose = !! SvTRUE (value_sv);
0 0 gl->verbose = !! SvTRUE (value_sv);
0 0 gl->verbose = !! SvTRUE (value_sv);
0 0 gl->verbose = !! SvTRUE (value_sv);
0 0 gl->verbose = !! SvTRUE (value_sv);
0 0 gl->verbose = !! SvTRUE (value_sv);
0 0 gl->verbose = !! SvTRUE (value_sv);
0 0 gl->verbose = !! SvTRUE (value_sv);
0 0 gl->verbose = !! SvTRUE (value_sv);
0 0 gl->verbose = !! SvTRUE (value_sv);
0 0 gl->verbose = !! SvTRUE (value_sv);
0 0 gl->verbose = !! SvTRUE (value_sv);
0 0 gl->verbose = !! SvTRUE (value_sv);
0 0 gl->verbose = !! SvTRUE (value_sv);
0 0 gl->verbose = !! SvTRUE (value_sv);
0 0 gl->verbose = !! SvTRUE (value_sv);
153 0 77 if (r == 0) {
173 37 0 if (! gl->c) {
175 0 37 if (! gl->c) {
181 37 0 in = SvPV (in_sv, in_len);
182 0 37 MSG ("Input buffer of length %d\n", in_len);
200 0 37 MSG ("Output buffer of length %d\n", out_nbytes);
207 0 13 MSG ("Compressing with gzip %p", gl->c);
220 0 37 MSG ("Finished compression, final length %d", r);
246 38 2 if (! gl->d) {
248 0 38 if (! gl->d) {
254 40 0 in = SvPV (in_sv, in_len);
259 0 24 if (size == 0) {
266 4 12 if (size == 0) {
278 0 40 if (r == 0) {
302 0 40 if (result != LIBDEFLATE_SUCCESS) {
315 0 38 MSG ("Freeing");
316 37 1 if (gl->c) {
320 38 0 if (gl->d) {