diff --git a/CMakeLists.txt b/CMakeLists.txt index 4befce9cb..c15c77fbb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,6 +17,13 @@ target_include_directories( "include" ) +target_compile_options( + mimicpp + INTERFACE + # this option is required to make __VA_OPT__ work on msvc + "$<$:/Zc:preprocessor>" +) + set(CMAKE_CXX_STANDARD 20) if (MIMICPP_FORCED_CXX_STANDARD) set(CMAKE_CXX_STANDARD ${MIMICPP_FORCED_CXX_STANDARD}) diff --git a/include/mimic++/InterfaceMock.hpp b/include/mimic++/InterfaceMock.hpp new file mode 100644 index 000000000..ff635b36c --- /dev/null +++ b/include/mimic++/InterfaceMock.hpp @@ -0,0 +1,23 @@ +// // Copyright Dominic (DNKpp) Koepke 2024 - 2024. +// // Distributed under the Boost Software License, Version 1.0. +// // (See accompanying file LICENSE_1_0.txt or copy at +// // https://www.boost.org/LICENSE_1_0.txt) + +#ifndef MIMICPP_INTERFACE_MOCK_HPP +#define MIMICPP_INTERFACE_MOCK_HPP + +#pragma once + +#include "mimic++/Fwd.hpp" +#include "mimic++/Mock.hpp" + +#endif + +namespace mimicpp +{ + /** + * \defgroup INTERFACES interfaces + * \ingroup MOCK + * \brief Contains utility to simplify interface mocking. + */ +} diff --git a/test/unit-tests/CMakeLists.txt b/test/unit-tests/CMakeLists.txt index 5fa205548..3a2991d18 100644 --- a/test/unit-tests/CMakeLists.txt +++ b/test/unit-tests/CMakeLists.txt @@ -8,6 +8,7 @@ add_executable( "Expectation.cpp" "ExpectationBuilder.cpp" "ExpectationPolicies.cpp" + "InterfaceMock.cpp" "Matcher.cpp" "Mock.cpp" "Printer.cpp" diff --git a/test/unit-tests/InterfaceMock.cpp b/test/unit-tests/InterfaceMock.cpp new file mode 100644 index 000000000..77826e311 --- /dev/null +++ b/test/unit-tests/InterfaceMock.cpp @@ -0,0 +1,19 @@ + // Copyright Dominic (DNKpp) Koepke 2024 - 2024. + // Distributed under the Boost Software License, Version 1.0. + // (See accompanying file LICENSE_1_0.txt or copy at + // https://www.boost.org/LICENSE_1_0.txt) + +#include "TestReporter.hpp" +#include "TestTypes.hpp" + +#include "mimic++/InterfaceMock.hpp" + +#include +#include +#include +#include +#include +#include +#include + +