Don't include warning headers from catch_xmlwriter.hpp

This prevents Catch from disabling `Wpadded` for Clang inside test files
(files that do not define either `CATCH_CONFIG_MAIN` or
`CATCH_CONFIG_RUNNER`).

catch_suppress_warnings.h and catch_reenable_warnings.h should be
included only once*, so that the stitching script includes them as the
first and last header respectively, since it only includes each header
once. This caused a bug, where the first one was included properly, but
the second one was included prematurely, from catch_xmlwriter.hpp, and
thus was guarded by `CATCH_IMPL`.

* At least until the stitching script is changed to accomodate common
warning disabling header.

Fixes #871
This commit is contained in:
Martin Hořeňovský 2017-06-02 19:10:57 +02:00
parent 377c9a746d
commit adb66f55a7

View File

@ -10,7 +10,6 @@
#include "catch_stream.h" #include "catch_stream.h"
#include "catch_compiler_capabilities.h" #include "catch_compiler_capabilities.h"
#include "catch_suppress_warnings.h"
#include <sstream> #include <sstream>
#include <string> #include <string>
@ -241,6 +240,5 @@ namespace Catch {
}; };
} }
#include "catch_reenable_warnings.h"
#endif // TWOBLUECUBES_CATCH_XMLWRITER_HPP_INCLUDED #endif // TWOBLUECUBES_CATCH_XMLWRITER_HPP_INCLUDED