Count calls whose callee_name is exactly `name` (has_call is substring). */
| 3138 | |
| 3139 | /* Count calls whose callee_name is exactly `name` (has_call is substring). */ |
| 3140 | static int count_calls_exact(CBMFileResult *r, const char *name) { |
| 3141 | int n = 0; |
| 3142 | for (int i = 0; i < r->calls.count; i++) { |
| 3143 | if (r->calls.items[i].callee_name && strcmp(r->calls.items[i].callee_name, name) == 0) |
| 3144 | n++; |
| 3145 | } |
| 3146 | return n; |
| 3147 | } |
| 3148 | |
| 3149 | /* (b) A dotted config string must never be extracted as a callee. */ |
| 3150 | TEST(extract_perl_config_string_not_a_callee) { |