News for hackers. Stuff that matters.
Re:Cheat: A minimal unit testing framework for the C program... by tordek on Sunday October 12, 2014 @08:42PM (#8447072)
> I would like to know the reasoning behind this. It sure seems clever but what is the advantage that this provides?

Since C provides very little metaprogramming capabilities, this was the only way to obtain what I wanted: Most (if not all) other testing libraries/frameworks require some boilerplate to start testing (namely: defining your `main` function, which calls all of your tests). Additionally, every time you write a new test, you must remember to add it to your `main` function.

I decided that those two things were bothersome enough, so I wrote a proof of concept that evolved into a large project with tons of useful features beyond that.

There are no comments on this comment yet.