catch2/projects/SelfTest
mat tso a47b8dee74 Add support toString for containers
Standard container types were printed as `"{?}"`
(default `toString` implementation for unsupported class).
This was contradictory with the documentation:
> "Most [...] std types are supported out of the box"
when in fact only `string`, `vector` and `tupple` were supported.

 - Renamed the `toStringVector.cpp` test file to `toStringContainers.cpp`

 - Types are consider containers if they contain `value_type` and
   `const_iterator` members and have `begin` and `end` support
   (members or ADL findable) returning a `const_iterator`.
   `const_iterator::operator*` must also return a `const value_type &`

 - Beware that a trying to printing a type fulfilling those requirements
   but returning invalid iterators will results in undefined behaviour. In
   such case specialize the Catch::Detail::IsContainer trait to contain
   `static const bool value = false` to revert to the default behaviour
   (printing `"{?}"`).

Test pretty printing of `std::list`, `std::deque`, `std::forward_list`,
`std::array` in Catch assertion macro. More complex structure like
`std::queue` or `std::multi_map` should also be tested.

Signed-off-by: mat tso <mat-tso@topmail.ie>
2016-10-14 04:11:40 +02:00
..
Baselines rebased following recent changes 2016-09-27 10:28:11 +01:00
SurrogateCpps Test self sufficiency of tostring.hpp header 2016-10-11 03:10:41 +02:00
ApproxTests.cpp Stripped trailing whitespace from all source code lines 2015-11-04 18:04:15 +00:00
BDDTests.cpp Stripped trailing whitespace from all source code lines 2015-11-04 18:04:15 +00:00
ClassTests.cpp Stripped trailing whitespace from all source code lines 2015-11-04 18:04:15 +00:00
CmdLineTests.cpp Fixed an issue on some compilers with implicit conversion from nullptr to Ptr 2015-07-03 18:27:36 +01:00
ConditionTests.cpp Fixed !shouldfail 2016-03-14 19:13:34 +00:00
EnumToString.cpp removed some warnings 2014-10-03 08:17:40 +01:00
ExceptionTests.cpp Removed some trailing whitespace 2015-12-04 10:20:33 +00:00
GeneratorTests.cpp Stripped trailing whitespace from all source code lines 2015-11-04 18:04:15 +00:00
makefile Prepare toString support for std containers 2016-10-11 03:10:41 +02:00
MessageTests.cpp Stripped trailing whitespace from all source code lines 2015-11-04 18:04:15 +00:00
MiscTests.cpp -f supports quoted test names (test name surrounded with " characters). 2016-09-27 10:27:28 +01:00
PartTrackerTests.cpp Stripped trailing whitespace from all source code lines 2015-11-04 18:04:15 +00:00
TagAliasTests.cpp Don't introduce Catch::Matchers namespace in macro 2015-11-05 18:10:33 +00:00
TestMain.cpp Updated embedded Clara to 0.0.2.3 2016-04-23 13:21:29 +01:00
ToStringContainers.cpp Add support toString for containers 2016-10-14 04:11:40 +02:00
ToStringPair.cpp Publish toString support for pairs 2016-10-11 03:10:41 +02:00
ToStringTuple.cpp Use CATCH_NULL instead of NULL 2015-07-01 07:33:27 +01:00
ToStringWhich.cpp Some minor tidy-up/ style alignment of recent toString merges 2014-09-04 07:27:09 +01:00
TrickyTests.cpp Stripped trailing whitespace from all source code lines 2015-11-04 18:04:15 +00:00
VariadicMacrosTests.cpp handle TEST_CASE_METHOD macro consistently 2013-05-14 19:31:21 +01:00