From 72ac62fe3eb3d278290b4c86d5633fcf470342c4 Mon Sep 17 00:00:00 2001 From: Randy Jordan Date: Tue, 12 May 2026 20:32:13 -0500 Subject: [PATCH] Test --- include/base/ci2_base.h | 8 +++++--- tests/01_ci2_static_assert.c | 5 ++++- tests/02_ci2_assert.c | 6 ++++-- tests/03_ci2_exception.c | 5 ++++- tests/04_ci2_memory_exception.c | 4 +++- 5 files changed, 20 insertions(+), 8 deletions(-) diff --git a/include/base/ci2_base.h b/include/base/ci2_base.h index 981356f..9726400 100644 --- a/include/base/ci2_base.h +++ b/include/base/ci2_base.h @@ -40,10 +40,12 @@ SOFTWARE. #define _CRT_SECURE_NO_WARNINGS // No c warnings #define _CRT_RAND_S #define OEMRESOURCE // GUI - // Now we define our system types for unix and windows. + +// Now we define our system types for unix and windows. #include - typedef HANDLE ci2_fd; - typedef wchar_t ci2_sys_char; + #define main wmain + typedef wchar_t ci2_sys_char; + typedef HANDLE ci2_fd; #else // UNIX: typedef int ci2_fd; typedef char ci2_sys_char; diff --git a/tests/01_ci2_static_assert.c b/tests/01_ci2_static_assert.c index 4255c79..20dee4d 100644 --- a/tests/01_ci2_static_assert.c +++ b/tests/01_ci2_static_assert.c @@ -25,8 +25,11 @@ SOFTWARE. #include #include /* INT_MAX, CHAR_BIT — C standard */ #include /* FLT_MANT_DIG — C standard */ +#include -int main(void){ +int main(int argc, ci2_sys_char *argv[]){ + UNUSED(argc); + UNUSED(argv); /* Fundamental type sizes that almost all C code silently assumes. */ CI2_STATIC_ASSERT(CHAR_BIT == 8); CI2_STATIC_ASSERT(sizeof(char) == 1); diff --git a/tests/02_ci2_assert.c b/tests/02_ci2_assert.c index 262e61c..259dedd 100644 --- a/tests/02_ci2_assert.c +++ b/tests/02_ci2_assert.c @@ -40,8 +40,10 @@ static int test_assert_failing(void){ #endif } -int main(void) -{ +int main(int argc, ci2_sys_char *argv[]) +{ + UNUSED(argc); + UNUSED(argv); int result = -1; CI2_ASSERT(ci2_true); diff --git a/tests/03_ci2_exception.c b/tests/03_ci2_exception.c index ff5da2c..4cd4207 100644 --- a/tests/03_ci2_exception.c +++ b/tests/03_ci2_exception.c @@ -66,8 +66,11 @@ static int test_uncaught_exception(void){ return EXIT_SUCCESS; } -int main(void) +int main(int argc, ci2_sys_char *argv[]) { + UNUSED(argc); + UNUSED(argv); + int result = -1; result = test_uncaught_exception(); result = test_caught_exception(); diff --git a/tests/04_ci2_memory_exception.c b/tests/04_ci2_memory_exception.c index 240f1e6..cd005d2 100644 --- a/tests/04_ci2_memory_exception.c +++ b/tests/04_ci2_memory_exception.c @@ -69,8 +69,10 @@ static int test_uncaught_exception(void){ return EXIT_SUCCESS; } -int main(void) +int main(int argc, ci2_sys_char *argv[]) { + UNUSED(argc); + UNUSED(argv); int result = -1; result = test_uncaught_exception(); result = test_caught_exception();