I've spent some time trying to write my own unit test framework for myself, I'm still unhappy with it due to the shear work necessary to get a single test up and running.
Funny enough after several months of straight Java programming, going back to C++ there are some things I miss and others I don't.
One of the benefits of Java is that (if you use Eclipse or Netbeans anyway) you can make the debugger redundant.
I've not had to use a debugger for months, I simply like to do test driven development. I write up my object's behaviour and do 100 or so asserts between each call.
The thing with test driven development is that these object calls are in a certain order.
So sprinkling asserts in your main program can be avoided (which is quite messy anyway).
I've written 7 or so tests for a single behaviour, not because the behaviour was complex, but because I have to know how a single behaviour works under every state in order to have 100% predictability.
In any case finding a frequently updated unit test platform for C++ is a pain in the ass. I've come across a few but they are outdated, Apache have a notice(few months back when I looked) on their website stating that people shouldn't use their test framework.
The 2 that have caught my eye are Boost.Test and TUT.
Can someone recommend me the preferred one?
In any case the reason I made this thread was to say how eerily wonderful it is to go back to using a debugger. I fixed up a problem prior to this post (was no bug, but a silly programmer) which had nothing to do with a bug but with me accidentally leaving something out.
Anyone else have a similar experience?
Funny enough after several months of straight Java programming, going back to C++ there are some things I miss and others I don't.
One of the benefits of Java is that (if you use Eclipse or Netbeans anyway) you can make the debugger redundant.
I've not had to use a debugger for months, I simply like to do test driven development. I write up my object's behaviour and do 100 or so asserts between each call.
The thing with test driven development is that these object calls are in a certain order.
So sprinkling asserts in your main program can be avoided (which is quite messy anyway).
I've written 7 or so tests for a single behaviour, not because the behaviour was complex, but because I have to know how a single behaviour works under every state in order to have 100% predictability.
In any case finding a frequently updated unit test platform for C++ is a pain in the ass. I've come across a few but they are outdated, Apache have a notice(few months back when I looked) on their website stating that people shouldn't use their test framework.
The 2 that have caught my eye are Boost.Test and TUT.
Can someone recommend me the preferred one?
In any case the reason I made this thread was to say how eerily wonderful it is to go back to using a debugger. I fixed up a problem prior to this post (was no bug, but a silly programmer) which had nothing to do with a bug but with me accidentally leaving something out.
Anyone else have a similar experience?