summaryrefslogtreecommitdiff
path: root/tests/pke-test.cpp
diff options
context:
space:
mode:
authorJonathan Bradley <jcb@pikum.xyz>2025-06-05 10:50:24 -0400
committerJonathan Bradley <jcb@pikum.xyz>2025-06-05 10:50:24 -0400
commit55c518b2922a2d8a41212a952a68c17c7c9a3f8b (patch)
tree31cc135bc18bf11893d5ca3bca47c9ee27bf141f /tests/pke-test.cpp
parentb0b1159780311c7c8ca9a9d41d11794e91e8895c (diff)
pk.h: update to 0.6.0 + handle breaking changes
Diffstat (limited to 'tests/pke-test.cpp')
-rw-r--r--tests/pke-test.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/tests/pke-test.cpp b/tests/pke-test.cpp
index 3f6b43b..473327e 100644
--- a/tests/pke-test.cpp
+++ b/tests/pke-test.cpp
@@ -6,7 +6,6 @@
#include "./pke-test-serialization.h"
#include "./pke-test-static-ui.h"
-#include "entities.hpp"
#include "pk.h"
#include "unistd.h"
#include <stdio.h>
@@ -36,12 +35,6 @@ int main(int argc, char *argv[])
double group_ms;
pk_tmr func_tmr;
- // global garbage data when dtor called on program exit
- {
- EntityType_Init();
- EntityType_Teardown();
- }
-
pke_test_get_group *group_fns[] = {
pke_test_dummy_get_group,
pke_test_static_ui_get_group,
@@ -59,6 +52,8 @@ int main(int argc, char *argv[])
fprintf(stdout, "[pke-test]:[%s] Begin.\n", group->title);
if (group->group_setup != NULL) (group->group_setup)();
for (k = 0; k < group->n_tests; ++k) {
+ struct pk_membucket *bkt = pk_mem_bucket_create("pke-test-bucket", PK_MEM_DEFAULT_BUCKET_SIZE, PK_MEMBUCKET_FLAG_NONE);
+ pk_mem_bucket_set_client_mem_bucket(bkt);
fprintf(stdout, "[pke-test]:[%s]:[%s] Begin.\n", group->title, group->tests[k].title);
if (group->test_setup != NULL) (group->test_setup)();
lj.expected_exit = 0;
@@ -76,6 +71,7 @@ int main(int argc, char *argv[])
fprintf(stdout, "[pke-test]:[%s]:[%s] %sFailed.%s Expected: '%i' Got: '%i'.\n", group->title, group->tests[k].title, CLR_RED, CLR_WHITE, group->tests[k].expected_result, result);
}
if (group->test_teardown != NULL) (group->test_teardown)();
+ pk_mem_bucket_destroy(bkt);
}
if (group->group_teardown != NULL) (group->group_teardown)();
fprintf(stdout, "[pke-test]:[%s] End. ( %s%03d%s / %03d ) Tests Completed.\n", group->title, pass_count == group->n_tests ? CLR_GREEN : CLR_RED, pass_count, CLR_WHITE, group->n_tests);