mirror of
https://github.com/mat007/turtle.git
synced 2026-06-22 12:13:43 +00:00
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:
parent
a6aa140148
commit
5ef17d0e33
42 changed files with 400 additions and 285 deletions
|
|
@ -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>
|
||||
|
||||
|
|
@ -17,14 +16,14 @@ namespace
|
|||
{
|
||||
virtual ~base_class() = default;
|
||||
|
||||
virtual void method() throw ();
|
||||
virtual void method() throw() = 0;
|
||||
};
|
||||
//]
|
||||
|
||||
//[ limitations_throw_specifier_solution
|
||||
MOCK_BASE_CLASS( mock_class, base_class )
|
||||
{
|
||||
void method() throw ()
|
||||
void method() throw() override
|
||||
{
|
||||
method_proxy();
|
||||
}
|
||||
|
|
@ -32,3 +31,10 @@ namespace
|
|||
};
|
||||
//]
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(call_method_proxy)
|
||||
{
|
||||
mock_class b;
|
||||
MOCK_EXPECT(b.method).once();
|
||||
static_cast<base_class*>(&b)->method();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue