Commit graph

73 commits

Author SHA1 Message Date
Alexander Grund
3d5ac2b94a
Remove support for BOOST_IDENTITY_TYPE
MOCK_PROTECT_FUNCTION_SIG should be used instead which even requires less parentheses.
Closes #109
2022-01-25 17:32:22 +01:00
Alexander Grund
51fcd4f4b9
Remove usage of BOOST_IDENTITY_TYPE from official docs
Replaced by MOCK_PROTECT_FUNCTION_SIG
2022-01-25 16:07:19 +01:00
Alexander Grund
374482367f
Update changelog regarding TPL macros 2022-01-24 19:16:25 +01:00
Alexander Grund
bd0a4cfc73
Reduce exposed interface (macros)
Move implementation details to mock_impl.hpp and remove MOCK_*_TPL macros.
Make sure all exposed macros (in mock.hpp) are properly documented.
Closes #105
2022-01-24 19:03:15 +01:00
Alexander Grund
ee72e8b9d8
Format code using Clang-Format 10 and enforce via CI
Makes the format of the code base uniform.
2022-01-24 16:30:59 +01:00
Alexander Grund
f4c7401e2c
Rename class concept to avoid name clash with C++20 concept keyword 2022-01-07 17:08:17 +01:00
Alexander Grund
98541eb5a7
Change the threshold param of near to be inclusive
I.e. it means the maximum allowed difference, similar to how other testing frameworks handle this and it allows a threshold of 0 to mean "equal"
2022-01-07 17:08:17 +01:00
Alexander Grund
e26601672e
Remove ASSERT_VERIFY_FAIL macro from static_objects_problem 2022-01-07 17:08:17 +01:00
Alexander Grund
e43059423e
Remove test-artifact from user visible part of how_to_invoke_a_functor_passed_as_parameter_of_a_mock_method
Only show what is required
2022-01-07 17:08:16 +01:00
Alexander Grund
728dfd06eb
Remove user(doc) visible change to zero_plus_zero_is_zero_with_action
Tests via Fixture::teardown that the assertion is fulfilled
2022-01-07 17:08:16 +01:00
Alexander Grund
40a4b3ceb4
Add documentation about unwrap_ref back and add example 2022-01-07 17:08:16 +01:00
Alexander Grund
c7873cde4b
Adress review comments 2022-01-07 17:08:16 +01:00
Alexander Grund
66a046469a
"notok" -> "not ok" 2022-01-07 17:08:15 +01:00
Alexander Grund
d21f78edf1
Remove "using namespace mock_test" from patterns_retrieve_cref.cpp 2022-01-07 17:08:15 +01:00
Alexander Grund
492e6281d7
Avoid unused paramter warning in example 2022-01-07 17:08:14 +01:00
Alexander Grund
c2617ba360
Update from deprecated unit test header inclusion 2022-01-07 17:08:14 +01:00
Alexander Grund
04dff97fde
Use explicit streaming ops instead of Boost.LexicalCast 2022-01-07 17:08:14 +01:00
Alexander Grund
5ef17d0e33
Include examples in CI tests
Also fix and update examples and documentation where required
This allows to make sure examples are actually runnable avoiding them to
become outdated
2022-01-07 17:08:13 +01:00
Alexander Grund
a426e02759
Replace Boost.Bind by std::bind and lambdas 2022-01-07 17:08:12 +01:00
Alexander Grund
35e43d58a6
Use std::reference_wrapper instead of boost 2022-01-07 17:08:12 +01:00
Alexander Grund
353849e9ad
Use default/delete for ctor/dtor 2022-01-07 17:08:11 +01:00
Alexander Grund
2f72d5639e
Assume existance of lambdas 2022-01-07 17:08:11 +01:00
Alexander Grund
9faab7749c
Assume existance of <functional> 2022-01-07 17:08:11 +01:00
Alexander Grund
f678f4d91f
Assume nullptr existance 2022-01-07 17:08:10 +01:00
Alexander Grund
139918dc35
Add changelog for auto deducing method sig 2020-08-12 17:11:19 +02:00
Alexander Grund
1083954cfe
Remove remaining references to Boost.Mock 2020-07-16 13:08:46 +02:00
Alexander Grund
32d16f773b
Clean and remove build directory
Move scripts into scripts folder
Move doc-stuff into docs
Update CI & CMake scripts

