Skip to content

Commit

Permalink
chore: fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hoffstadt committed Sep 28, 2024
1 parent b9c1b4d commit 4c10077
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion libs/pl_test.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ Index of this file:

#ifdef PL_TEST_IMPLEMENTATION

#if defined(PL_TEST_WIN32_COLOR) || defined(_WIN32)
#if defined(PL_TEST_WIN32_COLOR) && defined(_WIN32)
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
static DWORD gtOriginalMode = 0;
Expand Down
4 changes: 3 additions & 1 deletion tests/main_tests.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ int main()
pl_string_tests(NULL);
pl_test_run_suite("pl_string.h");

if(!pl_test_finish())
bool bResult = pl_test_finish();

if(!bResult)
{
exit(1);
}
Expand Down
8 changes: 6 additions & 2 deletions tests/pl_json_tests.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@
#include "pl_json.h"

void
write_json_test(char** ppcBuffer)
write_json_test(void* pData)
{

char** ppcBuffer = pData;

// root object
plJsonObject tRootJsonObject = {0};
pl_json_add_string_member(&tRootJsonObject, "first name", "John");
Expand Down Expand Up @@ -66,9 +68,11 @@ write_json_test(char** ppcBuffer)
}

void
read_json_test(char** ppcBuffer)
read_json_test(void* pData)
{

char** ppcBuffer = pData;

plJsonObject tRootJsonObject = {0};
pl_load_json(*ppcBuffer, &tRootJsonObject);

Expand Down

0 comments on commit 4c10077

Please sign in to comment.