You are not logged in.

#1 2014-12-27 13:02:17

ndurrani
Member
Registered: 2014-12-27
Posts: 1

Minimal C unit testing framework written with bash and unix tools

I did some research on unit testing frameworks such as check and autounit, but I found that they required things like autotools, which I didn't want to learn how to use.
I decided to use minUnit but ended up hacking it beyond recognition. Here it is in all it's minimalistic glory:

https://github.com/ndurrani/minimalCUnitTesting

Please let me know of any bugs if you find them.


Features:

- If used as intended, it produces two binaries: one with unit tests, and one without

- orthogonal to the C source (unit tests are defined in a separate file)

- easy to hack and well documented. Ideally, the user would modify the framework to fit their unique needs

- reliable: The  framework works by creating an alternate version of the code with unit tests using a shell script. However, this shell script is merely a convenience - it is not necessary. If it is buggy, you could manually #include a certain header file in the c source, and write unit tests inline. The header file is so minimal that it's unlikely to contain any bugs.

Last edited by ndurrani (2014-12-27 13:03:14)

Offline

Board footer

Powered by FluxBB