Settings

Theme

Ask HN: What C++ unit testing framework do you use?

6 points by _lm_ 8 years ago · 4 comments · 1 min read


What C++ unit testing framework are you using, and how do you like it? Is it easy to get started using it? Are there many footguns?

I've used Boost in the past, but am debating whether I should switch to Google's test framework, or to Catch, or something else.

hector_ka 8 years ago

I use MinUnit for C on an embedded linux device. Minimum overhead and fast.

That is the MinUnit source code: http://www.jera.com/techinfo/jtns/jtn002.html

billconan 8 years ago

I use http://doc.qt.io/qt-5/qtest-overview.html , mostly because my code is Qt based.

Qt is like boost, a all in one solution. With it I have network framework, threading framework, testing, json parser and lots of things. I want to keep my projects' dependencies as few as possible. If Qt can do it, I won't include another.

I had some frustration before when installing Caffe deep learning framework, which includes many google libraries, including gtest, protobuf and glog. I want my projects' dependencies to be clean and easy to install.

irremediable 8 years ago

Catch, like you mentioned. It's a single-header library that slots very nicely into my cross-platform C++ programs.

wizzerking 8 years ago

I've used Boost in the past when i was forced to use Studio 2005 in 2012 development Now I use CppUnit, and I combine that with a fuzzer

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection