Test
This commit is contained in:
@@ -40,10 +40,12 @@ SOFTWARE.
|
|||||||
#define _CRT_SECURE_NO_WARNINGS // No c warnings
|
#define _CRT_SECURE_NO_WARNINGS // No c warnings
|
||||||
#define _CRT_RAND_S
|
#define _CRT_RAND_S
|
||||||
#define OEMRESOURCE // GUI
|
#define OEMRESOURCE // GUI
|
||||||
// Now we define our system types for unix and windows.
|
|
||||||
|
// Now we define our system types for unix and windows.
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
typedef HANDLE ci2_fd;
|
#define main wmain
|
||||||
typedef wchar_t ci2_sys_char;
|
typedef wchar_t ci2_sys_char;
|
||||||
|
typedef HANDLE ci2_fd;
|
||||||
#else // UNIX:
|
#else // UNIX:
|
||||||
typedef int ci2_fd;
|
typedef int ci2_fd;
|
||||||
typedef char ci2_sys_char;
|
typedef char ci2_sys_char;
|
||||||
|
|||||||
@@ -25,8 +25,11 @@ SOFTWARE.
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <limits.h> /* INT_MAX, CHAR_BIT — C standard */
|
#include <limits.h> /* INT_MAX, CHAR_BIT — C standard */
|
||||||
#include <float.h> /* FLT_MANT_DIG — C standard */
|
#include <float.h> /* FLT_MANT_DIG — C standard */
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
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. */
|
/* Fundamental type sizes that almost all C code silently assumes. */
|
||||||
CI2_STATIC_ASSERT(CHAR_BIT == 8);
|
CI2_STATIC_ASSERT(CHAR_BIT == 8);
|
||||||
CI2_STATIC_ASSERT(sizeof(char) == 1);
|
CI2_STATIC_ASSERT(sizeof(char) == 1);
|
||||||
|
|||||||
@@ -40,8 +40,10 @@ static int test_assert_failing(void){
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(void)
|
int main(int argc, ci2_sys_char *argv[])
|
||||||
{
|
{
|
||||||
|
UNUSED(argc);
|
||||||
|
UNUSED(argv);
|
||||||
int result = -1;
|
int result = -1;
|
||||||
CI2_ASSERT(ci2_true);
|
CI2_ASSERT(ci2_true);
|
||||||
|
|
||||||
|
|||||||
@@ -66,8 +66,11 @@ static int test_uncaught_exception(void){
|
|||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(void)
|
int main(int argc, ci2_sys_char *argv[])
|
||||||
{
|
{
|
||||||
|
UNUSED(argc);
|
||||||
|
UNUSED(argv);
|
||||||
|
|
||||||
int result = -1;
|
int result = -1;
|
||||||
result = test_uncaught_exception();
|
result = test_uncaught_exception();
|
||||||
result = test_caught_exception();
|
result = test_caught_exception();
|
||||||
|
|||||||
@@ -69,8 +69,10 @@ static int test_uncaught_exception(void){
|
|||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(void)
|
int main(int argc, ci2_sys_char *argv[])
|
||||||
{
|
{
|
||||||
|
UNUSED(argc);
|
||||||
|
UNUSED(argv);
|
||||||
int result = -1;
|
int result = -1;
|
||||||
result = test_uncaught_exception();
|
result = test_uncaught_exception();
|
||||||
result = test_caught_exception();
|
result = test_caught_exception();
|
||||||
|
|||||||
Reference in New Issue
Block a user