microsoft / microsoft/STL

`<flat_map>`: Missing test coverage

Open
#6,045 2 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

flat_meow test
Dominant language
C++
Stars
11.1k
Forks
1.7k
Avg merge
4d 15h
Merged PRs (30d)
22

Description

P0429R9_flat_map is missing some test coverage, especially for flat_map-specific members that aren't present for flat_multimap, although the latter is slightly affected.

  • operator[] (extremely important, obviously)
  • at() (both success and exceptional cases)
  • emplace()
  • try_emplace() (including hint and transparent forms)
  • replace() (when successful, not just death)

In some cases there's a tiny bit of coverage but not focused testing.

Since we have decent libcxx coverage, I'm not too worried, but tests/std is what exercises our more exotic compiler options, and also EDG, so we should ideally have coverage there.

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

In tests/std, locate the existing P0429R9_flat_map coverage and read or run the related flat_map and flat_multimap tests first. Add focused tests for the listed flat_map members and cases, including exceptional at(), hint and transparent try_emplace(), and successful replace(); done means these scenarios are covered under the repository's test configurations.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
testing-qa
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
64/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.