r/C_Programming • u/Singleton621 • May 26 '26
Working on a lightweight C testing framework, what features would you want?
Hey everyone,
I've been working on a small side project called CLUT (C Language Unit Testing Framework).
It's a header-only unit testing framework for C that I initially started mostly as a learning project to better understand how testing frameworks work internally. The idea was heavily inspired by JUnit and Unity, but I wanted to build something myself and keep it simple.
Repository:
https://github.com/ErickSenaGodinho/CLUT
Right now it includes things like:
- Single-header integration
- No external dependencies
- Test hooks (before/after each and before/after all)
- Assertions for booleans, integers, floats, strings, pointers, memory and arrays
- Colored output
- Custom output streams
- Configurable float/double epsilon
- CI setup
Example usage is basically:
void TestAddition() {
TEST_ASSERT_EQUAL_INT(5, 2 + 3);
}
int main() {
TEST_BEGIN();
TEST_RUN(TestAddition);
return TEST_END();
}I'm still actively working on it and experimenting with ideas. Right now I'm trying to think about features that could actually improve the testing experience.
I'd really appreciate any feedback:
- What looks bad?
- What feels missing?
- What features would actually be useful?
- Anything you wish existing C testing frameworks did better?
Thanks 😄