summaryrefslogtreecommitdiff
path: root/tests/pke-test-dummy.cpp
diff options
context:
space:
mode:
authorJonathan Bradley <jcb@pikum.xyz>2025-09-16 16:58:02 -0400
committerJonathan Bradley <jcb@pikum.xyz>2025-09-16 17:00:08 -0400
commit73c5e170260638cc566cba2689ea570caee39251 (patch)
tree256b36398d33650054a885e572437909f88485cb /tests/pke-test-dummy.cpp
parente52ef2e49ae660833370befc34ba79d412cb4604 (diff)
pke: major object lifetime overhaul.
Added pke-test-load-unload to ensure objects are managed as expected.
Diffstat (limited to 'tests/pke-test-dummy.cpp')
-rw-r--r--tests/pke-test-dummy.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/pke-test-dummy.cpp b/tests/pke-test-dummy.cpp
index e8c34ba..914f3cf 100644
--- a/tests/pke-test-dummy.cpp
+++ b/tests/pke-test-dummy.cpp
@@ -11,8 +11,12 @@
#include "static-ui.hpp"
#include "thread-pool.hpp"
+static pk_membucket *bkt;
+
int pke_test_dummy_001() {
- pk_ev_init(nullptr);
+ bkt = pk_mem_bucket_create("pke_test_dummy", PK_MEM_DEFAULT_BUCKET_SIZE, PK_MEMBUCKET_FLAG_NONE);
+ pk_mem_bucket_set_client_mem_bucket(bkt);
+ pk_ev_init(bkt);
Physics_Init();
PkeThreads_Init();
AM_Init();
@@ -40,6 +44,9 @@ int pke_test_dummy_001() {
PkeThreads_Teardown();
Physics_Teardown();
pk_ev_teardown();
+ pk_mem_bucket_destroy(bkt);
+ pk_mem_bucket_set_client_mem_bucket(nullptr);
+ bkt = nullptr;
return 0;
}