diff options
Diffstat (limited to 'tests/pke-test.cpp')
| -rw-r--r-- | tests/pke-test.cpp | 10 |
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); |
