mirror of
https://github.com/mat007/turtle.git
synced 2026-06-22 12:13:43 +00:00
Fixed a crash due to static deinitialization order fiasco on some platforms
git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@144 860be788-9bd5-4423-9f1e-828f051e677b
This commit is contained in:
parent
4647bfd007
commit
f0fd0428d8
5 changed files with 36 additions and 6 deletions
|
|
@ -53,6 +53,13 @@ namespace
|
|||
};
|
||||
}
|
||||
|
||||
// static
|
||||
|
||||
namespace
|
||||
{
|
||||
boost::function< void() > static_f;
|
||||
}
|
||||
|
||||
// functor
|
||||
|
||||
BOOST_FIXTURE_TEST_CASE( a_function_can_be_passed_as_functor, error_fixture )
|
||||
|
|
|
|||
|
|
@ -81,3 +81,13 @@ BOOST_AUTO_TEST_CASE( an_object_is_copiable_by_sharing_its_state )
|
|||
o2.reset();
|
||||
BOOST_CHECK( ! o1.verify() );
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE( an_object_can_be_destroyed_before_its_children_functions )
|
||||
{
|
||||
mock::function< void() > f;
|
||||
{
|
||||
mock::object o;
|
||||
o.set_child( f );
|
||||
}
|
||||
f.test();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue