Structs use the same `: Base` syntax as classes and must also emit inherits.
()
| 216 | |
| 217 | |
| 218 | def 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 | |
| 230 | def test_cpp_generic_parents_include_type_argument_references(): |
nothing calls this directly
no test coverage detected