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

Function test_cpp_struct_inherits_edge

tests/test_languages.py:218–227  ·  view source on GitHub ↗

Structs use the same `: Base` syntax as classes and must also emit inherits.

()

Source from the content-addressed store, hash-verified

216
217
218def test_cpp_struct_inherits_edge():
219 """Structs use the same `: Base` syntax as classes and must also emit inherits."""
220 r = extract_cpp(FIXTURES / "sample.cpp")
221 node_by_id = {n["id"]: n["label"] for n in r["nodes"]}
222 found = any(
223 "RetryingHttpClient" in node_by_id.get(e["source"], "")
224 and "HttpClient" in node_by_id.get(e["target"], "")
225 for e in r["edges"] if e["relation"] == "inherits"
226 )
227 assert found, "RetryingHttpClient (struct) should have inherits edge to HttpClient"
228
229
230def test_cpp_generic_parents_include_type_argument_references():

Callers

nothing calls this directly

Calls 2

extract_cppFunction · 0.90
getMethod · 0.45

Tested by

no test coverage detected