Branch Coverage

lib/Math/Random/PCG32.xs
Criterion Covered Total %
branch 34 42 80.9


line true false branch
22 0 1 if (RETVAL == NULL) croak("Could not allocate state memory");
40 12 2 while (count < max) {
41 11 1 if (pcg32_random_r(rng) < odds) break;
65 0 7 if (max == min) RETVAL = min;
66 0 7 else if (min > max) croak("max must be greater than min");
76 3 20 if (x1 == x2 && y1 == y2) XSRETURN_UNDEF;
77 0 20 EXTEND(SP, 2);
80 16 4 if (dx == 0) goto MOVE_Y;
81 14 2 else if (dy == 0) goto MOVE_X;
83 8 6 if (pcg32_random_r(rng) % (magx + abs(dy)) < magx) {
85 4 6 mPUSHs(newSViv(x1 + (dx > 0 ? 1 : -1)));
90 4 6 mPUSHs(newSViv(y1 + (dy > 0 ? 1 : -1)));
99 1 1 if (items > 1) {
100 0 1 if (!SvIOK(ST(1)) && !SvNOK(ST(1)))
102 0 1 factor = SvNV(ST(1));
119 0 1 if (len == 0) XSRETURN_UNDEF;
134 1 5 if (len == 0) XSRETURN_UNDEF;
137 2 3 if (rnd != len - 1) {
140 5 2 for (i = rnd; i < len - 1; i++) *dst++ = *src++;
156 0 1 if (len == 0) XSRETURN_UNDEF;
167 18 6 for (i = 0; i < count; i++) sum += pcg32_random_r(rng) % sides;