`[self speak]` inside Dog.fetch must produce a calls edge. The method-body second pass was dead code for ObjC because the grammar emits a simple selector as `identifier`, not `selector`/`keyword_argument_list` (#1475).
()
| 1130 | |
| 1131 | |
| 1132 | def test_objc_resolves_self_method_calls(): |
| 1133 | """`[self speak]` inside Dog.fetch must produce a calls edge. The method-body |
| 1134 | second pass was dead code for ObjC because the grammar emits a simple selector |
| 1135 | as `identifier`, not `selector`/`keyword_argument_list` (#1475).""" |
| 1136 | r = extract_objc(FIXTURES / "sample.m") |
| 1137 | nid2label = {n["id"]: n["label"] for n in r["nodes"]} |
| 1138 | calls = [nid2label.get(e["target"]) for e in r["edges"] if e["relation"] == "calls"] |
| 1139 | assert any(t and "speak" in t for t in calls), calls |
| 1140 | |
| 1141 | |
| 1142 | def test_objc_class_method_labeled_with_plus(tmp_path): |
nothing calls this directly
no test coverage detected