Skip to content

Commit e3d307c

Browse files
committed
Added extra names test
1 parent 0d37aea commit e3d307c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/ti/names.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,15 @@ int ti_names_create(void)
2020

2121
int names__no_ref_cb(ti_name_t * name, void * UNUSED(arg))
2222
{
23+
/* actually, only common variable should exist in here; */
2324
return name->ref == 1 ? 0 : -1;
2425
}
2526

2627
_Bool ti_names_no_ref(void)
2728
{
29+
const uint32_t COMMON_NAMES = 24;
30+
if (names->n != COMMON_NAMES)
31+
return -1;
2832
return smap_values(names, (smap_val_cb) names__no_ref_cb, NULL) == 0;
2933
}
3034

0 commit comments

Comments
 (0)