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
This commit is contained in:
Alexander Grund 2020-07-11 14:01:18 +02:00
parent a6aa140148
commit 5ef17d0e33
No known key found for this signature in database
GPG key ID: AA48A0760367A42B
42 changed files with 400 additions and 285 deletions

View file

@ -6,7 +6,6 @@
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#define BOOST_AUTO_TEST_MAIN
#include <boost/test/auto_unit_test.hpp>
#include <turtle/mock.hpp>
@ -35,7 +34,7 @@ namespace limitations_const_parameter_warning_explanation
//]
}
namespace limitations_const_parameter_warning_solution
namespace
{
//[ limitations_const_parameter_warning_solution
MOCK_BASE_CLASS( mock_base, base )
@ -48,3 +47,10 @@ namespace limitations_const_parameter_warning_solution
};
//]
}
BOOST_AUTO_TEST_CASE(check_method_stub_is_called)
{
mock_base b;
MOCK_EXPECT(b.method).once().with(1);
static_cast<base*>(&b)->method(1);
}