Commit Graph

15 Commits

Author SHA1 Message Date
Miguel Gaio
f1faaa9c10 Fix convert from char on ARM build
Some platforms set the signedness of char to unsigned (eg. ARM).
Convert from char should not assume the signedness of char.

Fix build issue with -Werror,-Wtautological-unsigned-zero-compare flags.

Signed-off-by: Miguel Gaio <mgaio35@gmail.com>
2018-10-13 12:56:05 +02:00
melak47
a575536abe Add StringMaker for std::(w)string_view
Fixes #1375
2018-09-10 11:37:26 +02:00
Martin Hořeňovský
1c1b447ede Properly guard CATCH_CONFIG_ENABLE_CHRONO_STRINGMAKER definition 2018-07-03 09:29:26 +02:00
Phil Nash
1dce91d78e Reverted removal of #ifdef for chrono converters, and fixed in OC project a different way
- seems the #ifdef was necessary after all, because of the difference in the way the cpp files are included in the full project vs the single include
- in the OC project I moved the #include of catch_tostring.cpp first. That solves the project for now, but is a brittle solution
2018-06-12 15:37:06 +01:00
Phil Nash
788f81230f Fixed errors and warnings on OC project 2018-06-12 13:42:33 +01:00
Tomas Zeman
352853ed7e Introduce conditional wchar_t (and std::wstring) support
The support is turned on by default but the user might need to be able
to turn it off which is now possible by defining CATCH_CONFIG_NO_WCHAR.
2018-03-07 10:35:31 +01:00
Martin Hořeňovský
baf3d2f360 Split out ratio_string::symbol bodies 2017-11-19 14:54:52 +01:00
Martin Hořeňovský
8dbaac61ff Final set of fixes for floating matchers approvals 2017-11-12 11:49:36 +01:00
Martin Hořeňovský
13370bddf2 Revert "Move <ctime> include out of line"
This reverts commit 36f02d76d6.
2017-11-08 08:31:48 +01:00
Martin Hořeňovský
36f02d76d6 Move <ctime> include out of line 2017-11-07 21:59:52 +01:00
Phil Nash
56e1075613 Introduced ReusableStringStream and removed all uses of std::ostringstream from the main path
ReusableStringStream holds a std::ostringstream internally, but only exposes the ostream interface.
It caches a pool of ostringstreams in a vector which is currently global, but will be made thread-local.

Altogether this should enable both runtime and compile-time benefits. although more work is needed to realise the compile time opportunities.
2017-11-07 18:01:10 +00:00
Martin Hořeňovský
9aa96712ae Sweep out some extra warnings
Swept:
`-Wpadded` in some places (where it caused extra size, instead of just
saying "hey, we padded struct at the end to align, just as standard says")
`-Wweak-vtables` everywhere (Clang)
`-Wexit-time-destructors` everywhere (Clang)
`-Wmissing-noreturn` everywhere (Clang)

The last three are enabled for Clang compilation going forward.

Also enabled `-Wunreachable-code` for Clang and GCC
2017-09-07 17:25:15 +02:00
Phil Nash
2d37649377 Fixed Objective-C mode 2017-09-06 15:44:42 +01:00
Phil Nash
0a614ee5ba re/moved some headers in catch_tostring 2017-07-19 08:31:10 +01:00
Martin Hořeňovský
fc32165d48 Started work on splitting out .cpp files from header files 2017-07-06 22:28:42 +02:00