Fix using colours, fonts etc in CATCH assert messages

Include the header declaring the stream insertion operators for these
types before including catch.hpp itself as otherwise they may not be
seen when these classes are used and Catch::StringMaker is instantiated
using the "unstreamable" alternative for them.

It would probably be better to specialize Catch::StringMaker for these
types directly instead of relying on stream insertion operators, but
this would require more changes and in the meanwhile this improves the
display of failing checks.
This commit is contained in:
Vadim Zeitlin 2023-05-15 20:38:19 +01:00
parent d1fedc1415
commit 02eb3a26b6

View file

@ -4,7 +4,8 @@
#include "wx/wxprec.h" #include "wx/wxprec.h"
#include "wx/evtloop.h" #include "wx/evtloop.h"
// This needs to be included before catch.hpp to be taken into account. // These headers must be included before catch.hpp to be taken into account.
#include "asserthelper.h"
#include "testdate.h" #include "testdate.h"
// This needs to be defined before including catch.hpp for PCH support. // This needs to be defined before including catch.hpp for PCH support.