C ++单元测试库 [英] C++ Unit Testing Libraries
问题描述
我遇到过cppunit,但它看起来并不容易使用(也许我没有看起来很辛苦,也许因为C ++不工作像Java / C#)。
I've come across cppunit but it didn't look super-easy to use (maybe I didn't look hard, maybe because C++ doesn't work like Java/C#). Are there widely used, simple alternatives?
事实上,是 cppunit C ++的标准单元测试框架?
In fact, is cppunit the standard unit testing framework for C++?
推荐答案
C ++没有标准单元测试库。有很多选择可供选择;
There is no standard unit testing library for C++. There are many choices to choose from; cppunit being one of them.
在我们公司,我们使用 Google测试及其合作伙伴 Google Mock 进行单元测试和对象模拟。我发现他们都组合更容易使用,比cppunit更强大。
At my company we use Google Test along with its partner Google Mock for unit testing and object mocking. I find them both combined easier to use and much more powerful than cppunit.
这篇关于C ++单元测试库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!