Add memory_buffer_alloc_self_test()

This commit is contained in:
Manuel Pégourié-Gonnard 2014-11-27 11:33:55 +01:00 committed by Paul Bakker
parent 5cb4b31057
commit 5ba1d52f96
3 changed files with 145 additions and 3 deletions

View file

@ -226,16 +226,23 @@ int main( int argc, char *argv[] )
#if defined(POLARSSL_MEMORY_BUFFER_ALLOC_C) && defined(POLARSSL_MEMORY_DEBUG)
memory_buffer_alloc_status();
#endif
}
#if defined(POLARSSL_MEMORY_BUFFER_ALLOC_C)
memory_buffer_alloc_free();
if( ( ret = memory_buffer_alloc_self_test( v ) ) != 0 )
return( ret );
#endif
if( v != 0 )
{
printf( " [ All tests passed ]\n\n" );
#if defined(_WIN32)
printf( " Press Enter to exit this program.\n" );
fflush( stdout ); getchar();
#endif
}
#if defined(POLARSSL_MEMORY_BUFFER_ALLOC_C)
memory_buffer_alloc_free();
#endif
return( ret );
}