Skip the misuse handler test when running benchmarks or wasm

This commit is contained in:
Frank Denis 2022-12-20 13:17:11 +01:00
parent 62424f2840
commit 6d726c70e4

View File

@ -31,11 +31,11 @@ main(void)
(void) sodium_runtime_has_rdrand();
sodium_set_misuse_handler(misuse_handler);
#ifndef __EMSCRIPTEN__
#if defined(__EMSCRIPTEN__) || defined(__wasm__) || defined(BENCHMARKS)
printf("misuse_handler()\n");
#else
sodium_misuse();
printf("Misuse handler returned\n");
#else
printf("misuse_handler()\n");
#endif
return 0;