blob: 31286ba1954993ae9c587b84880035bed8ef4320 [file] [log] [blame]
Manuel Pégourié-Gonnard2c25eb02014-05-30 10:38:18 +02001/* BEGIN_HEADER */
2#include <polarssl/entropy.h>
3/* END_HEADER */
4
5/* BEGIN_DEPENDENCIES
6 * depends_on:POLARSSL_ENTROPY_C
7 * END_DEPENDENCIES
8 */
9
10/* BEGIN_CASE depends_on:POLARSSL_FS_IO */
11void entropy_seed_file( char *path, int ret )
12{
13 entropy_context ctx;
14
15 entropy_init( &ctx );
16
17 TEST_ASSERT( entropy_write_seed_file( &ctx, path ) == ret );
18 TEST_ASSERT( entropy_update_seed_file( &ctx, path ) == ret );
19
20 entropy_free( &ctx );
21}
22/* END_CASE */
23
24/* BEGIN_CASE depends_on:POLARSSL_SELF_TEST */
25void entropy_selftest( )
26{
27 TEST_ASSERT( entropy_self_test( 0 ) == 0 );
28}
29/* END_CASE */