tests/test_mempool.c

changeset 1299
5dfce68057ce
parent 1283
89935fea4b7c
--- a/tests/test_mempool.c	Thu Apr 17 20:47:43 2025 +0200
+++ b/tests/test_mempool.c	Thu Apr 17 20:48:29 2025 +0200
@@ -199,6 +199,10 @@
         cxMempoolFree(src);
         CX_TEST_ASSERT(test_mempool_destructor_called == 0);
 
+        // cover illegal arguments
+        result = cxMempoolTransfer(dest, dest);
+        CX_TEST_ASSERT(result != 0);
+
         // verify that destroying new pool calls the destructors
         // but only three times (the old allocator has a different destructor)
         cxMempoolFree(dest);
@@ -206,10 +210,6 @@
 
         // free the foreign object
         free(c);
-
-        // cover illegal arguments
-        result = cxMempoolTransfer(dest, dest);
-        CX_TEST_ASSERT(result != 0);
     }
 }
 

mercurial