Branch Coverage

deps/libgit2/src/util/tsort.c
Criterion Covered Total %
branch 17 132 12.8


line true false branch
38 337 277 if (cmp(x, lx, payload) < 0)
41 0 277 else if (cmp(x, lx, payload) == 0) {
43 0 0 while (cmp(x, dst[i], payload) == 0)
52 166 282 if (val < 0) {
53 76 90 if (c - l <= 1) return c;
55 282 0 } else if (val > 0) {
56 201 81 if (r - c <= 1) return c + 1;
62 0 0 } while (cmp(x, cx, payload) == 0);
78 970 420 for (i = start; i < size; i++) {
81 356 614 if (cmp(dst[i - 1], dst[i], payload) <= 0)
87 1280 614 for (j = (int)i - 1; j >= location; j--) {
110 0 0 while (start < end) {
125 0 0 if (size - start == 1)
128 0 0 if (start >= size - 2) {
129 0 0 if (store->cmp(dst[size - 2], dst[size - 1], store->payload) > 0) {
138 0 0 if (store->cmp(dst[start], dst[start + 1], store->payload) <= 0) {
158 0 0 while (n >= 64) {
167 0 0 if (stack_curr < 2)
170 0 0 else if (stack_curr == 2) {
178 0 0 return !((A <= B + C) || (B <= C));
0 0 return !((A <= B + C) || (B <= C));
184 0 0 if (store->alloc < new_size) {
194 0 0 if (tempstore == NULL)
213 0 0 if (resize(store, MIN(A, B)) < 0)
219 0 0 if (A < B) {
224 0 0 for (k = curr; k < curr + A + B; k++) {
225 0 0 if ((i < A) && (j < curr + A + B)) {
0 0 if ((i < A) && (j < curr + A + B)) {
226 0 0 if (store->cmp(storage[i], dst[j], store->payload) <= 0)
230 0 0 } else if (i < A) {
240 0 0 for (k = curr + A + B - 1; k >= curr; k--) {
241 0 0 if ((i >= 0) && (j >= curr)) {
0 0 if ((i >= 0) && (j >= curr)) {
242 0 0 if (store->cmp(dst[j], storage[i], store->payload) > 0)
246 0 0 } else if (i >= 0)
260 0 0 if (stack_curr <= 1)
264 0 0 if ((stack_curr == 2) && (stack[0].length + stack[1].length == size)) {
0 0 if ((stack_curr == 2) && (stack[0].length + stack[1].length == size)) {
272 0 0 else if ((stack_curr == 2) && (stack[0].length <= stack[1].length)) {
0 0 else if ((stack_curr == 2) && (stack[0].length <= stack[1].length)) {
278 0 0 else if (stack_curr == 2)
286 0 0 if (A <= B + C) {
287 0 0 if (A < C) {
297 0 0 } else if (B <= C) {
346 420 0 if (size < 64) {
360 0 0 PUSH_NEXT();
0 0 PUSH_NEXT();
0 0 PUSH_NEXT();
0 0 PUSH_NEXT();
0 0 PUSH_NEXT();
361 0 0 PUSH_NEXT();
0 0 PUSH_NEXT();
0 0 PUSH_NEXT();
0 0 PUSH_NEXT();
0 0 PUSH_NEXT();
362 0 0 PUSH_NEXT();
0 0 PUSH_NEXT();
0 0 PUSH_NEXT();
0 0 PUSH_NEXT();
0 0 PUSH_NEXT();
365 0 0 if (!check_invariant(run_stack, stack_curr)) {
370 0 0 PUSH_NEXT();
0 0 PUSH_NEXT();
0 0 PUSH_NEXT();
0 0 PUSH_NEXT();
0 0 PUSH_NEXT();