C ++代码的单元测试 - 工具和方法 [英] Unit testing for C++ code - Tools and methodology

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

问题描述

我正在开发一个已经开发了几年的大型c ++系统。作为努力提高现有代码的质量的一部分,我们从事一个大型的长期重构项目。

I'm working on a large c++ system that is has been in development for a few years now. As part of an effort to improve the quality of the existing code we engaged on a large long-term refactoring project.

你知道一个很好的工具,可以帮助我写单元测试在C ++?可能是类似于Junit或Nunit的东西?

Do you know a good tool that can help me write unit tests in C++? Maybe something similar to Junit or Nunit?

任何人都可以给出一些关于在没有进行单元测试的情况下编写单元测试的方法的建议。

Can anyone give some good advice on the methodology of writing unit tests for modules that were written without unit testing in mind?

推荐答案

将单元测试应用于旧代码是非常原因 编写了有效使用旧代码。 Michael Feathers是作者,正如其他答案中所提到的,他参与了 CppUnit CppUnitLite

Applying unit tests to legacy code was the very reason Working Effectively with Legacy Code was written. Michael Feathers is the author - as mentioned in other answers, he was involved in the creation of both CppUnit and CppUnitLite.

这篇关于C ++代码的单元测试 - 工具和方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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