`BOOST_TEST(p1 == p2)` doesn't always test `p1 == p2`
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- cpp
- Domain
- testing-qa
Research direction
Start by tracing the BOOST_TEST(p1 == p2) handling for pointers to char and compare it with the original C++ expression semantics. Review existing behavior and tests, then determine whether a compatible correction or an explicit alternative is feasible; done means the behavior and resolution are covered by tests and clearly documented.
Written by the indexing model from the issue text.
Description
A user of Boost.Test has complained to me that the behavior of BOOST_TEST(p1 == p2) when p1 and p2 are pointers to char is surprising as it silently reinterprets the C++ expression p1 == p2 to mean something else, namely, strcmp(p1, p2) == 0. This is, in this user's opinion, a significant defect that justifies not using Boost.Test. (I don't necessarily agree.)
I suspect that it's much too late now to change this behavior, as who knows how much existing code already relies on it, so I'm not sure what can be done to address this complaint.
- Dominant language
- C++
- Stars
- 213
- Forks
- 149
- Avg merge
- 18h 17m
- Merged PRs (30d)
- 2
Contributor guide
No contributing guide indexed for this repository
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 boostorg/test
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
-
Difficulty 3/5 1-2 days Newbie friendliness 52/100
-
Conversion Warning with GCC15 when using operator<< within custom failure message and -WConversion Open
Difficulty 4/5 3-5 days Newbie friendliness 42/100
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
AXERA-TECH/ax-llm#77 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
games-on-whales/wolf#509 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
bug-unconfirmed
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
NVIDIA/cuda-samples#453 ·