The funny thing is that I just recently did what you are asking for, learned how unit test work...
What my conclusion was, is that you basically have 2 programs, the normal program and the test program.
The test program calls the normal functions, and tries to decide if the response are correct!
And then you save the test program so that you can verify your test from time to time.
It turned out that I have been doing nearly this for quite some time,
but not like that and definitely not with any framework...
Before when I wrote a new function, I always called it a couple of times with different inputs and
watch what happened. Most of the time something was wrong so I would fix that and then run the
test input again.... and so on, and so on until I was happy with this function.
The problem was that when I was "done" I would clean up the function that was calling the new function,
and move on!!!
This is where unit test is different, here you are supposed to save all those test calls so you can repeat them later if you need. And since they are in another program, your main program is clean from any "test code".
Then you pick up a framework to help you do this, but as philippe told me in this question,
even 4 lines of c code can be called a unit test framework, just have a look at minunit.
Hope this could help you in some way.