Commit graph

126 commits

Author SHA1 Message Date
Alexander Grund
9e664b52ab
Replace Boost.Move by std equivalents 2022-01-07 17:08:10 +01:00
Mathieu Champlon
931345c722
Merge pull request #95 from Flamefire/mock_method_wo_sig
Auto-deduce method sig in MOCK_METHOD_(NON)CONST
2020-08-03 07:30:39 +02:00
Alexander Grund
675969eafd
Auto-deduce method sig in MOCK_METHOD_(NON)CONST
Fixes #93
2020-07-27 17:05:05 +02:00
Alexander Grund
1083954cfe
Remove remaining references to Boost.Mock 2020-07-16 13:08:46 +02:00
Alexander Grund
074c82315c
[CI] Require C++14 on travis 2020-07-14 17:42:52 +02:00
Alexander Grund
70ae7674e5
Disable -Wunused-function for tests 2020-04-18 18:18:43 +02:00
Alexander Grund
8530f691a1
Reduce amount of compilations
Remove defined_[12].cpp from all but 1 test per test file
This reduces the amount of compilations by 2*25=50 per configuration for a total of 200 (debug/release, static/shared)
2020-04-18 13:59:01 +02:00
Alexander Grund
6b0a438517
Fix link error in test_defined 2020-04-17 20:31:47 +02:00
Alexander Grund
a1a223901a Avoid unused function warnings in tests 2020-04-14 10:42:25 +02:00
Alexander Grund
e13e913a1e Remove main.cpp and add warning free build test
The main.cpp speeds up builds but fails for static boost.Test builds as
it is linked before Boost.Test which removes the required symbols
Enabling warning allows consumers of Turtle to build with warnings enabled
2020-04-14 10:40:28 +02:00
Flamefire
af49b04c19 Add CMake files 2019-12-28 13:58:24 +01:00
Alexander Grund
72e0daae5c Implement and use simple singleton
Based on old boost::unit_test::singleton
2018-11-22 14:41:11 +01:00
Alexander Grund
f402c6161e Fix C++98 compatibility 2018-11-22 10:12:00 +01:00
Mathieu Champlon
cd5f911f6d Fixed parameter forwarding bug in mock functions 2018-04-08 17:48:14 +02:00
Mathieu Champlon
20e7d50568 Fixed test failing for gcc 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
860e072439 Fixed perfect forwarding bug 2018-03-17 22:20:04 +01:00
Mathieu Champlon
176b9bdc01
Merge pull request #35 from mat007/support-move-only-types-as-arguments
Support move only types as arguments
2018-03-12 19:21:54 +01: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
179c26946c Added mock functor in namespace test 2018-03-08 09:36:57 +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
39e77bb49b Removed obsolete include 2017-01-15 12:41:17 +01: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
Mathieu Champlon
506e10f76a Added logging support for boost::optional 2016-02-08 11:25:17 +01:00
Mathieu Champlon
121c682d41 Fixed typo in test case names 2016-02-08 10:02:08 +01:00
Mathieu Champlon
86371b5695 Fixed multiply defined symbol definition for MOCK_FUNCTION included from several translation units 2015-09-08 09:22:50 +02:00
Mathieu Champlon
ae655b03fe Fixed link issue with gcc 2015-09-08 06:41:39 +02:00
Mathieu Champlon
ed36823235 Added support for mocking protected member function 2015-04-08 21:54:46 +02:00
Mathieu Champlon
12a252a850 Documented limitation concerning MOCK_METHOD_TPL 2015-04-08 21:29:50 +02:00
Mathieu Champlon
c950c24f52 Changed layout to match boost 2015-03-06 06:41:12 +01:00
mat007
02468ee43a Added multi-constraint
git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@772 860be788-9bd5-4423-9f1e-828f051e677b
2015-03-01 11:29:03 +00: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
6558254c50 Fixed boost::cref invalid for temporary objects
git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@759 860be788-9bd5-4423-9f1e-828f051e677b
2014-11-23 10:54:14 +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
897c0bdac3 Deactivated ICE producing code
git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@747 860be788-9bd5-4423-9f1e-828f051e677b
2014-05-29 10:17:08 +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
c7fef834a3 Removed non-supported MOCK_FUNCTOR test with non-default calling convention
git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@709 860be788-9bd5-4423-9f1e-828f051e677b
2014-02-07 14:44:30 +00:00
mat007
53e67c0a81 Changed MOCK_DESTRUCTOR and MOCK_*CONVERSION_OPERATOR to support different calling conventions
git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@707 860be788-9bd5-4423-9f1e-828f051e677b
2014-02-07 14:26:21 +00:00
mat007
41605b7bf3 Cleanup
git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@703 860be788-9bd5-4423-9f1e-828f051e677b
2014-02-07 14:25:52 +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
f03c3d96c5 Reverted previous commit
This doesn't work and probably never will.

git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@695 860be788-9bd5-4423-9f1e-828f051e677b
2013-11-13 09:42:35 +00:00