oss-slu / oss-slu/PilotDataSynchronization
gtest target tests a locally redefined function, not production code
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 4
- Forks
- 8
- Avg merge
- 5d 17h
- Merged PRs (30d)
- 2
Description
Describe the bug
xplane_plugin/tests/test_threading_tools.cpp includes threading-tools.h, which declares generate_packet(vector<string>), then defines its own generate_packet(const string&, const string&, const string&, const string&) at line 11. Both tests call the local four-string version, so overload resolution never reaches the header's declaration. That is also why the header's missing definitions never cause a link error.
test_threading_tools is the only test target in xplane_plugin/meson.build, so the C++ suite currently exercises no production code at all. meson test passing means nothing.
Expected behavior
The suite tests real production code, or the target is removed so a passing run is not mistaken for coverage.
Additional context
ThreadMessage in the header is a four-float struct, predating the current eight-value payload, so the test reflects an obsolete data model. Related to #66 and #103. Should be resolved together with #190.
Found while writing the setup documentation in #138 / #178.
Contributor guide
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.
Research direction
Start with xplane_plugin/tests/test_threading_tools.cpp and xplane_plugin/meson.build, then compare the local generate_packet definition and test calls with threading-tools.h. Review related issues #190, #66, and #103 before deciding whether the target can test production code or should be removed. Done means meson test no longer presents a passing test target that exercises only locally defined code.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- build-system, testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100