From a8a1c379c01aba491797be9b34ef59290da19914 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ho=C5=99e=C5=88ovsk=C3=BD?= Date: Tue, 21 Nov 2017 11:10:07 +0100 Subject: [PATCH] Introduce a way to intentionally expose interface for use in tests Fixes #1076 --- CMakeLists.txt | 1 + include/catch.hpp | 1 + include/internal/catch_user_interfaces.h | 18 ++++++++++++++++++ 3 files changed, 20 insertions(+) create mode 100644 include/internal/catch_user_interfaces.h 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