tests/test_mempool.c

changeset 1178
9998cfb4a65b
parent 993
b642eca4b956
--- a/tests/test_mempool.c	Mon Feb 10 19:20:43 2025 +0100
+++ b/tests/test_mempool.c	Mon Feb 10 19:24:26 2025 +0100
@@ -32,7 +32,7 @@
 #include "cx/mempool.h"
 
 CX_TEST(test_mempool_create) {
-    CxMempool *pool = cxBasicMempoolCreate(16);
+    CxMempool *pool = cxMempoolCreateSimple(16);
     CX_TEST_DO {
         CX_TEST_ASSERT(pool->auto_destr == NULL);
         CX_TEST_ASSERT(pool->allocator != NULL);
@@ -50,7 +50,7 @@
 }
 
 CX_TEST(test_mempool_malloc) {
-    CxMempool *pool = cxBasicMempoolCreate(4);
+    CxMempool *pool = cxMempoolCreateSimple(4);
     CX_TEST_DO {
         CX_TEST_ASSERT(cxMalloc(pool->allocator, sizeof(int)) != NULL);
         CX_TEST_ASSERT(cxMalloc(pool->allocator, sizeof(int)) != NULL);
@@ -69,7 +69,7 @@
 }
 
 CX_TEST(test_mempool_calloc) {
-    CxMempool *pool = cxBasicMempoolCreate(4);
+    CxMempool *pool = cxMempoolCreateSimple(4);
     CX_TEST_DO {
         int *test = cxCalloc(pool->allocator, 2, sizeof(int));
         CX_TEST_ASSERT(test != NULL);
@@ -112,7 +112,7 @@
 
 
 CX_TEST(test_mempool_free) {
-    CxMempool *pool = cxBasicMempoolCreate(4);
+    CxMempool *pool = cxMempoolCreateSimple(4);
     void *mem1, *mem2;
     CX_TEST_DO {
         mem1 = cxMalloc(pool->allocator, 16);
@@ -135,7 +135,7 @@
 }
 
 CX_TEST(test_mempool_destroy) {
-    CxMempool *pool = cxBasicMempoolCreate(4);
+    CxMempool *pool = cxMempoolCreateSimple(4);
     CX_TEST_DO {
         int *data = cxMalloc(pool->allocator, sizeof(int));
         *data = 13;
@@ -152,7 +152,7 @@
 }
 
 CX_TEST(test_mempool_register) {
-    CxMempool *pool = cxBasicMempoolCreate(4);
+    CxMempool *pool = cxMempoolCreateSimple(4);
     CX_TEST_DO {
         int *data = cxMalloc(pool->allocator, sizeof(int));
         test_mempool_destructor_called = 0;

mercurial