microsoft / microsoft/STL

`<ranges>`: Add missing test coverage for `ranges::view_interface::c(begin|end)`

Open
#3,391 0 comments 1 reaction 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

#3187 introduced new members to ranges::view_interface: cbegin and cend. While there is small coverage for those functions in P0896R4_ranges_subrange/test.compile.pass.cpp, I believe that we should add extra assertions to each views tests (see #3350 for example).

  • as_const (#3920),
  • as_rvalue,
  • adjacent (#3508),
  • adjacent_transform (#3546),
  • cartesian_product (#3561),
  • chunk,
  • chunk_by,
  • common (#3612),
  • drop (#3390),
  • drop_while (#3390),
  • elements (#3350),
  • empty (#3553),
  • enumerate (#3472),
  • filter (#3612),
  • std::generator,
  • iota (#3553),
  • istream (#3553),
  • join (#3612),
  • join_with,
  • lazy_split,
  • owning_view (#3753),
  • ref_view (#3612),
  • repeat (#3553),
  • reverse (#3612),
  • single (#3553),
  • slide,
  • split,
  • stride (#3920),
  • subrange (#3612),
  • take (#3390),
  • take_while (#3390),
  • transform (#3612),
  • zip (#3920),
  • zip_transform (#3322).

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

The existing coverage is in P0896R4_ranges_subrange/test.compile.pass.cpp; compare it with the views tests and the example from #3350. Add equivalent cbegin/cend assertions for the unchecked entries—as_rvalue, chunk, chunk_by, generator, join_with, lazy_split, slide, and split—then run the affected tests; done means each unchecked view is covered.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 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.