microsoft / microsoft/STL

<test>: Ranges `test::iterator` could more closely emulate our wrapped container iterators

Open
#3,275 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

ranges test
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.