aboutsummaryrefslogtreecommitdiff
path: root/test/src
diff options
context:
space:
mode:
authorJ08nY2017-08-30 14:22:20 +0200
committerJ08nY2017-08-30 14:22:20 +0200
commitbc643ab1903239d039f6b9527cb21029a886561d (patch)
tree0b6c690978561bd2536cbea2062544788fd19fee /test/src
parentbc4749776a3afae643788b8286f26596f70d142b (diff)
downloadecgen-bc643ab1903239d039f6b9527cb21029a886561d.tar.gz
ecgen-bc643ab1903239d039f6b9527cb21029a886561d.tar.zst
ecgen-bc643ab1903239d039f6b9527cb21029a886561d.zip
Use correct allocation functions. Add try_free.
Diffstat (limited to 'test/src')
-rw-r--r--test/src/test/utils.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/test/src/test/utils.c b/test/src/test/utils.c
index 8589efe..a5de092 100644
--- a/test/src/test/utils.c
+++ b/test/src/test/utils.c
@@ -3,8 +3,16 @@
* Copyright (C) 2017 J08nY
*/
#include "utils.h"
+#include <criterion/criterion.h>
#include <pari/pari.h>
-void default_setup(void) { pari_init(1000000, 1000000); }
+static void *cr_simple_calloc(size_t size) {
+ return cr_calloc(1, size);
+}
+
+void default_setup(void) {
+ pari_init(1000000, 1000000);
+ //set_mem_funcs(cr_malloc, cr_simple_calloc, cr_realloc, cr_free);
+}
void default_teardown(void) { pari_close(); } \ No newline at end of file