mirror of
https://github.com/mat007/turtle.git
synced 2026-06-22 12:13:43 +00:00
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:
parent
e07c59c436
commit
4d2a30b176
2 changed files with 7 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue