Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>One unit testing framework in C is <a href="https://libcheck.github.io/check/" rel="noreferrer">Check</a>; a list of unit testing frameworks in C can be found <a href="http://check.sourceforge.net/doc/check_html/check_2.html#SEC3" rel="noreferrer">here</a> and is reproduced below. Depending on how many standard library functions your runtime has, you may or not be able to use one of those.</p> <blockquote> <h3>AceUnit</h3> <p>AceUnit (Advanced C and Embedded Unit) bills itself as a comfortable C code unit test framework. It tries to mimick JUnit 4.x and includes reflection-like capabilities. AceUnit can be used in resource constraint environments, e.g. embedded software development, and importantly it runs fine in environments where you cannot include a single standard header file and cannot invoke a single standard C function from the ANSI / ISO C libraries. It also has a Windows port. It does not use forks to trap signals, although the authors have expressed interest in adding such a feature. See the <a href="http://aceunit.sourceforge.net/" rel="noreferrer">AceUnit homepage</a>.</p> <h3>GNU Autounit</h3> <p>Much along the same lines as Check, including forking to run unit tests in a separate address space (in fact, the original author of Check borrowed the idea from GNU Autounit). GNU Autounit uses GLib extensively, which means that linking and such need special options, but this may not be a big problem to you, especially if you are already using GTK or GLib. See the <a href="http://autounit.tigris.org/" rel="noreferrer">GNU Autounit homepage</a>.</p> <h3>cUnit</h3> <p>Also uses GLib, but does not fork to protect the address space of unit tests.</p> <h3>CUnit</h3> <p>Standard C, with plans for a Win32 GUI implementation. Does not currently fork or otherwise protect the address space of unit tests. In early development. See the <a href="http://cunit.sourceforge.net/" rel="noreferrer">CUnit homepage</a>.</p> <h3>CuTest</h3> <p>A simple framework with just one .c and one .h file that you drop into your source tree. See the <a href="http://cutest.sourceforge.net/" rel="noreferrer">CuTest homepage</a>.</p> <h3>CppUnit</h3> <p>The premier unit testing framework for C++; you can also use it to test C code. It is stable, actively developed, and has a GUI interface. The primary reasons not to use CppUnit for C are first that it is quite big, and second you have to write your tests in C++, which means you need a C++ compiler. If these don’t sound like concerns, it is definitely worth considering, along with other C++ unit testing frameworks. See the <a href="http://cppunit.sourceforge.net/doc/cvs/index.html" rel="noreferrer">CppUnit homepage</a>.</p> <h3>embUnit</h3> <p>embUnit (Embedded Unit) is another unit test framework for embedded systems. This one appears to be superseded by AceUnit. <a href="http://sourceforge.net/projects/embunit/" rel="noreferrer">Embedded Unit homepage</a>.</p> <h3>MinUnit</h3> <p>A minimal set of macros and that’s it! The point is to show how easy it is to unit test your code. See the <a href="http://www.jera.com/techinfo/jtns/jtn002.html" rel="noreferrer">MinUnit homepage</a>.</p> <h3>CUnit for Mr. Ando</h3> <p>A CUnit implementation that is fairly new, and apparently still in early development. See the <a href="http://park.ruru.ne.jp/ando/work/CUnitForAndo/html/" rel="noreferrer">CUnit for Mr. Ando homepage</a>.</p> <p>This list was last updated in March 2008.</p> </blockquote> <p>Others:</p> <h3>CMocka</h3> <p>CMocka is a test framework for C with support for mock objects. It's easy to use and setup. <a href="https://cmocka.org/" rel="noreferrer">CMocka</a> official homepage.</p> <h3>Criterion</h3> <p>Criterion is a cross-platform C unit testing framework supporting automatic test registration, parameterized tests, theories, and that can output to multiple formats, including TAP and JUnit XML. Each test is run in its own process, so signals and crashes can be reported or tested if needed. See the <a href="https://github.com/Snaipe/Criterion" rel="noreferrer">Criterion homepage</a> for more information.</p> <h3>HWUT</h3> <p>HWUT is a general Unit Test tool with great support for C. It can help to create Makefiles, generate massive test cases coded in minimal 'iteration tables', walk along state machines, generate C-stubs and more. The general approach is pretty unique: Verdicts are based on 'good stdout/bad stdout'. The comparison function, though, is flexible. Thus, any type of script may be used for checking. It may be applied to any language that can produce standard output. See <a href="http://hwut.sourceforge.net/" rel="noreferrer">HWUT</a> homepage.</p> <p>Wikipedia gives a detailed list of C unit testing frameworks under <a href="https://en.wikipedia.org/wiki/List_of_unit_testing_frameworks#C" rel="noreferrer">List of unit testing frameworks: C</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload