@@ -15331,13 +15331,13 @@ TEST(registry_short_name_indexes) {
1533115331 /* Qualified-name bare segment "Trait": types 0, 4, then the bare-QN type
1533215332 * 5. The iterator is a hash prefilter, so apply the exact predicate before
1533315333 * asserting its order just like production consumers do. */
15334- CBMTypeNameIter nit;
15334+ CBMTypeShortIter nit;
1533515335 cbm_registry_types_by_short_name(®, "Trait", &nit);
1533615336 {
1533715337 int expected[] = {0, 4, 5};
1533815338 int exact_count = 0;
1533915339 int candidate;
15340- while ((candidate = cbm_type_name_iter_next (&nit)) >= 0) {
15340+ while ((candidate = cbm_type_short_iter_next (&nit)) >= 0) {
1534115341 const char *qn = reg.types[candidate].qualified_name;
1534215342 const char *last_dot = qn ? strrchr(qn, '.') : NULL;
1534315343 const char *candidate_short = last_dot ? last_dot + 1 : qn;
@@ -15352,7 +15352,7 @@ TEST(registry_short_name_indexes) {
1535215352 {
1535315353 int exact_count = 0;
1535415354 int candidate;
15355- while ((candidate = cbm_type_name_iter_next (&nit)) >= 0) {
15355+ while ((candidate = cbm_type_short_iter_next (&nit)) >= 0) {
1535615356 const char *qn = reg.types[candidate].qualified_name;
1535715357 const char *last_dot = qn ? strrchr(qn, '.') : NULL;
1535815358 const char *candidate_short = last_dot ? last_dot + 1 : qn;
@@ -15382,7 +15382,7 @@ TEST(registry_short_name_indexes) {
1538215382
1538315383 int actual;
1538415384 for (;;) {
15385- actual = cbm_type_name_iter_next (&nit);
15385+ actual = cbm_type_short_iter_next (&nit);
1538615386 if (actual < 0)
1538715387 break;
1538815388 const char *qn = reg.types[actual].qualified_name;
@@ -15437,19 +15437,19 @@ TEST(registry_short_name_indexes) {
1543715437 t.short_name = "Trait";
1543815438 cbm_registry_add_type(®, t);
1543915439 cbm_registry_types_by_short_name(®, "Trait", &nit);
15440- ASSERT_EQ(cbm_type_name_iter_next (&nit), 0);
15441- ASSERT_EQ(cbm_type_name_iter_next (&nit), 4);
15442- ASSERT_EQ(cbm_type_name_iter_next (&nit), 5);
15443- ASSERT_EQ(cbm_type_name_iter_next (&nit), tail_type_i);
15444- ASSERT_EQ(cbm_type_name_iter_next (&nit), -1);
15440+ ASSERT_EQ(cbm_type_short_iter_next (&nit), 0);
15441+ ASSERT_EQ(cbm_type_short_iter_next (&nit), 4);
15442+ ASSERT_EQ(cbm_type_short_iter_next (&nit), 5);
15443+ ASSERT_EQ(cbm_type_short_iter_next (&nit), tail_type_i);
15444+ ASSERT_EQ(cbm_type_short_iter_next (&nit), -1);
1544515445
1544615446 int *saved_type_short_buckets = reg.type_short_buckets;
1544715447 reg.type_short_buckets = NULL;
1544815448 cbm_registry_types_by_short_name(®, "Trait", &nit);
1544915449 int fallback_expected[] = {0, 4, 5, tail_type_i};
1545015450 int fallback_count = 0;
1545115451 int candidate;
15452- while ((candidate = cbm_type_name_iter_next (&nit)) >= 0) {
15452+ while ((candidate = cbm_type_short_iter_next (&nit)) >= 0) {
1545315453 const char *qn = reg.types[candidate].qualified_name;
1545415454 const char *last_dot = qn ? strrchr(qn, '.') : NULL;
1545515455 const char *candidate_short = last_dot ? last_dot + 1 : qn;
@@ -15479,7 +15479,7 @@ TEST(registry_short_name_indexes) {
1547915479
1548015480 cbm_registry_types_by_short_name(®, "Trait", &nit);
1548115481 fallback_count = 0;
15482- while ((candidate = cbm_type_name_iter_next (&nit)) >= 0) {
15482+ while ((candidate = cbm_type_short_iter_next (&nit)) >= 0) {
1548315483 const char *qn = reg.types[candidate].qualified_name;
1548415484 const char *last_dot = qn ? strrchr(qn, '.') : NULL;
1548515485 const char *candidate_short = last_dot ? last_dot + 1 : qn;
0 commit comments