C++ test import mapping misses implementations behind included headers
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- cpp
- Domain
- testing-qa
Research direction
Start with import_based_mapping and the C++ adapter's has_testable_logic, then trace how graph edges such as widget.cpp -> widget.h and behavior_test.cpp -> widget.h are turned into coverage. The reproduction is synthetic and the issue asks for the intended companion-header heuristic before any change, so first confirm the expected mapping with the maintainers. Done means a behavior-named C++ test maps to its implementation file, and the Unreal fix in #865 is not affected.
Written by the indexing model from the issue text.
Description
C++ import-based test mapping recognizes an included header but not its implementation, even when a test invokes an out-of-line function. A test with a behavior-oriented filename also does not get filename-based mapping to the implementation.
Synthetic reproduction (no private source):
// widget.h
int widget();
// widget.cpp
#include "widget.h"
int widget() { return 42; }
// behavior_test.cpp
#include "widget.h"
TEST(Behavior, Result) { EXPECT_EQ(widget(), 42); }
Calling import_based_mapping with graph edges widget.cpp -> widget.h and behavior_test.cpp -> widget.h, production files {widget.cpp, widget.h}, test files {behavior_test.cpp} and language cxx yields {widget.h}. The implementation is absent. The C++ adapter's has_testable_logic treats the declaration header as having logic, so generic facade expansion does not help. This is separate from the Unreal framework recognition fix in #865 and also affects GoogleTest.
A conservative companion-header/implementation mapping hook might help, but blindly reversing every include edge would overclaim coverage for common headers. Please clarify the intended heuristic and extension point. I have not changed coverage inference or scoring weights locally.
- Dominant language
- Python
- Stars
- 3.8k
- Forks
- 301
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from peteromallet/desloppify
-
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
peteromallet/desloppify#950 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
peteromallet/desloppify#947 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
peteromallet/desloppify#946 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
peteromallet/desloppify#942 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
peteromallet/desloppify#936 ·
All issues in peteromallet/desloppify
Similar issues
-
follow-up needs-triage S3: minor
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
manaflow-ai/cmux#36856 · 1 comment ·
Maintainers usually reply within 1 day
-
documentation good first issue help wanted
Difficulty 1/5 1-3 hours Newbie friendliness 90/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Shell framework build fails at "copy the shader libraries": the iOS shader libraries are now one file b-<chain>.imgPossibly taken @xiaofeng-han claimed this today. Openbuild ios
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day