mirror of
https://github.com/mat007/turtle.git
synced 2026-06-22 12:13:43 +00:00
Added detection for a pointer in mock::assign to dereference it before performing the assignment
git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@158 860be788-9bd5-4423-9f1e-828f051e677b
This commit is contained in:
parent
a4b061184c
commit
df46dec9e0
3 changed files with 28 additions and 15 deletions
|
|
@ -59,6 +59,11 @@ BOOST_AUTO_TEST_CASE( assign )
|
|||
BOOST_CHECK( mock::assign( 3 ).f_( i ) );
|
||||
BOOST_CHECK_EQUAL( 3, i );
|
||||
}
|
||||
{
|
||||
int i = 0;
|
||||
BOOST_CHECK( mock::assign( 3 ).f_( &i ) );
|
||||
BOOST_CHECK_EQUAL( 3, i );
|
||||
}
|
||||
{
|
||||
const int* i = 0;
|
||||
const int j = 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue