catch3
Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.
Clonegit clone https://git.progmasoft.com/catch3
Outline Config destructor to avoid including superfluous header
- Commit
3b297cf9b5aae20d152a844903a3260a91e85d65- Author
- Martin Hořeňovský ·
- Parents
66fe591477ca
Changes
src/catch2/catch_config.cpp | 4 ++++ src/catch2/catch_config.hpp | 5 +---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/catch2/catch_config.cpp b/src/catch2/catch_config.cpp index 6d579af4..ea7ec3de 100644 --- a/src/catch2/catch_config.cpp +++ b/src/catch2/catch_config.cpp @@ -7,6 +7,7 @@ #include <catch2/catch_config.hpp> #include <catch2/catch_enforce.h> +#include <catch2/catch_stream.h> #include <catch2/catch_stringref.h> namespace Catch { @@ -36,6 +37,9 @@ namespace Catch { m_testSpec = parser.testSpec(); } + Config::~Config() = default; + + std::string const& Config::getFilename() const { return m_data.outputFilename ; } diff --git a/src/catch2/catch_config.hpp b/src/catch2/catch_config.hpp index 85a7c84c..55fa5ed8 100644 --- a/src/catch2/catch_config.hpp +++ b/src/catch2/catch_config.hpp @@ -11,9 +11,6 @@ #include <catch2/catch_test_spec_parser.h> #include <catch2/catch_interfaces_config.h> -// Libstdc++ doesn't like incomplete classes for unique_ptr -#include <catch2/catch_stream.h> - #include <memory> #include <vector> #include <string> @@ -73,7 +70,7 @@ namespace Catch { Config() = default; Config( ConfigData const& data ); - virtual ~Config() = default; + ~Config() override; // = default in the cpp file std::string const& getFilename() const;