Luna/tests/libc/Test.c

60 lines
1.1 KiB
C
Raw Normal View History

2022-10-16 13:31:58 +00:00
#include "Test.h"
// string.h
DEFINE_TEST(memset);
DEFINE_TEST(memcpy);
DEFINE_TEST(memchr);
DEFINE_TEST(memcmp);
DEFINE_TEST(memmove);
2022-10-16 13:31:58 +00:00
DEFINE_TEST(strlen);
2022-10-16 14:00:14 +00:00
DEFINE_TEST(strnlen);
2022-10-22 09:57:25 +00:00
DEFINE_TEST(strcspn);
2022-10-22 10:36:31 +00:00
DEFINE_TEST(strspn);
DEFINE_TEST(strchr);
DEFINE_TEST(strchrnul);
DEFINE_TEST(strrchr);
2022-10-22 16:09:43 +00:00
DEFINE_TEST(strpbrk);
DEFINE_TEST(strdup);
DEFINE_TEST(strndup);
2022-10-16 13:31:58 +00:00
// stdlib.h
2022-10-22 10:03:10 +00:00
DEFINE_TEST(atoi);
DEFINE_TEST(atol);
DEFINE_TEST(atoll);
DEFINE_TEST(srand);
DEFINE_TEST(malloc);
DEFINE_TEST(calloc);
DEFINE_TEST(mktemp);
2022-11-06 16:16:08 +00:00
DEFINE_TEST(qsort);
2022-11-06 16:34:35 +00:00
DEFINE_TEST(bsearch);
2022-10-22 10:03:10 +00:00
2022-10-16 13:31:58 +00:00
int main()
{
START_TEST_CASE(string.h);
RUN_TEST(memset);
RUN_TEST(memcpy);
RUN_TEST(memchr);
RUN_TEST(memcmp);
RUN_TEST(memmove);
2022-10-16 13:31:58 +00:00
RUN_TEST(strlen);
2022-10-16 14:00:14 +00:00
RUN_TEST(strnlen);
2022-10-22 09:57:25 +00:00
RUN_TEST(strcspn);
2022-10-22 10:36:31 +00:00
RUN_TEST(strspn);
RUN_TEST(strchr);
RUN_TEST(strchrnul);
RUN_TEST(strrchr);
2022-10-22 16:09:43 +00:00
RUN_TEST(strpbrk);
RUN_TEST(strdup);
RUN_TEST(strndup);
2022-10-22 10:03:10 +00:00
START_TEST_CASE(stdlib.h);
RUN_TEST(atoi);
RUN_TEST(atol);
RUN_TEST(atoll);
RUN_TEST(srand);
RUN_TEST(malloc);
RUN_TEST(calloc);
RUN_TEST(mktemp);
2022-11-06 16:16:08 +00:00
RUN_TEST(qsort);
2022-11-06 16:34:35 +00:00
RUN_TEST(bsearch);
2022-10-16 13:31:58 +00:00
}