Branch Coverage

SkewHeap.xs
Criterion Covered Total %
branch 67 114 58.7


line true false branch
59 30 18 if (node == NULL) {
75 43 59 if (node->left != NULL) free_node(aTHX_ node->left);
76 22 80 if (node->right != NULL) free_node(aTHX_ node->right);
104 24 0 skewheap_t *heap = SKEW(ref);
105 15 9 if (heap->root != NULL) free_node(aTHX_ heap->root);
117 0 0 if (node->left != NULL) {
121 0 0 if (node->right != NULL) {
130 0 0 skewheap_t *heap = SKEW(ref);
137 0 0 for (i = 0; i < heap->size; ++i) {
164 0 70 if (cv == Nullcv) {
176 0 70 PUSH_MULTICALL(cv);
0 70 PUSH_MULTICALL(cv);
179 91 70 while (top >= 0) {
186 147 91 for (j = start; j <= end - 1; ++j) {
191 147 0 int test = SvIV(*PL_stack_sp);
193 84 63 if (test < 1) {
205 19 72 if (p - 1 > start) {
210 2 89 if (p + 1 < end) {
216 70 0 POP_MULTICALL;
0 70 POP_MULTICALL;
221 3 0 skewheap_t *heap = SKEW(heap_ref);
223 3 0 skewheap_t *heap_a = SKEW(heap_ref_a);
224 3 0 skewheap_t *heap_b = SKEW(heap_ref_b);
242 3 0 if (a != NULL) todo[tidx++] = a;
243 3 0 if (b != NULL) todo[tidx++] = b;
245 12 3 while (tidx > 0) {
251 6 6 if (node->right != NULL) {
260 3 0 if (nidx > 0) {
262 3 0 if (nidx > 1) {
267 9 3 for (i = nidx; i > 1; --i) {
272 9 0 if (prev->left != NULL) {
296 5 72 if (a == NULL) {
300 5 67 else if (b == NULL) {
309 176 67 while (tidx > 0) {
312 42 134 if (node->right != NULL) {
320 0 67 if (nidx == 0) {
325 67 0 if (nidx > 1) {
330 109 67 for (i = nidx; i > 1; --i) {
335 67 42 if (prev->left != NULL) {
343 67 10 heap->root = nodes[0];
349 72 0 skewheap_t *heap = SKEW(ref);
355 17 55 if (heap->root == NULL) {
366 22 0 skewheap_t *heap = SKEW(ref);
370 22 0 if (root != NULL) {
387 8 0 skewheap_t *heap = SKEW(ref);
390 6 2 : newSVsv(heap->root->value);
395 19 0 skewheap_t *heap = SKEW(ref);
401 3 0 SV *new_heap = new(aTHX_ "SkewHeap", SKEW(heap_a)->cmp);
410 0 0 for (i = 0; i < depth; ++i) sv_catpvn(out, "--", 2);
414 0 0 for (i = 0; i < depth; ++i) sv_catpvn(out, "--", 2);
419 0 0 if (node->left != NULL) {
420 0 0 for (i = 0; i < depth; ++i) sv_catpvn(out, "--", 2);
425 0 0 if (node->right != NULL) {
426 0 0 for (i = 0; i < depth; ++i) sv_catpvn(out, "--", 2);
434 0 0 skewheap_t *heap = SKEW(ref);
439 0 0 if (heap->root != NULL) {
480 72 25 for (i = 1; i < items; ++i) {