Add IsEmpty and SizeIs matchers for ranges/containers

`SizeIs` can accept both `size_t` and a matcher. In the first case,
it checks whether the size of the range is equal to specified size.
In the second case, it checks whether the provided matcher accepts
the size of the range.
This commit is contained in:
Martin Hořeňovský
2020-03-09 11:13:07 +01:00
parent f52a58e857
commit 3a3efebd16
15 changed files with 666 additions and 10 deletions

View File

@@ -81,6 +81,7 @@ Nor would this
:test-result: PASS Arbitrary predicate matcher
:test-result: PASS Assertions then sections
:test-result: PASS Basic use of the Contains range matcher
:test-result: PASS Basic use of the Empty range matcher
:test-result: PASS CAPTURE can deal with complex expressions
:test-result: PASS CAPTURE can deal with complex expressions involving commas
:test-result: PASS CAPTURE parses string and character constants
@@ -218,6 +219,7 @@ Message from section two
:test-result: PASS Tracker
:test-result: PASS Trim strings
:test-result: FAIL Unexpected exceptions can be translated
:test-result: PASS Usage of the SizeIs range matcher
:test-result: PASS Use a custom approx
:test-result: PASS Variadic macros
:test-result: PASS Vector Approx matcher