diff options
| author | Jonathan Bradley <jcb@pikum.xyz> | 2025-08-27 17:19:24 -0400 |
|---|---|---|
| committer | Jonathan Bradley <jcb@pikum.xyz> | 2025-08-28 14:03:31 -0400 |
| commit | 3583af4e1c7979e8d309693d53fbe9184e067a50 (patch) | |
| tree | 5056df53961561568ac4ff3a09a8b9ec4167c799 /tests | |
| parent | 77b548f0241aaecf9f53d31b436a99c80519f00b (diff) | |
pk.h: update to 0.9.0, handle breaking changes
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/pke-test-stubs.cpp | 15 | ||||
| -rw-r--r-- | tests/pke-test-stubs.h | 9 | ||||
| -rw-r--r-- | tests/pke-test.cpp | 3 |
3 files changed, 27 insertions, 0 deletions
diff --git a/tests/pke-test-stubs.cpp b/tests/pke-test-stubs.cpp new file mode 100644 index 0000000..8db3c39 --- /dev/null +++ b/tests/pke-test-stubs.cpp @@ -0,0 +1,15 @@ + +#include "pke-test-stubs.h" + +#include "pk.h" + +extern pk_membucket *MemBkt_Vulkan; + +void pke_test_stub_init_vulkan() { + MemBkt_Vulkan = pk_mem_bucket_create("test stub vulkan", PK_MEM_DEFAULT_BUCKET_SIZE, PK_MEMBUCKET_FLAG_NONE); +} + +void pke_test_stub_teardown_vulkan() { + pk_mem_bucket_destroy(MemBkt_Vulkan); + MemBkt_Vulkan = NULL; +} diff --git a/tests/pke-test-stubs.h b/tests/pke-test-stubs.h new file mode 100644 index 0000000..d16f3e9 --- /dev/null +++ b/tests/pke-test-stubs.h @@ -0,0 +1,9 @@ +#ifndef PKE_TEST_STUBS_H +#define PKE_TEST_STUBS_H + +#include "pk.h" + +void pke_test_stub_init_vulkan(); +void pke_test_stub_teardown_vulkan(); + +#endif /* PKE_TEST_STUBS_H */ diff --git a/tests/pke-test.cpp b/tests/pke-test.cpp index 21babbb..97694b2 100644 --- a/tests/pke-test.cpp +++ b/tests/pke-test.cpp @@ -1,6 +1,7 @@ #include "./pke-test-types.h" +#include "./pke-test-stubs.h" #include "./pke-test-audio.h" #include "./pke-test-asset-manager.h" #include "./pke-test-dummy.h" @@ -57,6 +58,7 @@ int main(int argc, char *argv[]) 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); + pke_test_stub_init_vulkan(); if (group->test_setup != NULL) (group->test_setup)(); lj.expected_exit = 0; lj.caught = 0; @@ -73,6 +75,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)(); + pke_test_stub_teardown_vulkan(); pk_mem_bucket_destroy(bkt); } if (group->group_teardown != NULL) (group->group_teardown)(); |
