MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / search_code_long_identity

Function search_code_long_identity

tests/test_mcp.c:10938–10960  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10936}
10937
10938static char *search_code_long_identity(char fill, bool path) {
10939 enum { LONG_IDENTITY_LENGTH = 2304, FIRST_DIRECTORY_LENGTH = 200 };
10940 char *value = malloc(LONG_IDENTITY_LENGTH + 1U);
10941 if (!value) {
10942 return NULL;
10943 }
10944 memset(value, fill, LONG_IDENTITY_LENGTH);
10945 if (path) {
10946 for (size_t i = FIRST_DIRECTORY_LENGTH; i + 16U < LONG_IDENTITY_LENGTH; i += 73U) {
10947 value[i] = '/';
10948 }
10949 static const char suffix[] = "/needle.c";
10950 memcpy(value + LONG_IDENTITY_LENGTH - (sizeof(suffix) - 1U), suffix, sizeof(suffix) - 1U);
10951 } else {
10952 for (size_t i = 61U; i + 16U < LONG_IDENTITY_LENGTH; i += 61U) {
10953 value[i] = '.';
10954 }
10955 static const char suffix[] = ".Needle";
10956 memcpy(value + LONG_IDENTITY_LENGTH - (sizeof(suffix) - 1U), suffix, sizeof(suffix) - 1U);
10957 }
10958 value[LONG_IDENTITY_LENGTH] = '\0';
10959 return value;
10960}
10961
10962TEST(search_code_ranked_budget_omission_has_lossless_continuation) {
10963 char tmp[256];

Callers 1

test_mcp.cFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected