Tuned mock::retrieve to provide a better error message when retrieving const data into non-const pointer

git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@98 860be788-9bd5-4423-9f1e-828f051e677b
This commit is contained in:
mat007 2010-01-22 23:17:41 +00:00
parent e07c59c436
commit 4d2a30b176
2 changed files with 7 additions and 1 deletions

View file

@ -87,6 +87,12 @@ BOOST_AUTO_TEST_CASE( retrieve )
BOOST_CHECK( mock::retrieve( i ).functor_( j ) );
BOOST_CHECK_EQUAL( i, &j );
}
{
const int* i = 0;
int j = 1;
BOOST_CHECK( mock::retrieve( i ).functor_( j ) );
BOOST_CHECK_EQUAL( i, &j );
}
{
int* i = 0;
int j = 1;