Find file
Fetching contributors…
Cannot retrieve contributors at this time
197 lines (142 sloc) 5.54 KB
<link href="style.css" rel="stylesheet" type="text/css">
<title>CuTest: The Cutest C Unit Testing Framework</title>
<script type="text/javascript"><!--
google_ad_client = "pub-6301376840682363";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_channel ="3703387138";
google_color_border = "CCCCCC";
google_color_bg = "FFFFFF";
google_color_link = "000000";
google_color_url = "666666";
google_color_text = "333333";
<script type="text/javascript"
<FONT SIZE="-1">
<A HREF="">Download Now</A>
| <A HREF="">Download Statistics</A>
| <A HREF="">Browse Source</A>
| <A HREF="">SourceForge</A>
| <A HREF="">Blog</A>
| <A HREF="mailto:asimjalis(nospam)">asimjalis(nospam)</A>
<H1>CuTest: C Unit Testing Framework</H1>
CuTest is a unit testing library for the C language. It can be
used to do Extreme Programming and Test-First Development in the
C language. It's a fun and cute library that will make your
programming fun and productive.
<li> Lower Defects. The tests ensure that your code keeps working
as you make small changes in it.
<li> Faster Debugging. The tests tell you which subroutine is
broken. You avoid spending hours trying to figure out what's
<li> Development Speed. You trust your old code and can keep
adding to it without worrying about bad interactions. If there is
a bad interaction the tests will catch it.
<li> Permanent Bug Fixes. If every time a bug is reported you
write a quick test, you will guarantee that the bug never
reappears again.
<li> Fun. As your bug count drops you will begin to enjoy
programming like you've never done before. Running the tests
every few minutes and seeing them pass feels good.
<h2> Features </h2>
<li> Small. Consists of a single .c and .h file.
<li> Easy to Deploy. Just drop the two files into your source
<li> Highly Portable. Works with all major compilers on Windows
(Microsoft, Borland), Linux, Unix, PalmOS.
<li> Open Source. You can extend it to add more functionality.
The source can be invaluable if you are trying to trace a test
<li> Cuteness. Of all the testing frameworks CuTest has the
cutest name :-)
CuTest is distributed under the <a
license</a>. See license.txt in the distribution for text of license. The
intent of the license is to:
<li> Keep the license as simple as possible
<li> Encourage the use of CuTest in both free and commercial applications and libraries
<li> Keep the source code together
<li> Give credit to the CuTest contributors for their work
If you find CuTest useful we would like to hear about it.
<h2>Getting Started</h2>
<p> For a detailed tutorial see README in the distribution. This shows you how
to organize your tests and how to autogenerate the AllTests.c file from your
source files.
<p> To add unit testing to your C code the only files you need
are CuTest.c and CuTest.h.
<p> CuTestTest.c and AllTests.c have been included to provide an
example of how to write unit tests and then how to aggregate them
into suites and into a single AllTests.c file. Suites allow you
to put unit tests for different parts of your code in different
files. AllTests.c combines all the suites and runs them.
<p> You should not have to look inside CuTest.c. Looking in
CuTestTest.c (for example usage) should be sufficient.
<p> After downloading the sources, run your compiler to create an
executable called AllTests.exe. For example, if you are using
Windows you would type:
cl AllTests.c CuTest.c CuTestTest.c
<p> This will run all the unit tests associated with CuTest and
print the output on the console.
<p> For more details on how to use the library look at the README file included
with the distribution.
<p> We hope you CuTest saves you time and helps you produce high quality
<p> If you find CuTest useful, let us know. Tell us what platform you are using
it on (Windows, Linux, etc), and what kinds of applications you are using it
<p> If you would like to contribute documentation or tutorials to this project
please send e-mail.
<font size="-1">
Copyright &copy; 2002-2003, Asim Jalis (<a
All rights reserved.
<SCRIPT language="JavaScript">
var re = /\(nospam\)/ig;
var str;
for(i = 0;i < document.links.length;i++)
str = "" + document.links(i).href;
if( != -1)
document.links(i).href = str.replace(re, "@");
str = "" + document.links(i).innerHTML;
if( != -1)
document.links(i).innerHTML = str.replace(re, "@");
<a href=""><img src="" width="88" height="31" border="0" alt=" Logo"></a>