MCPcopy Create free account
hub / github.com/Graphify-Labs/graphify / test_rust_enum_variant_references

Function test_rust_enum_variant_references

tests/test_multilang.py:349–359  ·  view source on GitHub ↗

Enum variant payload types must emit `references` edges. Tuple variants (`Click(T)`) and struct variants (`Resize { x: T }`) nest their field types under enum_variant_list -> enum_variant; that path was never traversed, so every enum-variant type reference was dropped.

()

Source from the content-addressed store, hash-verified

347
348
349def test_rust_enum_variant_references():
350 """Enum variant payload types must emit `references` edges.
351
352 Tuple variants (`Click(T)`) and struct variants (`Resize { x: T }`) nest
353 their field types under enum_variant_list -> enum_variant; that path was
354 never traversed, so every enum-variant type reference was dropped.
355 """
356 r = extract_rust(FIXTURES / "sample.rs")
357 refs = _edge_labels(r, "references")
358 assert ("GraphEvent", "Graph") in refs, "tuple-variant reference missing"
359 assert ("GraphEvent", "DataProcessor") in refs, "struct-variant reference missing"
360
361
362def test_rust_struct_field_emits_field_context():

Callers

nothing calls this directly

Calls 2

extract_rustFunction · 0.90
_edge_labelsFunction · 0.70

Tested by

no test coverage detected