Documented the new vector matchers

This commit is contained in:
Martin Hořeňovský 2017-02-24 15:42:11 +01:00
parent 71e500f4b5
commit 593161ddd8
1 changed files with 4 additions and 3 deletions

View File

@ -34,9 +34,10 @@ REQUIRE_THAT( str,
``` ```
## Built in matchers ## Built in matchers
Currently only a few string matchers are built-in: `StartsWith`, `EndsWith`, and `Contains` and `Equals`. Currently Catch has some string matchers and some vector matchers.
These each take an optional second argument for case sensitivity (defaulting to case sensitive). The string matchers are `StartsWith`, `EndsWith`, `Contains` and `Equals`. Each of them also takes an optional second argument, that decides case sensitivity (by-default, they are case sensitive).
More matchers will be coming - for example for testing elements in a vector. The vector matchers are `Contains`, `VectorContains` and `Equals`. `VectorContains` looks for a single element in the matched vector, `Contains` looks for a set (vector) of elements inside the matched vector.
## Custom matchers ## Custom matchers
It's easy to provide your own matchers to extend Catch or just to work with your own types. It's easy to provide your own matchers to extend Catch or just to work with your own types.