C ++单元测试库 [英] C++ Unit Testing Libraries

查看:193
本文介绍了C ++单元测试库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到过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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