| 153 | } |
| 154 | |
| 155 | static bool gmt_traverse_eq(const cbm_traverse_result_t *a, const cbm_traverse_result_t *b) { |
| 156 | if (!gmt_node_eq(&a->root, &b->root) || a->visited_count != b->visited_count || |
| 157 | a->edge_count != b->edge_count || a->truncated != b->truncated || |
| 158 | a->edges_truncated != b->edges_truncated) { |
| 159 | return false; |
| 160 | } |
| 161 | for (int i = 0; i < a->visited_count; i++) { |
| 162 | if (a->visited[i].hop != b->visited[i].hop || |
| 163 | !gmt_node_eq(&a->visited[i].node, &b->visited[i].node)) { |
| 164 | return false; |
| 165 | } |
| 166 | } |
| 167 | for (int i = 0; i < a->edge_count; i++) { |
| 168 | if (!gmt_edge_eq(&a->edges[i], &b->edges[i])) { |
| 169 | return false; |
| 170 | } |
| 171 | } |
| 172 | return true; |
| 173 | } |
| 174 | |
| 175 | typedef struct { |
| 176 | const char *types[3]; |
no test coverage detected