| 58 | } |
| 59 | |
| 60 | static int call_count(const CBMFileResult *r, const char *caller, const char *target) { |
| 61 | int count = 0; |
| 62 | for (int i = 0; i < r->calls.count; i++) { |
| 63 | const CBMCall *call = &r->calls.items[i]; |
| 64 | const char *callee = call_short_name(call->callee_name); |
| 65 | if (callee && strcmp(callee, target) == 0 && |
| 66 | (!caller || qn_ends_with(call->enclosing_func_qn, caller))) { |
| 67 | count++; |
| 68 | } |
| 69 | } |
| 70 | return count; |
| 71 | } |
| 72 | |
| 73 | static int exact_usage_count(const CBMFileResult *r, const char *caller_qn, const char *target) { |
| 74 | int count = 0; |
no test coverage detected