Separate names with a comma.
Discussion in 'Programming' started by IHateMyJob2004, Dec 17, 2012.
Is there a defacto standard unit test framework for C/C++?
Something liek JUnit for Java?
We use the Boost test suite for all our unit testing needs at work. There's also cppunit, but I haven't used that since college.
Not sure if there's a de-facto standard for C/C++ but my organization used cxxtest for unit testing which is an open source unit testing framework for C++.
I've been trying to make this decision as well. Having not tried either, it looks like boost.test and googletest are the best options available right now (best in my opinion, measured by feature set & likelihood of continued future support/development). I'm leaning toward googletest but if other people at work are already using boost, then I think there's little reason to introduce more dependencies; i.e., googletest isn't substantially better.
Both of these are kinda heavy in the footprint department so if you want something really lightweight, I think there are things like cutest for C++.
You can search around for some well-informed comparisons of various C++ testing frameworks. Wikipedia is a decent starting place in terms of just listing out which frameworks have what [commonly] desired options. I'll say that the direct analogues of things like junit are *not* what you want in C++; those frameworks are pain.
also, while not putting anand's programming section down, you'd get alot more attention, experience and numbers at places like stackoverflow and codeproject.
I'll give you attention and numbers. Experience? Not so much.
I use Google Test and Google Mock at work and like it a lot. It works pretty slick.