Branch Coverage

perlsubs.c
Criterion Covered Total %
branch 93 212 43.8


line true false branch
17 0 1607 if (Matrix == NULL) return &PL_sv_undef;
20 0 1607 if (Matrix->values == NULL) { free(Matrix); return NULL; }
38 1607 0 gf2_matrix_t *m=(gf2_matrix_t*)SvIV(SvRV(Self));
39 1607 0 if (m->alloc_bits & 1)
41 1607 0 if (m->alloc_bits & 2)
47 4124 0 return ((gf2_matrix_t*)SvIV(SvRV(Self)))->rows;
51 14781 0 return ((gf2_matrix_t*)SvIV(SvRV(Self)))->cols;
55 5260 0 return ((gf2_matrix_t*)SvIV(SvRV(Self)))->width;
59 2602 0 return ((gf2_matrix_t*)SvIV(SvRV(Self)))->organisation;
63 41070 0 gf2_matrix_t *m=(gf2_matrix_t*)SvIV(SvRV(Self));
72 41070 0 if ((row < 0) || (row >= m->rows)) {
0 41070 if ((row < 0) || (row >= m->rows)) {
76 41070 0 if ((col < 0) || (col >= m->cols)) {
0 41070 if ((col < 0) || (col >= m->cols)) {
98 30436 0 gf2_matrix_t *m=(gf2_matrix_t*)SvIV(SvRV(Self));
107 30436 0 if ((row < 0) || (row >= m->rows)) {
0 30436 if ((row < 0) || (row >= m->rows)) {
112 30436 0 if ((col < 0) || (col >= m->cols)) {
0 30436 if ((col < 0) || (col >= m->cols)) {
154 14 0 gf2_matrix_t *self = (gf2_matrix_t*) SvIV(SvRV(Self));
155 14 0 gf2_matrix_t *xform = (gf2_matrix_t*) SvIV(SvRV(Transform));
156 14 0 gf2_matrix_t *result = (gf2_matrix_t*) SvIV(SvRV(Result));
171 2 12 if ((self->width == 1) && (iright == 1) &&
2 0 if ((self->width == 1) && (iright == 1) &&
2 0 if ((self->width == 1) && (iright == 1) &&
173 2 0 ((tright == 1) && (odown == 1)) /* combine */
174 0 2 || ((tdown == 1) && (oright == 1)) /* split */
0 0 || ((tdown == 1) && (oright == 1)) /* split */
180 0 0 if ((tright == 1) && (odown == 1)) {
0 0 if ((tright == 1) && (odown == 1)) {
185 0 0 for (r=0,
190 0 0 for (c=0,
195 0 0 for (v=0,
210 0 0 for (r=0,
215 0 0 for (c=0,
220 0 0 for (v=0,
242 16 2 for (r=0,
247 128 16 for (c=0,
252 896 128 for (v=0,
274 28 6 for (r=0,
279 144 28 for (c=0,
284 688 144 for (v=0,
297 28 6 for (r=0,
302 144 28 for (c=0,
307 688 144 for (v=0,
328 470 0 gf2_matrix_t *this = (gf2_matrix_t*) SvIV(SvRV(This));
329 470 0 gf2_matrix_t *that = (gf2_matrix_t*) SvIV(SvRV(That));
338 465 5 if (this->organisation == that->organisation) {
340 5321 255 for (i=this->rows * this->cols * this->width;
343 210 5111 if (*thisp != *thatp) return 0;
351 18 4 for (i=0;
356 68 17 for (j=0;
363 0 0 if (*thisp++ != *thatp++) return 0;
364 0 0 if (*thisp++ != *thatp++) return 0;
366 0 60 if (*thisp++ != *thatp++) return 0;
368 1 67 if (*thisp++ != *thatp++) return 0;
378 2226 0 gf2_matrix_t *self = (gf2_matrix_t*) SvIV(SvRV(Self));
390 127 2099 if ( (width > 1) && byteorder &&
12 115 if ( (width > 1) && byteorder &&
5 7 if ( (width > 1) && byteorder &&
393 5 0 to_start=SvPV(Str,len) + width - 1;
394 14 5 for (i=width ; i-- ; --to_start, ++from_start) {
396 18 14 for (j=words; j--; to += width, from += width) {
412 0 0 gf2_matrix_t *self = (gf2_matrix_t*) SvIV(SvRV(Self));
415 0 0 if ((byteorder < 0) || (byteorder > 2)) ++errors;
0 0 if ((byteorder < 0) || (byteorder > 2)) ++errors;
416 0 0 if ((row < 0) || (row >= self->rows)) ++errors;
0 0 if ((row < 0) || (row >= self->rows)) ++errors;
417 0 0 if ((col < 0) || (col >= self->cols)) ++errors;
0 0 if ((col < 0) || (col >= self->cols)) ++errors;
418 0 0 if (errors) return &PL_sv_undef;
431 0 0 if ( (width > 1) && byteorder &&
0 0 if ( (width > 1) && byteorder &&
0 0 if ( (width > 1) && byteorder &&
434 0 0 to_start=SvPV(Str,len) + width - 1;
435 0 0 for (i=width ; i-- ; --to_start, ++from_start) {
437 0 0 for (j=words; j--; to += width, from += width) {
451 2228 0 gf2_matrix_t *self = (gf2_matrix_t*) SvIV(SvRV(Self));
462 127 2101 if ( (width > 1) && byteorder &&
12 115 if ( (width > 1) && byteorder &&
6 6 if ( (width > 1) && byteorder &&
464 6 0 from_start=SvPV(Str,len) + width - 1;
465 16 6 for (i=width ; i-- ; --from_start, ++to_start) {
467 24 16 for (j=words; j--; to += width, from += width) {
472 2222 0 from_start=SvPV(Str,len);
481 0 0 gf2_matrix_t *self = (gf2_matrix_t*) SvIV(SvRV(Self));
484 0 0 if ((byteorder < 0) || (byteorder > 2)) ++errors;
0 0 if ((byteorder < 0) || (byteorder > 2)) ++errors;
485 0 0 if ((row < 0) || (row >= self->rows)) ++errors;
0 0 if ((row < 0) || (row >= self->rows)) ++errors;
486 0 0 if ((col < 0) || (col >= self->cols)) ++errors;
0 0 if ((col < 0) || (col >= self->cols)) ++errors;
487 0 0 if (errors) return;
499 0 0 if ( (width > 1) && byteorder &&
0 0 if ( (width > 1) && byteorder &&
0 0 if ( (width > 1) && byteorder &&
502 0 0 from_start=SvPV(Str,len) + width - 1;
504 0 0 for (i=width ; i-- ; --from_start, ++to_start) {
506 0 0 for (j=words; j--; to += width, from += width) {
511 0 0 from_start=SvPV(Str,len);
521 12 0 gf2_matrix_t *self = (gf2_matrix_t*) SvIV(SvRV(Self));
527 0 12 if (offset % width) errors++; else offset /= width;;
528 12 0 if ((offset < 0) || (offset >= rows * cols)) errors++;
0 12 if ((offset < 0) || (offset >= rows * cols)) errors++;
529 0 12 if (errors) {
534 4 8 if (self->organisation == 1) { // ROWWISE