TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

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

6 点作者 _lm_将近 8 年前
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 条评论

hector_ka将近 8 年前
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>
billconan将近 8 年前
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.
irremediable将近 8 年前
Catch, like you mentioned. It&#x27;s a single-header library that slots very nicely into my cross-platform C++ programs.
wizzerking将近 8 年前
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