Branch Coverage

src/b_path.c
Criterion Covered Total %
branch 17 34 50.0


line true false branch
12 0 19844 if ((ret = b_stack_new(0)) == NULL) {
18 0 19844 if ((dup = malloc(string->len + 1)) == NULL) {
22 0 19844 if (memcpy(dup, string->str, string->len) == NULL) {
30 29620 19844 while ((item = strtok_r(tmp, "/", &ctx)) != NULL) {
38 9776 19844 if (b_stack_count(ret) > 0 && strcmp(item, ".") == 0) {
0 9776 if (b_stack_count(ret) > 0 && strcmp(item, ".") == 0) {
47 19844 9776 if (b_stack_count(ret) == 0 && string->str[0] == '/') {
6584 13260 if (b_stack_count(ret) == 0 && string->str[0] == '/') {
51 0 29620 if ((item_copy = b_string_new(item)) == NULL) {
55 0 29620 if (b_stack_push(ret, item_copy) == NULL) {
65 0 19844 if (b_stack_count(ret) == 0 && string->str[0] == '/') {
0 0 if (b_stack_count(ret) == 0 && string->str[0] == '/') {
66 0 0 if (b_stack_push(ret, b_string_new("/")) == NULL) {
91 0 13174 if ((parts = b_path_new(string)) == NULL) {
95 0 13174 if ((ret = b_string_join("/", parts)) == NULL) {
114 0 0 if ((tmp = b_string_new(str)) == NULL) {
118 0 0 if ((ret = b_path_clean(tmp)) == NULL) {