<test>: Ranges `test::iterator` could more closely emulate our wrapped container iterators
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 11.1k
- Forks
- 1.7k
- Avg merge
- 4d 15h
- Merged PRs (30d)
- 22
Description
test::iterator implemented in tests/std/include/range_algorithm_support.hpp does support wrapping and unwrapping to help catch improper unwrapping and rewrapping in algorithm and view implementations. It doesn't have a strong notion of provenance like our container debug iterators, so it won't catch things like:
_It _Last{};
_Seek_wrapped(_First, /*...*/);
_Seek_wrapped(_Last, /*...*/);
return subrange(_First, _Last);
which could be pairing a parented _First with the non-parented _Last in the returned range. We should enhance test::iterator with such a notion to improve our test coverage.
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 in tests/std/include/range_algorithm_support.hpp and inspect how test::iterator currently wraps and unwraps iterators. Trace the shown _Seek_wrapped and subrange scenario to understand where provenance is lost. Done means test::iterator has a provenance notion that improves coverage for mismatched parented and non-parented iterators.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- testing-qa
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100