#define YACA_INVALID_PARAM(func) YACA_RESULT(YACA_ERROR_INVALID_PARAMETER, func);
-typedef std::unique_ptr<char, int (*)(void*)> ChrPtr;
-typedef std::unique_ptr<yaca_key_s, int (*)(yaca_key_h)> KeyPtr;
-typedef std::unique_ptr<yaca_context_s, int (*)(yaca_context_h)> CtxPtr;
+typedef std::unique_ptr<char, void (*)(void*)> ChrPtr;
+typedef std::unique_ptr<yaca_key_s, void (*)(yaca_key_h)> KeyPtr;
+typedef std::unique_ptr<yaca_context_s, void (*)(yaca_context_h)> CtxPtr;
typedef std::vector<char> Buffer;
RUNNER_TEST(T1040_yaca_free, YacaTest)
{
- YACA_SUCCESS(yaca_free(nullptr));
+ yaca_free(nullptr);
void* memory;
- YACA_SUCCESS(yaca_malloc(42, &memory))
- YACA_SUCCESS(yaca_free(memory));
+ YACA_SUCCESS(yaca_malloc(42, &memory));
+
+ yaca_free(memory);
}
RUNNER_TEST(T1050_yaca_randomize_bytes, YacaTest)
RUNNER_TEST(T1080_yaca_context_destroy, YacaTest)
{
- YACA_SUCCESS(yaca_context_destroy(YACA_CONTEXT_NULL));
+ yaca_context_destroy(YACA_CONTEXT_NULL);
yaca_context_h ctx;
YACA_SUCCESS(yaca_digest_initialize(&ctx, YACA_DIGEST_MD5));
- YACA_SUCCESS(yaca_context_destroy(ctx));
+ yaca_context_destroy(ctx);
}
RUNNER_TEST(T1090_yaca_get_output_length_invalid_param)