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

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