| 1915 | } |
| 1916 | |
| 1917 | static int fixture_node_count(cbm_store_t *store, const char *project, const char *path, |
| 1918 | const char *name, const char *label) { |
| 1919 | cbm_node_t *nodes = NULL; |
| 1920 | int count = 0; |
| 1921 | if (cbm_store_find_nodes_by_name(store, project, name, &nodes, &count) != CBM_STORE_OK) { |
| 1922 | return -1; |
| 1923 | } |
| 1924 | int found = 0; |
| 1925 | for (int i = 0; i < count; i++) { |
| 1926 | if (nodes[i].file_path && nodes[i].label && strcmp(nodes[i].file_path, path) == 0 && |
| 1927 | strcmp(nodes[i].label, label) == 0) { |
| 1928 | found++; |
| 1929 | } |
| 1930 | } |
| 1931 | if (nodes) { |
| 1932 | cbm_store_free_nodes(nodes, count); |
| 1933 | } |
| 1934 | return found; |
| 1935 | } |
| 1936 | |
| 1937 | /* Edges of `edge_type` from the node named `source_name` to the node named |
| 1938 | * `target_name` that carries `target_label`. */ |
no test coverage detected