Cutest is an acronym that can be undestood as
This library brings a bunch of macros in order to guide the implementation of unit tests for
Cutest brings a minimal memory leak detection system (fully working in
OpenBSD). You can also use cutest to test kernel mode stuff in
All supported platforms by this library and other general features are listed on Table 1.
Cutest is also possible customize the logs generated by your tests if you want to.
Table 1: Places where I have been running it. A.k.a. supported platforms. In additional, the compiler/linker options to be passed when using
cutest as your unit testing library.
|Operating System||Has GNU Backtracing?||Thread safe?||Compiler/Linker flags to use (besides
Of course, that it should run in a bunch of
UNIX boxes, however I prefer to list the places where I actually saw it running and working pretty fine. If there is a specific non-listed platform that you want to use
cutest, let me know, maybe I can adjust the library's build to accomplish your requirements ;)
Remark: When using cutest to test kernel mode code you do not need compiler flags because all is available in one single header file. For more details read the documentation.
How to build it
cutest is necessary to use my own build system called hefesto. Being
Hefesto installed in your system all you need to emit on a
shell inside the cutest's
src sub-directory is:
After the build a file named
libcutest.a that stands for the library will be generated under the path
src/lib. You should use this file and the header
src/cutest.h to develop your further
Note that the build was written based on
GCC. So, you need to have the
mingw installed (and well exported) in your system before going ahead.
Maybe you should read the documentation before starting.
Tip: In case of trying to compile it under a
UNIX environment with no support for
PTHREADS before calling
hefesto you need to edit the file
src/.ivk and add the following
C Macro definition
Note for Visual Studio users
If you want to build
MSVC you need to use
Forgefile-msvc.hsl instead of the default
Forgefile.hsl script. For this goal the build command changes a little. Being inside the cutest's
hefesto --forgefile=Forgefile-msvc.hsl --Forgefile-msvc-projects=cutest
After run the command above a file named
libcutest.lib will be generated inside
src/lib path. Note that use
MSVC is a little bit tricky. It envolves composite the
cutest with your current
msvcrt.lib (it explains why the
cutest.lib is so huge).
Another point is that this experimental build was written for
Visual Studio 2012 only.
If you want to generate a debug version try:
hefesto --forgefile=Forgefile-msvc.hsl --Forgefile-msvc-projects=cutest --compile-model=debug