C++ Unit Tests
Anyone uses unit tests ? I never used them with c++ and I'm quite lost of what fw I should use. I saw a huge list of them in:
and seen this test:
but I want to know somethings:
1- what is the most used test unit test fw ?
2- what is the most complete unit test fw ? I need object mock and partial object mock would be a really good thing also.
3- in case there isn't a test fw that does unit test and object mock, what is the best/most complete/most used object mock fw ?
4- anyone knows where I can find futher documentarion/sites/references about unit tests in c++ ?
one requirement: got to be free software.
I do not know the answers to your questions but I have used EZUnit and been pleased with the results. There are several test frameworks available on the internet and also in retail and I'm not sure if there is a best one. I think it comes down to more of what test suite suits the needs of your specific project than it comes down to a best one.
I don't understand how any test framework is supposed to mock out your objects for you. Don't you need to know what's going on to mock out an object in a reasonable way? How is the framework supposed to know what the mocked out object still needs to do?
Originally Posted by nelson777
Anyway, I recommend boost unit testing, though I haven't used any others.