See #89
2020-07-16 12:56:23 +02:00
Alexander Grund
3d44f9bfda
Create documentation on GHA 2020-07-15 22:53:19 +02:00
Mathieu Champlon
bbe01e6d9d Updated changelog for 1.3.2 2020-06-19 18:11:12 +02:00
Simon Giesecke
c22f19801b Made example method actually protected 2019-04-11 11:04:52 +02:00
Simon Giesecke
7b892418aa Adapt section title after prior extension to protected methods 2019-04-11 11:04:42 +02:00
Alexander Grund
f402c6161e Fix C++98 compatibility 2018-11-22 10:12:00 +01:00
Mathieu Champlon
a2647d00e9 Fixed gcc build error 2018-04-08 15:16:49 +02:00
Mathieu Champlon
4455222a62 Removed support for directly mocking a protected member function
Taking a function pointer on a base member protected function is actually invalid.
This could work with a pointer on the derived class member function, that is &derived::method instead of &base::method however there is no way to pass the derived class from MOCK_BASE_CLASS to the mock::detail::base helper if template classes are to be supported.

Anyway the now documented workaround is simple enough and the same as for private member functions.

As a side note the changes from ed36823235 might not be needed any more…
2018-04-08 15:16:49 +02:00
Mathieu Champlon
a178fc442a Removed stdcall tests and examples for all compilers but msvc 2018-04-08 15:16:48 +02:00
Mathieu Champlon
c42b708950 Fixed deprecation warning about std::uncaught_exception in c++17 for msvc 2018-03-25 09:46:40 +02:00
Mathieu Champlon
bccd3ff303 Added support for move only types to constraints
Therefore mock::retrieve now supports std::unique_ptr.
2018-03-12 08:34:28 +01:00
Mathieu Champlon
5d11db0f52 Added support for dereferencing in mock::equal 2018-03-12 08:33:53 +01:00
Mathieu Champlon
a2d36e961a Fixed move-only type support in constraints 2018-03-12 08:11:33 +01:00
Mathieu Champlon
d3a5d3010c Fixed move-only type argument in actions
Because boost::function does not move the parameters it receives we need to use std::function instead.
2018-03-12 08:11:33 +01:00
Mathieu Champlon
58b5e55bb5 Fixed alignement 2018-03-12 08:11:32 +01:00
Mathieu Champlon
2a635f1ef6 Fixed documentation issues 2017-05-29 09:12:16 +02:00
Mathieu Champlon
6daff2167c Added Catch integration 2017-05-29 09:12:03 +02:00
Mathieu Champlon
a22ca57253 Added MOCK_NO_AUTO_PTR to deactivate std::auto_ptr support 2017-03-20 11:43:18 +01:00
Mathieu Champlon
c847c85a77 Fixed mocking of a function returning a reference for gcc 4.1 2017-01-15 12:50:11 +01:00
Mathieu Champlon
cbb96523ea Removed link from code comment 2016-07-18 08:51:43 +02:00
Mathieu Champlon
28b010cff2 Updated version number 2016-07-17 23:23:35 +02:00
Mathieu Champlon
0bf55ff7f5 Fixed links to Boost.Test documentation 2016-07-17 23:23:15 +02:00
Mathieu Champlon
3a8c3b5d56 Updated example to use BOOST_IDENTITY_TYPE 2016-07-17 23:22:52 +02:00
Mathieu Champlon
94bedbd653 Removed round parenthesis in signature support for compilers without variadic macros
VS2015 has fixed the double parenthesis trick which was allowed in function signatures.
2016-07-16 13:46:17 +02:00