Commit graph

83 commits

Author SHA1 Message Date
Alexander Grund
700ceb9f4d
Remove fixture of tests in test_matcher
The fixture is not really required and can be replaced by definitions in
each test which even improves readability.
Also the tests are partially redundant due to implicit conversions so
add test in test_function for actual usage testing of string comparisons.
2023-01-03 18:55:45 +01:00
Alexander Grund
23ac665c22
Add some more cases for the serialization test of expectations
Make sure the various constraint names/values are kept (they are stored type-erased!)
2022-02-09 15:45:32 +01:00
Alexander Grund
e2687dea1a
Add missing test cases for the invocation class
- error case where between was called with a min>max
- Corner case for `between(x, x)`
- Human readable output via stream operator of the base class
2022-02-09 15:45:32 +01:00
Alexander Grund
1a81536f3c
Improve tests
- Check callability of function.expect.with(...)
- Check serialization of MOCK_CONSTRAINT
- Actually test some variations of MOCK_CONSTRAINT usages
- Add more test for unique_ptr (move-only class)
- Remove redundant stuff from test_log and change a few values to catch mistakes
- Add test for *-matcher serialization
2022-02-09 15:45:31 +01:00
Alexander Grund
b802c51c2d
Reduce number of template instantiations
Combine result_type, function_arity, parameter_types into 1 trait.
This reduces the amount of template classes instantiated by a factor of 3 which should improve compile times and memory consumption.

Also improve tests and documentation of touched classes/traits.
2022-01-26 20:03:42 +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
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
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
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
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
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
Alexander Grund
f154a1a22a
Assume existance of smart pointers 2022-01-07 17:08:11 +01:00
Alexander Grund
f678f4d91f
Assume nullptr existance 2022-01-07 17:08:10 +01:00
Alexander Grund
cf330e8c86
Remove usage of Boost.MPL and reduce Boost.FunctionTypes usage
They are known to be slow on compilation and C++11 offer better alternatives
2022-01-07 17:08:10 +01:00
Alexander Grund
df5b77af95
Replace Boost.TypeTraits by std equivalents 2022-01-07 17:08:10 +01:00
Alexander Grund
9e664b52ab
Replace Boost.Move by std equivalents 2022-01-07 17:08:10 +01:00
Mathieu Champlon
20e7d50568 Fixed test failing for gcc 2018-04-08 15:16:49 +02:00
Mathieu Champlon
860e072439 Fixed perfect forwarding bug 2018-03-17 22:20:04 +01: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
c950c24f52 Changed layout to match boost 2015-03-06 06:41:12 +01:00
mat007
c37537401c Fixed action for pointer to const data as return type
git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@770 860be788-9bd5-4423-9f1e-828f051e677b
2015-03-01 11:28:47 +00:00
mat007
2a88b87682 Dropped support for obsolete phoenix V2
git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@760 860be788-9bd5-4423-9f1e-828f051e677b
2014-12-13 20:41:03 +00:00
mat007
d5b216db8e Fixed lambdas conditional compilation
git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@754 860be788-9bd5-4423-9f1e-828f051e677b
2014-05-31 12:15:38 +00:00
mat007
5983b75343 Added boost inspect as part of tests run
git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@753 860be788-9bd5-4423-9f1e-828f051e677b
2014-05-31 11:35:36 +00:00
mat007
939ca29fb0 Fixed phoenix V2 includes
git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@750 860be788-9bd5-4423-9f1e-828f051e677b
2014-05-29 12:22:36 +00:00
mat007
077e046641 Updated to latest boost headers and layout
git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@748 860be788-9bd5-4423-9f1e-828f051e677b
2014-05-29 10:17:19 +00:00
mat007
086a42e432 Added thread-safety
git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@730 860be788-9bd5-4423-9f1e-828f051e677b
2014-05-20 05:56:27 +00:00
mat007
cbb4683dde Factorized MOCK_TYPE_NAME
git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@725 860be788-9bd5-4423-9f1e-828f051e677b
2014-04-26 07:06:58 +00:00
mat007
0609c6c1fa Forced MOCK_ERROR_POLICY to mock_error across all tests to prevent ODR violation
git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@697 860be788-9bd5-4423-9f1e-828f051e677b
2013-11-13 09:42:55 +00:00
mat007
86319a23d5 Removed call notifications upon mock object destruction
git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@690 860be788-9bd5-4423-9f1e-828f051e677b
2013-08-31 08:11:06 +00:00
mat007
028a3c3650 Renaming
git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@687 860be788-9bd5-4423-9f1e-828f051e677b
2013-08-13 22:39:16 +00:00
mat007
e210238932 Fix for gcc
git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@686 860be788-9bd5-4423-9f1e-828f051e677b
2013-08-13 22:39:10 +00:00
mat007
392240a87c Added move support in actions
git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@681 860be788-9bd5-4423-9f1e-828f051e677b
2013-08-13 21:43:14 +00:00
mat007
068f73b0bc Added support for movable only types as parameters
git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@676 860be788-9bd5-4423-9f1e-828f051e677b
2013-07-09 06:58:18 +00:00
mat007
8c26729399 Cleanup
git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@675 860be788-9bd5-4423-9f1e-828f051e677b
2013-07-09 06:58:06 +00:00
mat007
4f5090c109 Refactored to introduce MOCK_NULLPTR
git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@672 860be788-9bd5-4423-9f1e-828f051e677b
2013-07-06 21:19:20 +00:00
mat007
f97fb87f81 Added MOCK_NO_VARIADIC_MACROS to deactivate variadic macros support
git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@668 860be788-9bd5-4423-9f1e-828f051e677b
2013-06-04 22:02:09 +00:00
mat007
bd2fc97bb9 Refactoring
git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@666 860be788-9bd5-4423-9f1e-828f051e677b
2013-05-21 11:10:34 +00:00
mat007
c697b48802 Fixed regression
git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@665 860be788-9bd5-4423-9f1e-828f051e677b
2013-05-21 09:21:52 +00:00
mat007
1320a96179 Added support for nullptr as constraint
git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@648 860be788-9bd5-4423-9f1e-828f051e677b
2013-05-12 08:59:25 +00:00