| 53 | return cbm_store_insert_edge(s,&e)>0; |
| 54 | } |
| 55 | static bool ss_seed(cbm_store_t *s,ss_ids_t *id) { |
| 56 | if (!s || cbm_store_upsert_project(s,SS_PROJECT,"/scope-fixture")!=CBM_STORE_OK) return false; |
| 57 | /* Deliberately nonlexical insertion order. */ |
| 58 | id->z=ss_node(s,"z",30); id->root=ss_node(s,"root",11); id->top=ss_node(s,"top",40); |
| 59 | id->a=ss_node(s,"a",20); id->tail=ss_node(s,"tail",60); id->island=ss_node(s,"island",50); |
| 60 | return id->z>0 && id->root>0 && id->top>0 && id->a>0 && id->tail>0 && id->island>0 && |
| 61 | ss_edge(s,id->a,id->root,"CALLS") && ss_edge(s,id->z,id->root,"USAGE") && |
| 62 | ss_edge(s,id->top,id->a,"CALLS") && ss_edge(s,id->top,id->z,"USAGE") && |
| 63 | ss_edge(s,id->tail,id->island,"CALLS") && cbm_store_generation_advance(s)==CBM_STORE_OK && |
| 64 | cbm_store_count_nodes(s,SS_PROJECT)==6; |
| 65 | } |
| 66 | static bool ss_line(cbm_store_t *s,int64_t id,int line) { |
| 67 | cbm_node_t row={0}; bool ok=cbm_store_find_node_by_id(s,id,&row)==CBM_STORE_OK && row.start_line==line; |
| 68 | cbm_node_free_fields(&row); return ok; |
no test coverage detected