Reintroduce C++ support and add usage tests for C++ (#4)

Reviewed-on: #4
Co-authored-by: Abdelrahman <said.abdelrahman89@gmail.com>
Co-committed-by: Abdelrahman <said.abdelrahman89@gmail.com>
This commit is contained in:
2025-08-10 22:33:40 +00:00
committed by Abdelrahman Said
parent 011083ab83
commit d3fccd61b5
42 changed files with 2499 additions and 104 deletions

View File

@@ -8,7 +8,16 @@
#include "../../primitives/strings/str8/str8.h"
#include <stdbool.h>
#ifdef WAPP_PLATFORM_CPP
BEGIN_C_LINKAGE
#endif // !WAPP_PLATFORM_CPP
#ifdef WAPP_PLATFORM_CPP
#define wapp_tester_result(PASSED) (TestFuncResult{wapp_str8_lit_ro(__func__), PASSED})
#else
#define wapp_tester_result(PASSED) ((TestFuncResult){.name = wapp_str8_lit_ro(__func__), .passed = PASSED})
#endif // !WAPP_PLATFORM_CPP
#define wapp_tester_run_tests(...) run_tests(__VA_ARGS__, NULL)
typedef struct test_func_result TestFuncResult;
@@ -25,4 +34,8 @@ typedef TestFuncResult(TestFunc)(void);
void run_tests(TestFunc *func1, ...);
#ifdef WAPP_PLATFORM_CPP
END_C_LINKAGE
#endif // !WAPP_PLATFORM_CPP
#endif // !TESTER_H