Include sodium.h in cmptest.h and call sodium_init()/sodium_shutdown()

This commit is contained in:
Frank Denis 2013-04-18 14:57:41 +02:00
parent b8bfcb7bd6
commit fd11d8b7d7

View File

@ -4,6 +4,8 @@
#include <stdio.h> #include <stdio.h>
#include "sodium.h"
#define TEST_NAME_RES TEST_NAME ".res" #define TEST_NAME_RES TEST_NAME ".res"
#define TEST_NAME_OUT TEST_NAME ".exp" #define TEST_NAME_OUT TEST_NAME ".exp"
@ -19,7 +21,9 @@ int main(void)
perror("fopen(" TEST_NAME_RES ")"); perror("fopen(" TEST_NAME_RES ")");
return 99; return 99;
} }
sodium_init(NULL);
xmain(); xmain();
sodium_shutdown();
rewind(fp_res); rewind(fp_res);
if ((fp_out = fopen(TEST_NAME_OUT, "r")) == NULL) { if ((fp_out = fopen(TEST_NAME_OUT, "r")) == NULL) {
perror("fopen(" TEST_NAME_OUT ")"); perror("fopen(" TEST_NAME_OUT ")");