Commit graph

45 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
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
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
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
c2617ba360
Update from deprecated unit test header inclusion 2022-01-07 17:08:14 +01:00
Alexander Grund
446e70be53
Remove boost::result_of 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
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
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
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
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
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
mat007
ee5ca2eca7 Fixed build
git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@639 860be788-9bd5-4423-9f1e-828f051e677b
2013-05-03 21:33:40 +00:00
mat007
01771a9331 Fixed build
git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@638 860be788-9bd5-4423-9f1e-828f051e677b
2013-05-03 21:19:52 +00:00
mat007
8a6e38a642 Refactoring
git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@618 860be788-9bd5-4423-9f1e-828f051e677b
2013-04-11 16:23:50 +00:00
mat007
5b2223f571 Removed auto link
git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@614 860be788-9bd5-4423-9f1e-828f051e677b
2013-04-11 16:08:44 +00:00
mat007
239f60a7da Cleanup
git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@613 860be788-9bd5-4423-9f1e-828f051e677b
2013-03-30 21:30:35 +00:00
mat007
02e2b4bbfd Return actions now accept by copy types derived from abstract base types
git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@612 860be788-9bd5-4423-9f1e-828f051e677b
2013-03-30 19:11:52 +00:00
mat007
c7a609404f Fixed missing file name and line number in logs
git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@576 860be788-9bd5-4423-9f1e-828f051e677b
2012-11-28 21:57:03 +00:00
mat007
8aa007af3b Added tests to ensure proper support for boost::result_of
git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@552 860be788-9bd5-4423-9f1e-828f051e677b
2012-09-02 21:30:45 +00:00
mat007
610405b750 Refactored error policy to simplify test frameworks integration
git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@536 860be788-9bd5-4423-9f1e-828f051e677b
2012-07-31 10:36:00 +00:00
mat007
bd30f8c492 Moved some components into a detail sub-directory
git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@489 860be788-9bd5-4423-9f1e-828f051e677b
2012-07-22 07:03:54 +00:00
mat007
3ab7fea2a0 Moved some components into a detail sub-directory
git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@482 860be788-9bd5-4423-9f1e-828f051e677b
2012-07-22 07:00:51 +00:00
Renamed from test/test_function.cpp (Browse further)