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:
mat007 2010-04-01 22:03:43 +00:00
parent 4647bfd007
commit f0fd0428d8
5 changed files with 36 additions and 6 deletions

View file

@ -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 )

View file

@ -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();
}