tests for conformance with ISO/IEC 9899 http://src.kaivo.net/dev/libc-tests/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Jakob Kaivo 17679f3314 move type test objects to file scope, remove need for (void)foo to avoid warnings on unused variables 8 months ago
.gitignore ignore build artifacts 2 years ago
LICENSE update year and add email address 2 years ago
Makefile move all configuration to config.mk 9 months ago
README.md add README 9 months ago
_float.d use better #ifdef tests 2 years ago
_float.h simpler and more correct tests for sybmolic macro existance 2 years ago
_math.d use better #ifdef tests 2 years ago
_math.h use better #ifdef tests 2 years ago
_stdalign.d use better #ifdef tests 2 years ago
_stdalign.h use better #ifdef tests 2 years ago
_stdio.d add missing files 2 years ago
_stdio.h add missing files 2 years ago
_stdnoreturn.d use better #ifdef tests 2 years ago
_stdnoreturn.h use better #ifdef tests 2 years ago
_wchar.d add missing files 2 years ago
_wchar.h add missing files 2 years ago
_wctype.d add missing files 2 years ago
_wctype.h add missing files 2 years ago
assert.c add an end in case we get that far 2 years ago
complex.c correct version check directive 9 months ago
config.mk make testing different versions easier 8 months ago
ctype.c refactor test names with _h to avoid collisions 2 years ago
errno.c add testing errno as an lvalue and rvalue 2 years ago
fenv.c skeleton tests for all C99 headers 2 years ago
float.c simpler and more correct tests for sybmolic macro existance 2 years ago
inttypes.c skeleton tests for all C99 headers 2 years ago
iso646.c basic tests for <limits.h>, <float.h>, and <iso646.h> 2 years ago
limits.c basic tests for <limits.h>, <float.h>, and <iso646.h> 2 years ago
locale.c move test variables into function body 2 years ago
main.c remove warnings 9 months ago
math.c only declare variables for testing C99 features when testing C99 features 9 months ago
setjmp.c <setjmp.h> tests (still disabled until I begin writing the actual code since longjmp() is a _Noreturn function) 2 years ago
signal.c move type test objects to file scope, remove need for (void)foo to avoid warnings on unused variables 8 months ago
stdalign.c replace all instances of test_defined() with #ifdef tests 2 years ago
stdarg.c remove unused variable 9 months ago
stdatomic.c skeletons for C11/C18 functions 2 years ago
stdbool.c move test variables into function body 2 years ago
stddef.c move type test objects to file scope, remove need for (void)foo to avoid warnings on unused variables 8 months ago
stdint.c fill in missing values 2 years ago
stdio.c move type test objects to file scope, remove need for (void)foo to avoid warnings on unused variables 8 months ago
stdlib.c move type test objects to file scope, remove need for (void)foo to avoid warnings on unused variables 8 months ago
stdnoreturn.c use better #ifdef tests 2 years ago
string.c move type test objects to file scope, remove need for (void)foo to avoid warnings on unused variables 8 months ago
test.c use correct format specifier 2 years ago
test.h replace all instances of test_defined() with #ifdef tests 2 years ago
tgmath.c skeleton tests for all C99 headers 2 years ago
threads.c skeletons for C11/C18 functions 2 years ago
time.c correct some of the expected outputs 2 years ago
uchar.c skeletons for C11/C18 functions 2 years ago
wchar.c move type test objects to file scope, remove need for (void)foo to avoid warnings on unused variables 8 months ago
wctype.c move type test objects to file scope, remove need for (void)foo to avoid warnings on unused variables 8 months ago

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 <assert.h> (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 <stdio.h> and <stdlib.h>, 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