diff --git a/test/default/scalarmult.c b/test/default/scalarmult.c index a7f0ea9a..1de4c84e 100644 --- a/test/default/scalarmult.c +++ b/test/default/scalarmult.c @@ -20,5 +20,12 @@ int main(void) printf("0x%02x",(unsigned int) alicepk[i]); if (i % 8 == 7) printf("\n"); } + assert(crypto_scalarmult_bytes() > 0U); + assert(crypto_scalarmult_scalarbytes() > 0U); + assert(strcmp(crypto_scalarmult_primitive(), "curve25519") == 0); + assert(crypto_scalarmult_bytes() == crypto_scalarmult_curve25519_bytes()); + assert(crypto_scalarmult_scalarbytes() == crypto_scalarmult_curve25519_scalarbytes()); + assert(crypto_scalarmult_bytes() == crypto_scalarmult_scalarbytes()); + return 0; } diff --git a/test/default/shorthash.c b/test/default/shorthash.c index eaada1bc..fff58a88 100644 --- a/test/default/shorthash.c +++ b/test/default/shorthash.c @@ -16,5 +16,11 @@ int main(void) for (j = 0;j < crypto_shorthash_BYTES;++j) printf("%02x",(unsigned int) out[j]); printf("\n"); } + assert(crypto_shorthash_bytes() > 0); + assert(crypto_shorthash_keybytes() > 0); + assert(strcmp(crypto_shorthash_primitive(), "siphash24") == 0); + assert(crypto_shorthash_bytes() == crypto_shorthash_siphash24_bytes()); + assert(crypto_shorthash_keybytes() == crypto_shorthash_siphash24_keybytes()); + return 0; } diff --git a/test/default/sodium_core.c b/test/default/sodium_core.c index c100d03a..01472255 100644 --- a/test/default/sodium_core.c +++ b/test/default/sodium_core.c @@ -4,7 +4,11 @@ int main(void) { - printf ("%d\n", sodium_init()); + printf ("%d\n", sodium_init()); - return 0; + (void) sodium_runtime_has_neon(); + (void) sodium_runtime_has_sse2(); + (void) sodium_runtime_has_sse3(); + + return 0; } diff --git a/test/default/verify1.c b/test/default/verify1.c index 23a64174..29550bfb 100644 --- a/test/default/verify1.c +++ b/test/default/verify1.c @@ -28,5 +28,9 @@ int main(void) printf("%d\n", crypto_verify_32(v32, v32x)); printf("%d\n", crypto_verify_64(v64, v64x)); + assert(crypto_verify_16_bytes() == 16U); + assert(crypto_verify_32_bytes() == 32U); + assert(crypto_verify_64_bytes() == 64U); + return 0; }