发布时间:2022-08-09 文章分类:编程知识 投稿人:赵颖 字号: 默认 | | 超大 打印

CuTest: C Unit Testing Framework

Overview

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.

Benefits

Features

Licensing

CuTest is distributed under the zlib/libpng
license. See license.txt in the distribution for text of license. The
intent of the license is to:

If you find CuTest useful we would like to hear about it.

Getting Started

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.

To add unit testing to your C code the only files you need
are CuTest.c and CuTest.h.

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.

You should not have to look inside CuTest.c. Looking in
CuTestTest.c (for example usage) should be sufficient.

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
AllTests.exe

This will run all the unit tests associated with CuTest and
print the output on the console.

For more details on how to use the library look at the README file included
with the distribution.

Contribute

We hope you CuTest saves you time and helps you produce high quality
software.

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
with.

If you would like to contribute documentation or tutorials to this project
please send e-mail.