Branch Coverage

include/eshu_diff.h
Criterion Covered Total %
branch 49 64 76.5


line true false branch
43 3 1 while (p < old_text + old_len) {
45 17 0 while (eol < old_text + old_len && *eol != '\n') eol++;
14 3 while (eol < old_text + old_len && *eol != '\n') eol++;
46 3 0 if (eol < old_text + old_len) eol++; /* include the newline */
47 0 3 if (old_count >= old_cap) {
60 3 1 while (p < new_text + new_len) {
62 18 0 while (eol < new_text + new_len && *eol != '\n') eol++;
15 3 while (eol < new_text + new_len && *eol != '\n') eol++;
63 3 0 if (eol < new_text + new_len) eol++;
64 0 3 if (new_count >= new_cap) {
91 4 1 for (i = 0; i <= max; i++) {
93 3 1 if (i < old_count && i < new_count
3 0 if (i < old_count && i < new_count
94 2 1 && old_lens[i] == new_lens[i]
95 2 0 && memcmp(old_lines[i], new_lines[i], old_lens[i]) == 0) {
99 2 2 if (!same && hunk_start < 0) {
2 0 if (!same && hunk_start < 0) {
104 3 1 if (hunk_start >= 0 && !same) {
2 1 if (hunk_start >= 0 && !same) {
105 1 1 if (i < old_count) {
106 0 1 if (hunk_old_count >= hunk_cap) {
113 1 1 if (i < new_count) {
114 0 1 if (hunk_new_count >= hunk_cap) {
122 2 2 if (same || i == max) {
1 1 if (same || i == max) {
123 2 1 if (hunk_start >= 0) {
129 1 2 for (j = 0; j < hunk_old_count; j++) {
133 1 0 if (old_lens[idx] == 0 || old_lines[idx][old_lens[idx]-1] != '\n')
0 1 if (old_lens[idx] == 0 || old_lines[idx][old_lens[idx]-1] != '\n')
136 1 2 for (j = 0; j < hunk_new_count; j++) {
140 1 0 if (new_lens[idx] == 0 || new_lines[idx][new_lens[idx]-1] != '\n')
0 1 if (new_lens[idx] == 0 || new_lines[idx][new_lens[idx]-1] != '\n')