tests for conformance with ISO/IEC 9899 http://src.kaivo.net/dev/libc-tests/

Jakob Kaivo 17679f3314 move type test objects to file scope, remove need for (void)foo to avoid warnings on unused variables vor 4 Jahren
.gitignore 6bf3a50d44 ignore build artifacts vor 5 Jahren
LICENSE 2fef91dfdf update year and add email address vor 5 Jahren
Makefile aa0508dbbf move all configuration to config.mk vor 4 Jahren
README.md ebf84c5d3a add README vor 4 Jahren
_float.d b2efbbcdbb use better #ifdef tests vor 5 Jahren
_float.h cd9cd3483d simpler and more correct tests for sybmolic macro existance vor 5 Jahren
_math.d b2efbbcdbb use better #ifdef tests vor 5 Jahren
_math.h b2efbbcdbb use better #ifdef tests vor 5 Jahren
_stdalign.d b2efbbcdbb use better #ifdef tests vor 5 Jahren
_stdalign.h b2efbbcdbb use better #ifdef tests vor 5 Jahren
_stdio.d c9d408f4a8 add missing files vor 5 Jahren
_stdio.h c9d408f4a8 add missing files vor 5 Jahren
_stdnoreturn.d b2efbbcdbb use better #ifdef tests vor 5 Jahren
_stdnoreturn.h b2efbbcdbb use better #ifdef tests vor 5 Jahren
_wchar.d c9d408f4a8 add missing files vor 5 Jahren
_wchar.h c9d408f4a8 add missing files vor 5 Jahren
_wctype.d c9d408f4a8 add missing files vor 5 Jahren
_wctype.h c9d408f4a8 add missing files vor 5 Jahren
assert.c 5e37315f0e add an end in case we get that far vor 5 Jahren
complex.c efec5e7304 correct version check directive vor 4 Jahren
config.mk 6a2d72af1a make testing different versions easier vor 4 Jahren
ctype.c e22b9d2683 refactor test names with _h to avoid collisions vor 5 Jahren
errno.c 3819846f8a add testing errno as an lvalue and rvalue vor 5 Jahren
fenv.c 306613c5a1 skeleton tests for all C99 headers vor 5 Jahren
float.c cd9cd3483d simpler and more correct tests for sybmolic macro existance vor 5 Jahren
inttypes.c 306613c5a1 skeleton tests for all C99 headers vor 5 Jahren
iso646.c 8396c02590 basic tests for <limits.h>, <float.h>, and <iso646.h> vor 5 Jahren
limits.c 8396c02590 basic tests for <limits.h>, <float.h>, and <iso646.h> vor 5 Jahren
locale.c 47fbd9c2bd move test variables into function body vor 5 Jahren
main.c 7734d94d17 remove warnings vor 4 Jahren
math.c 21de485738 only declare variables for testing C99 features when testing C99 features vor 4 Jahren
setjmp.c 9cc79623cc <setjmp.h> tests (still disabled until I begin writing the actual code since longjmp() is a _Noreturn function) vor 5 Jahren
signal.c 17679f3314 move type test objects to file scope, remove need for (void)foo to avoid warnings on unused variables vor 4 Jahren
stdalign.c 1a834f6bd8 replace all instances of test_defined() with #ifdef tests vor 5 Jahren
stdarg.c b3a808e501 remove unused variable vor 4 Jahren
stdatomic.c 6d9ef3245d skeletons for C11/C18 functions vor 5 Jahren
stdbool.c 47fbd9c2bd move test variables into function body vor 5 Jahren
stddef.c 17679f3314 move type test objects to file scope, remove need for (void)foo to avoid warnings on unused variables vor 4 Jahren
stdint.c c5d8e6b226 fill in missing values vor 5 Jahren
stdio.c 17679f3314 move type test objects to file scope, remove need for (void)foo to avoid warnings on unused variables vor 4 Jahren
stdlib.c 17679f3314 move type test objects to file scope, remove need for (void)foo to avoid warnings on unused variables vor 4 Jahren
stdnoreturn.c b2efbbcdbb use better #ifdef tests vor 5 Jahren
string.c 17679f3314 move type test objects to file scope, remove need for (void)foo to avoid warnings on unused variables vor 4 Jahren
test.c c997061111 use correct format specifier vor 5 Jahren
test.h 1a834f6bd8 replace all instances of test_defined() with #ifdef tests vor 5 Jahren
tgmath.c 306613c5a1 skeleton tests for all C99 headers vor 5 Jahren
threads.c 6d9ef3245d skeletons for C11/C18 functions vor 5 Jahren
time.c 7551fd06be correct some of the expected outputs vor 5 Jahren
uchar.c 6d9ef3245d skeletons for C11/C18 functions vor 5 Jahren
wchar.c 17679f3314 move type test objects to file scope, remove need for (void)foo to avoid warnings on unused variables vor 4 Jahren
wctype.c 17679f3314 move type test objects to file scope, remove need for (void)foo to avoid warnings on unused variables vor 4 Jahren

README.md

This is a small set of unit tests for an ISO/IEC 9899 conformant C library.

To build, edit config.mk with the appropriate compiler and flags to link the library you are testing. The run make to get the executable testlibc. Note that the source files depend on your compiler predefinining STDC_VERSION appropriately to determine which tests to include. The default config.mk is configured for testing the UNGOL C library, which is probably not what you want.

By default, running testlibc will run tests for all headers found during compilation, with the exception of (as that test includes an abnormal termination).

To run tests for a specified set of headers, append their base names (without the .h) to the command line. For example, to run only the tests for and , run:

testlibc stdio stdlib

Each test will print either a + (for success) or - (for failure) after it completes. To get verbose output, where each test is displayed as well as the results, use the -v option (it must come before any header names):

testlibc -v
testlibc -v assert