| 4219 | } |
| 4220 | |
| 4221 | static cbm_store_t *setup_issue2208_store(void) { |
| 4222 | cbm_store_t *s = setup_cypher_store(); |
| 4223 | cbm_node_t twins[] = { |
| 4224 | {.project = "test", |
| 4225 | .label = "Function", |
| 4226 | .name = "ProjectionTwin", |
| 4227 | .qualified_name = "test.ProjectionA", |
| 4228 | .file_path = "projection_a.go", |
| 4229 | .start_line = 30, |
| 4230 | .end_line = 40, |
| 4231 | .properties_json = "{\"marker\":\"alpha\"}"}, |
| 4232 | {.project = "test", |
| 4233 | .label = "Function", |
| 4234 | .name = "ProjectionTwin", |
| 4235 | .qualified_name = "test.ProjectionB", |
| 4236 | .file_path = "projection_b.go", |
| 4237 | .start_line = 10, |
| 4238 | .end_line = 20, |
| 4239 | .properties_json = "{\"marker\":\"beta\"}"}, |
| 4240 | {.project = "test", |
| 4241 | .label = "Function", |
| 4242 | .name = "ProjectionTwin", |
| 4243 | .qualified_name = "test.ProjectionC", |
| 4244 | .file_path = "projection_c.go", |
| 4245 | .start_line = 20, |
| 4246 | .end_line = 30, |
| 4247 | .properties_json = "{\"marker\":\"gamma\"}"}, |
| 4248 | }; |
| 4249 | int64_t ids[3]; |
| 4250 | for (int i = 0; i < 3; i++) { |
| 4251 | ids[i] = cbm_store_upsert_node(s, &twins[i]); |
| 4252 | } |
| 4253 | /* Callers: A has 2 (HandleOrder, ValidateOrder), B has 1 (HandleOrder), C none. */ |
| 4254 | int64_t handle = issue2208_id_of(s, "test.HandleOrder"); |
| 4255 | int64_t validate = issue2208_id_of(s, "test.ValidateOrder"); |
| 4256 | cbm_edge_t e1 = {.project = "test", .source_id = handle, .target_id = ids[0], .type = "CALLS"}; |
| 4257 | cbm_edge_t e2 = { |
| 4258 | .project = "test", .source_id = validate, .target_id = ids[0], .type = "CALLS"}; |
| 4259 | cbm_edge_t e3 = {.project = "test", .source_id = handle, .target_id = ids[1], .type = "CALLS"}; |
| 4260 | cbm_store_insert_edge(s, &e1); |
| 4261 | cbm_store_insert_edge(s, &e2); |
| 4262 | cbm_store_insert_edge(s, &e3); |
| 4263 | return s; |
| 4264 | } |
| 4265 | |
| 4266 | /* The reporter's exact shape: aggregate WITH carrying the node beside count(). */ |
| 4267 | TEST(cypher_issue2208_with_agg_carried_node_props) { |
no test coverage detected