README 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <div align="center">
  2. # Check
  3. </div>
  4. ## Table of Contents
  5. * [About](#about)
  6. * [Installing](#installing)
  7. * [Linking](#linking)
  8. * [Packaging](#packaging)
  9. ## About
  10. Check is a unit testing framework for C. It features a simple interface
  11. for defining unit tests, putting little in the way of the
  12. developer. Tests are run in a separate address space, so Check can
  13. catch both assertion failures and code errors that cause segmentation
  14. faults or other signals. The output from unit tests can be used within
  15. source code editors and IDEs.
  16. See https://libcheck.github.io/check for more information, including a
  17. tutorial. The tutorial is also available as `info check`.
  18. ## Installing
  19. Check has the following dependencies:
  20. * [automake](https://www.gnu.org/software/automake/)-1.9.6 (1.11.3 on OS X if you are using /usr/bin/ar)
  21. * [autoconf](https://www.gnu.org/software/autoconf/)-2.59
  22. * [libtool](https://www.gnu.org/software/libtool/)-1.5.22
  23. * [pkg-config](https://www.freedesktop.org/wiki/Software/pkg-config/)-0.20
  24. * [texinfo](https://www.gnu.org/software/texinfo/)-4.7 (for documentation)
  25. * tetex-bin (or any texinfo-compatible TeX installation, for documentation)
  26. * POSIX [sed](https://en.wikipedia.org/wiki/Sed)
  27. The versions specified may be higher than those actually needed.
  28. ### autoconf
  29. $ autoreconf --install
  30. $ ./configure
  31. $ make
  32. $ make check
  33. $ make install
  34. $ sudo ldconfig
  35. in this directory to set everything up. autoreconf calls all of the
  36. necessary tools for you, like autoconf, automake, autoheader, etc. If
  37. you ever change something during development, run autoreconf again
  38. (without --install), and it will perform the minimum set of actions
  39. necessary. Check is installed to `/usr/local/lib` by default. ldconfig rebuilds
  40. the linker cache so that newly installed library file is included in the cache.
  41. ### cmake
  42. $ mkdir build
  43. $ cd build
  44. $ cmake ../
  45. $ make
  46. $ CTEST_OUTPUT_ON_FAILURE=1 make test
  47. ## Linking
  48. Check uses variadic macros in check.h, and the strict C90 options for
  49. gcc will complain about this. In gcc 4.0 and above you can turn this
  50. off explicitly with `-Wno-variadic-macros`. In a future API it would be
  51. nice to eliminate these macros.
  52. ## Packaging
  53. Check is available packaged for the following operating systems:
  54. <div align="center">
  55. [![Packaging status](https://repology.org/badge/vertical-allrepos/check.svg)](https://repology.org/project/check/versions)
  56. </div>