As there are still tons and tons of native C++ development going on and you need to test that code just like you do for your C# code. I've been using WinUnit, which was first introduced in a great MSDN Magazine article by Maria Blees, for all my native testing and love it. Where previous attempts at C++ native testing fell far short was that you were forced to write the execution infrastructure for every single project. What WinUnit does differently is that not only makes writing the tests simple, but it also it with a fantastic runner that makes running tests simple enough even a manager could do it. I've always summed up WinUnit as NUnit for C++ developers. Whenever it's easy to write tests, you're more likely to do them and WinUnit makes Test Driven Development for C++ nearly trivial.
Maria has moved the WinUnit project to CodePlex at http://winunit.codeplex.com/ so it can grow and prosper. If you're doing native development, you have to use WinUnit!
On Sep 10 2009 9:44 PMBy jrobbins
I’m totally hooked on WinUnit. As someone who writes a lot of native code it’s just absolutely essential
And still for the same target, those who are developing with native C++, a C++ version of the .NET static analyzer NDepend has just been released last week, code named: CppDepend
www.CppDepend.com
I am sure you already know this but Google had also released the C++ unit testing framework a while ago:
http://code.google.com/p/googletest/
Thanks for the tip. Have you worked with cppunit at all?
Seamus,
I looked at cppunit a while ago, but I didn't like how I had to write my own runner so didn't use it. The ideas in there definately influenced WinUnit.
Dilip,
Very cool! I hadn't seen that they released it. GoogleTest looks extremely nice as well. Thanks for letting me know.
- John Robbins