Doc: How are generic range matchers used?
Hello,
using Catch2 v3.4.0.
I'm struggling to get the generic range matchers (defined in matchers/catch_matchers_range_equals.hpp) to work (as in: compile). I wasn't even able to find an example on the internet. Is there some documentation explaining them?
Best regards, Paul
Got confused by a false-positive IDE warning ... but it is as easy as that:
std::vector<int> tableContent{1,2,3,5};
std::vector<int> values{3,5,2,1};
REQUIRE_THAT(tableContent, Catch::Matchers::UnorderedRangeEquals(values));
Hi @PaulFocus and @horenmar
We want to work on this issue as part of our course project. Could you please assign it to me and, if possible, can you please help us to know the issue better. Our question is is it either a bug or just a query by the author ?
Thanks
Hello chaitu9780,
the code itself works fine. I just had problems with the syntax for reasons I'm not able to remember anymore.
I recommend adding a code example to the documentation for various matchers under the following heading: https://github.com/catchorg/Catch2/blob/devel/docs/matchers.md#generic-range-matchers
EDIT: I'm not allowed to assign tickets to you.
BR, Paul