TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

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

6 pointsby _lm_almost 8 years ago
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?<p>I&#x27;ve used Boost in the past, but am debating whether I should switch to Google&#x27;s test framework, or to Catch, or something else.

4 comments

hector_kaalmost 8 years ago
I use MinUnit for C on an embedded linux device. Minimum overhead and fast.<p>That is the MinUnit source code: <a href="http:&#x2F;&#x2F;www.jera.com&#x2F;techinfo&#x2F;jtns&#x2F;jtn002.html" rel="nofollow">http:&#x2F;&#x2F;www.jera.com&#x2F;techinfo&#x2F;jtns&#x2F;jtn002.html</a>
billconanalmost 8 years ago
I use <a href="http:&#x2F;&#x2F;doc.qt.io&#x2F;qt-5&#x2F;qtest-overview.html" rel="nofollow">http:&#x2F;&#x2F;doc.qt.io&#x2F;qt-5&#x2F;qtest-overview.html</a> , mostly because my code is Qt based.<p>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&#x27; dependencies as few as possible. If Qt can do it, I won&#x27;t include another.<p>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&#x27; dependencies to be clean and easy to install.
irremediablealmost 8 years ago
Catch, like you mentioned. It&#x27;s a single-header library that slots very nicely into my cross-platform C++ programs.
wizzerkingalmost 8 years ago
I&#x27;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