QT单元测试

这篇博客主要介绍了如何在Qt项目中使用QTestLib进行单元测试,特别是如何利用qExec运行一系列测试套件。作者强调了在C++中,应用只能有一个main()函数,但可以创建多个包含测试类的文件,并通过qExec来顺序执行测试。博客还澄清了关于moc文件的误解,指出如果声明和实现不在同一文件中,头文件的声明部分会自动生成必要的内容。
摘要由CSDN通过智能技术生成

A basic QTestLib and qExec example (for engineers with experience in Q.A., not Qt!)

Posted March 10, 2010
Filed under: C/C++QAQt |

When doing a software QA project, you have to be ready to set up and design tests in a variety of different programming (and scripting) languages — to best integrate the automated tests with the rest of the project.  I've worked in C/C++, but I'm far from being an expert on the subject. So I can end up wasting time on points that would be extremely simple for an engineer who works in C or C++ every day. And since I wasted my time on this, I'm posting my notes so that you won't have to do the same.

I recently added some tests to the automated build of a C++ project that uses Qt, which has a built-in

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值