| 3925 | } |
| 3926 | |
| 3927 | static bool pylsp_prefix_oracles(const CBMTypeRegistry *reg) { |
| 3928 | const char *prefixes[] = {NULL, "", "pkg.", "pkg.sub.", |
| 3929 | "pkg.sub.call", "pkg.su.", "pkg.submarine.", "pkg.Type.", |
| 3930 | "only.tail.", "missing.", "zzzz."}; |
| 3931 | for (size_t i = 0; i < sizeof(prefixes) / sizeof(prefixes[0]); i++) { |
| 3932 | uint64_t visits = 17; |
| 3933 | bool indexed = cbm_registry_has_func_qn_prefix(reg, prefixes[i], &visits); |
| 3934 | if (indexed != pylsp_prefix_scan(reg, prefixes[i]) || visits < 17 || |
| 3935 | cbm_registry_has_func_qn_prefix(reg, prefixes[i], NULL) != indexed || |
| 3936 | (!prefixes[i] && visits != 17)) |
| 3937 | return false; |
| 3938 | } |
| 3939 | return true; |
| 3940 | } |
| 3941 | |
| 3942 | TEST(pylsp_prefix_order_matches_iterator_and_chain_shadowing) { |
| 3943 | CBMArena arena, scratch; |
no test coverage detected