mirror of
https://github.com/mat007/turtle.git
synced 2026-06-22 12:13:43 +00:00
Fixed a crash with Boost.Test when failed static mock objects are destroyed
git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@338 860be788-9bd5-4423-9f1e-828f051e677b
This commit is contained in:
parent
90cd7f7bd8
commit
9025ff2f0d
1 changed files with 11 additions and 0 deletions
|
|
@ -9,6 +9,7 @@
|
||||||
#ifndef MOCK_BOOST_TEST_ERROR_POLICY_HPP_INCLUDED
|
#ifndef MOCK_BOOST_TEST_ERROR_POLICY_HPP_INCLUDED
|
||||||
#define MOCK_BOOST_TEST_ERROR_POLICY_HPP_INCLUDED
|
#define MOCK_BOOST_TEST_ERROR_POLICY_HPP_INCLUDED
|
||||||
|
|
||||||
|
#include "root.hpp"
|
||||||
#include <boost/test/framework.hpp>
|
#include <boost/test/framework.hpp>
|
||||||
#include <boost/test/test_tools.hpp>
|
#include <boost/test/test_tools.hpp>
|
||||||
#include <boost/test/unit_test_suite.hpp>
|
#include <boost/test/unit_test_suite.hpp>
|
||||||
|
|
@ -86,6 +87,16 @@ namespace mock
|
||||||
fail( "untriggered expectation", context, file, line );
|
fail( "untriggered expectation", context, file, line );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct cleanup
|
||||||
|
{
|
||||||
|
~cleanup()
|
||||||
|
{
|
||||||
|
//mock::verify(); // $$$$ MAT : because of a bug in Boost.Test this will crash anything needs to be logged
|
||||||
|
mock::reset();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
BOOST_GLOBAL_FIXTURE( cleanup );
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // MOCK_BOOST_TEST_ERROR_POLICY_HPP_INCLUDED
|
#endif // MOCK_BOOST_TEST_ERROR_POLICY_HPP_INCLUDED
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue