Commit graph

910 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
c910d1db8c
[CMake] Add IDE target for the turtle headers
Allows easier development in e.g. Visual Studio
2022-01-25 17:18:11 +01:00
Alexander Grund
cdb4c1494a
Document test/mock_error.hpp
Those test-only macros and structs are a bit tricky to read.
2022-01-25 16:24:37 +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
dc9d98e5a5
Also move the error macros to the detail header 2022-01-24 19:14:51 +01:00
Alexander Grund
3fe72f66ea
Don't use MOCK_*_EXT in tests
This is not really part of the public interface anymore as the variadic functions are enough.
2022-01-24 19:11:08 +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
3dda0bf328
Merge pull request #107 from Flamefire/clang-format
Format code using Clang-Format 10 and enforce via CI
2022-01-24 17:35:24 +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
b5bb500bd2
Merge pull request #88 from Flamefire/c++11
Port to C++11/C++14 removing superflous Boost facilities
2022-01-23 19:40:34 +01:00
Alexander Grund
23ed9584a0
Update CI
- Move travis to GHA (travis is dead for OSS)
- Update Boost on appveyor
2022-01-07 23:17:08 +01:00
Alexander Grund
2dede8303b
Avoid unused function warnings in compile fail tests
This avoids false positives when warnings-as-error is enabled
2022-01-07 18:28:08 +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
78fa67ecb8
Remove test checking for failure when NOT using "typename"/TPL macro
This is allowed in C++20 and doesn't need to be tested anyway.
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
cf5ac87499
Remove support for auto_ptr 2022-01-07 17:08:16 +01:00
Alexander Grund
c7873cde4b
Adress review comments 2022-01-07 17:08:16 +01:00
Alexander Grund
279bb2c767
Fix memory include 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
476c1a7831
Remove some superflous typedefs and default impls 2022-01-07 17:08:15 +01:00
Alexander Grund
d9f9fce6fc
Make action classes non-relocatable
This fixes an issue with auto_ptr. As shown by missing coverage the
actual copy/move ctors are not required as C++11 emplace functions can
be used.
Furthermore some places using shared_ptr could be replaced by unique_ptr
leading to better performance.
2022-01-07 17:08:15 +01:00
Alexander Grund
f3d6564d2b
Use make_* functions instead of new 2022-01-07 17:08:15 +01:00
Alexander Grund
558e1ca135
Don't error when TURTLE_AUTO_PTR=ON 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
91b738da27
Avoid Boost.Bind deprecation warning 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
d9a10afc12
Include definition for void_t to avoid dependency on Boost 1.64+ 2022-01-07 17:08:14 +01:00
Alexander Grund
823fd994ff
Remove some Boost.PP stuff 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
898a5a4524
Document and improve is_functor 2022-01-07 17:08:13 +01:00
Alexander Grund
446e70be53
Remove boost::result_of 2022-01-07 17:08:13 +01:00
Alexander Grund
9af9f0e2ea
Replace Boost.TypeInfo 2022-01-07 17:08:13 +01:00
Alexander Grund
6702d68940
Use range-based for-loops 2022-01-07 17:08:13 +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
a6aa140148
Remove superflous test instantiations 2022-01-07 17:08:12 +01:00
Alexander Grund
ed8c58d813
Remove Boost.Typeof 2022-01-07 17:08:12 +01:00
Alexander Grund
908ca385b9
Add docstrings to mock.hpp 2022-01-07 17:08:12 +01:00
Alexander Grund
52d21a86af
Get rid of BOOST_IDENTITY_TYPE 2022-01-07 17:08:12 +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
35fa6e63e6
Use std smart pointers in code 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