catchorg / catchorg/Catch2

Add new range Matchers using the new generic matcher support

Open
#2,087 1 comment 0 reactions 0 assignees View on GitHub
Feature Request
Dominant language
C++
Stars
21.5k
Forks
3.5k
Avg merge
3d 16h
Merged PRs (30d)
2

Description

**Description**
v3 contain facilities for type-generic matchers, so that a matcher can be used on an arbitrary input type, as long as it fulfills the correct concept.

Catch2 already [provides some generic matchers](https://github.com/catchorg/Catch2/blob/devel/docs/matchers.md#generic-range-matchers), but it should provide more of them. The most obvious missing ones are

* `ElementsAre`, which would perform check that the input arg is exactly equal to the elements
* `UnorderedElementsAre`, which would perform check that the input arg is equal to the elements, in some permutation.

**Additional context**
Both of the matchers should allow providing either an exact value, or a matcher, as any of the construction arguments.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.