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

Function test_rust_tuple_struct_field_references

tests/test_multilang.py:368–378  ·  view source on GitHub ↗

Tuple struct fields (`struct Wrapper(A, B);`) nest their positional types under ordered_field_declaration_list with no field_declaration wrapper -- the same shape as tuple enum variants. That path was not traversed for structs, so tuple-struct field type references were silently dropped.

()

Source from the content-addressed store, hash-verified

366
367
368def test_rust_tuple_struct_field_references():
369 """Tuple struct fields (`struct Wrapper(A, B);`) nest their positional types
370 under ordered_field_declaration_list with no field_declaration wrapper -- the
371 same shape as tuple enum variants. That path was not traversed for structs, so
372 tuple-struct field type references were silently dropped.
373 """
374 r = extract_rust(FIXTURES / "sample.rs")
375 field_refs = _edge_labels(r, "references", "field")
376 assert ("GraphPair", "Graph") in field_refs, "tuple-struct field reference missing"
377 assert ("GraphPair", "Result") in field_refs, "tuple-struct generic field reference missing"
378 assert ("GraphPair", "DataProcessor") in _edge_labels(r, "references", "generic_arg")
379
380
381def test_rust_method_parameter_return_and_generic_contexts():

Callers

nothing calls this directly

Calls 2

extract_rustFunction · 0.90
_edge_labelsFunction · 0.70

Tested by

no test coverage detected