Got the suite rebuilding, most tests pass, actor and sprite are failing

This commit is contained in:
2026-05-03 23:57:55 -04:00
parent f475dfb6ee
commit 6763b5629f
36 changed files with 734 additions and 664 deletions

View File

@@ -3,7 +3,7 @@
#include <akerror.h>
#include <sdl3game/registry.h>
typedef ErrorContext *(*RegistryFuncPtr)(void);
typedef akerr_ErrorContext *(*RegistryFuncPtr)(void);
void *sdl_calloc_always_fails(size_t a, size_t b)
{
@@ -11,7 +11,7 @@ void *sdl_calloc_always_fails(size_t a, size_t b)
return NULL;
}
ErrorContext *test_registry_init(RegistryFuncPtr funcptr)
akerr_ErrorContext *test_registry_init(RegistryFuncPtr funcptr)
{
SDL_malloc_func malloc_func;
SDL_calloc_func calloc_func;
@@ -43,17 +43,17 @@ ErrorContext *test_registry_init(RegistryFuncPtr funcptr)
} PROCESS(errctx) {
} FINISH(errctx, true);
FAIL_RETURN(errctx, ERR_BEHAVIOR, "SDL memory allocator fails but registry reports successful property creation");
FAIL_RETURN(errctx, AKERR_BEHAVIOR, "SDL memory allocator fails but registry reports successful property creation");
}
ErrorContext *test_registry_init_creation_failures(void)
akerr_ErrorContext *test_registry_init_creation_failures(void)
{
PREPARE_ERROR(errctx);
ATTEMPT {
CATCH(errctx, test_registry_init(&registry_init_actor));
} CLEANUP {
} PROCESS(errctx) {
} HANDLE(errctx, ERR_NULLPOINTER) {
} HANDLE(errctx, AKERR_NULLPOINTER) {
printf("Sucess\n");
} FINISH(errctx, true);
@@ -61,7 +61,7 @@ ErrorContext *test_registry_init_creation_failures(void)
CATCH(errctx, test_registry_init(&registry_init_sprite));
} CLEANUP {
} PROCESS(errctx) {
} HANDLE(errctx, ERR_NULLPOINTER) {
} HANDLE(errctx, AKERR_NULLPOINTER) {
printf("Sucess\n");
} FINISH(errctx, true);
@@ -69,7 +69,7 @@ ErrorContext *test_registry_init_creation_failures(void)
CATCH(errctx, test_registry_init(&registry_init_spritesheet));
} CLEANUP {
} PROCESS(errctx) {
} HANDLE(errctx, ERR_NULLPOINTER) {
} HANDLE(errctx, AKERR_NULLPOINTER) {
printf("Sucess\n");
} FINISH(errctx, true);
@@ -77,7 +77,7 @@ ErrorContext *test_registry_init_creation_failures(void)
CATCH(errctx, test_registry_init(&registry_init_character));
} CLEANUP {
} PROCESS(errctx) {
} HANDLE(errctx, ERR_NULLPOINTER) {
} HANDLE(errctx, AKERR_NULLPOINTER) {
printf("Sucess\n");
} FINISH(errctx, true);
SUCCEED_RETURN(errctx);