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

Function enc_rand

tests/test_extraction.c:11673–11676  ·  view source on GitHub ↗

#1527: the call-context metrics find each call's innermost enclosing * Function/Method with a line sweep instead of scanning every def per call. * The sweep must give the scan's exact answer -- smallest span, ties to the * lowest def index -- on nested, overlapping, same-line, malformed * (end < start) and unnamed/non-callable ranges. Fixed-seed generator: * deterministic, many shapes. */

Source from the content-addressed store, hash-verified

11671 * (end < start) and unnamed/non-callable ranges. Fixed-seed generator:
11672 * deterministic, many shapes. */
11673static uint32_t enc_rand(uint32_t *state) {
11674 *state = (*state * 1103515245u) + 12345u;
11675 return (*state >> 16) & 0x7fffu;
11676}
11677
11678TEST(extract_enclosing_sweep_matches_scan_issue1527) {
11679 static const char *const labels[] = {"Function", "Method", "Class", "Variable"};

Callers 1

test_extraction.cFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected