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
Introduce a way to intentionally expose interface for use in tests
- Commit
a8a1c379c01aba491797be9b34ef59290da19914- Author
- Martin Hořeňovský ·
- Parents
e08a4ed99ed0
Changes
CMakeLists.txt | 1 + include/catch.hpp | 1 + include/internal/catch_user_interfaces.h | 18 ++++++++++++++++++ 3 files changed, 20 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 106f23ab..e1208a9a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -178,6 +178,7 @@ set(INTERNAL_HEADERS ${HEADER_DIR}/internal/catch_timer.h ${HEADER_DIR}/internal/catch_tostring.h ${HEADER_DIR}/internal/catch_totals.h + ${HEADER_DIR}/internal/catch_user_interfaces.h ${HEADER_DIR}/internal/catch_version.h ${HEADER_DIR}/internal/catch_wildcard_pattern.h ${HEADER_DIR}/internal/catch_windows_h_proxy.h diff --git a/include/catch.hpp b/include/catch.hpp index 8294f404..34c551be 100644 --- a/include/catch.hpp +++ b/include/catch.hpp @@ -43,6 +43,7 @@ # endif #endif +#include "internal/catch_user_interfaces.h" #include "internal/catch_tag_alias_autoregistrar.h" #include "internal/catch_test_registry.h" #include "internal/catch_capture.hpp" diff --git a/include/internal/catch_user_interfaces.h b/include/internal/catch_user_interfaces.h new file mode 100644 index 00000000..35acb77b --- /dev/null +++ b/include/internal/catch_user_interfaces.h @@ -0,0 +1,18 @@ +/* + * Created by Martin on 21/11/2017. + * + * This file collects declaration that we want to expose to test files. + * These declarations are expected to be duplicated elsewhere, + * together with their implementation. + * + * Distributed under the Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + */ +#ifndef TWOBLUECUBES_CATCH_USER_INTERFACES_H_INCLUDED +#define TWOBLUECUBES_CATCH_USER_INTERFACES_H_INCLUDED + +namespace Catch { + unsigned int rngSeed(); +} + +#endif // TWOBLUECUBES_CATCH_USER_INTERFACES_H_INCLUDED