Bump version to 19.1.0 (final)
[llvm-project.git] / libc / docs / dev / api_test.rst
blob3191a32b7e3fb1ed39bde5ae0aef793117e5fef9
1 .. _api_test:
3 ========
4 API Test
5 ========
7 .. warning::
8   This page is severely out of date. Much of the information it contains may be
9   incorrect. Please only remove this warning once the page has been updated.
11 The implementation of libc-project is unique because our public C header files
12 are generated using information from ground truth captured in TableGen files.
13 Unit tests only exercise the internal C++ implementations and don't ensure the
14 headers were generated by the build system and that the generated header files
15 contain the expected declarations and definitions. A simple solution is to have
16 contributors write an integration test for each individual function as a C
17 program; however, this would place a large burden on contributors and duplicates
18 some effort from the unit tests.
20 Instead we automate the generation of what we call as an API test. This API test
21 ensures that public facing symbols are visible, that the header files are
22 generated as expected, and that each libc function has the correct function
23 prototype as specified by the standards. The API test cmake rules are located in
24 ``test/src/CMakeLists.txt``. The source file for the API test is generated in
25 ``<build directory>/projects/libc/test/src/public_api_test.cpp``