Branch Coverage

qsort-r.c
Criterion Covered Total %
branch 11 100 11.0


line true false branch
32 0 0 if (swaptype_long <= 1)
33 0 0 json_create_swapcode(long, a, b, n)
34 0 0 else if (swaptype_int <= 1)
35 0 0 json_create_swapcode(int, a, b, n)
37 0 0 json_create_swapcode(char, a, b, n)
59 0 0 (cmp(thunk, b, c) < 0 ? b : (cmp(thunk, a, c) < 0 ? c : a ))
0 0 (cmp(thunk, b, c) < 0 ? b : (cmp(thunk, a, c) < 0 ? c : a ))
60 0 0 :(cmp(thunk, b, c) > 0 ? b : (cmp(thunk, a, c) < 0 ? a : c ));
0 0 :(cmp(thunk, b, c) > 0 ? b : (cmp(thunk, a, c) < 0 ? a : c ));
0 0 :(cmp(thunk, b, c) > 0 ? b : (cmp(thunk, a, c) < 0 ? a : c ));
71 2 0 loop: JSON_CREATE_SWAPINIT(long, a, es);
2 0 loop: JSON_CREATE_SWAPINIT(long, a, es);
72 2 0 JSON_CREATE_SWAPINIT(int, a, es);
2 0 JSON_CREATE_SWAPINIT(int, a, es);
74 2 0 if (n < 7) {
75 5 2 for (pm = (char *)a + es; pm < (char *)a + n * es; pm += es)
76 11 0 for (pl = pm;
77 6 5 pl > (char *)a && cmp(thunk, pl - es, pl) > 0;
79 6 0 json_create_swap(pl, pl - es);
0 0 json_create_swap(pl, pl - es);
83 0 0 if (n > 7) {
86 0 0 if (n > 40) {
95 0 0 json_create_swap(a, pm);
0 0 json_create_swap(a, pm);
100 0 0 while (pb <= pc && (cmp_result = cmp(thunk, pb, a)) <= 0) {
0 0 while (pb <= pc && (cmp_result = cmp(thunk, pb, a)) <= 0) {
101 0 0 if (cmp_result == 0) {
103 0 0 json_create_swap(pa, pb);
0 0 json_create_swap(pa, pb);
108 0 0 while (pb <= pc && (cmp_result = cmp(thunk, pc, a)) >= 0) {
0 0 while (pb <= pc && (cmp_result = cmp(thunk, pc, a)) >= 0) {
109 0 0 if (cmp_result == 0) {
111 0 0 json_create_swap(pc, pd);
0 0 json_create_swap(pc, pd);
116 0 0 if (pb > pc)
118 0 0 json_create_swap(pb, pc);
0 0 json_create_swap(pb, pc);
123 0 0 if (swap_cnt == 0) { /* Switch to insertion sort */
124 0 0 for (pm = (char *)a + es; pm < (char *)a + n * es; pm += es)
125 0 0 for (pl = pm;
126 0 0 pl > (char *)a && cmp(thunk, pl - es, pl) > 0;
128 0 0 json_create_swap(pl, pl - es);
0 0 json_create_swap(pl, pl - es);
134 0 0 json_create_vecswap(a, pb - d1, d1);
136 0 0 json_create_vecswap(pb, pn - d1, d1);
140 0 0 if (d1 <= d2) {
142 0 0 if (d1 > es) {
145 0 0 if (d2 > es) {
154 0 0 if (d2 > es) {
157 0 0 if (d1 > es) {