为什么不使用CppUnit之类的免费框架呢? 它适用于两个C(有点像小摆件一样你在你的 论文中为静态和C ++做了什么。我确定这同样适用于其他 框架。 - Ian Collins。 Why not just use one of the free frameworks such as CppUnit? It works well with both C (with a little fiddling like you do in yourpaper for "static") and C++. I''m sure the same applies for otherframeworks. --Ian Collins. Ian Collins写道: < snip> Ian Collins wrote:<snip> 为什么不直接使用CppUnit之类的免费框架? 它适用于两个C(带有就像你在 论文中为静态和C ++所做的那样小小的摆弄。我确定这同样适用于其他 框架。 Why not just use one of the free frameworks such as CppUnit?It works well with both C (with a little fiddling like you do in yourpaper for "static") and C++. I''m sure the same applies for otherframeworks. Ian, 谢谢你的支持回复。 如果我错了请纠正我,但是AFAIK CppUnit没有提供 代码执行跟踪,所以它非常棒难以证明代码覆盖率。 [测试工具供应商必须有足够的理由来获取大笔资金。] 此外,如果我在非C ++中使用C兼容的方式(例如暂定的定义), 我的来源甚至不会为CppUnit编译。 最后还有一个端口问题(它'''是嵌入式的说话:))。我建议只需要编译器的东西。 问候, 方舟 Ian,Thank you for your response. Please correct me if I am wrong, but AFAIK CppUnit doesn''t provide acode execution trace, so it''s pretty darn hard to prove code coverage.[There must be reasons why testing tools vendors command big money.] Also, if I use C in non-C++ compatible way (e.g. tentative definitions),my source won''t even compile for CppUnit. And finally there is a port issue (it''s an embedded type talking :)). Iam proposing something that requires only the compiler. Regards,Ark Ark Khasin写道: Ark Khasin wrote: Ian Collins写道: < snip> Ian Collins wrote:<snip> >为什么不使用CppUnit之类的免费框架? 它适用于两个C(有点小摆弄)就像你在论文中所做的那样静态和C ++。我肯定这同样适用于其他框架。 >Why not just use one of the free frameworks such as CppUnit?It works well with both C (with a little fiddling like you do in yourpaper for "static") and C++. I''m sure the same applies for otherframeworks. Ian, 感谢您的回复。 /> 如果我错了请纠正我,但是AFAIK CppUnit没有提供 代码执行跟踪,因此证明代码非常难覆盖。 [必须有理由为什么测试工具供应商需要大笔资金。] Ian,Thank you for your response.Please correct me if I am wrong, but AFAIK CppUnit doesn''t provide acode execution trace, so it''s pretty darn hard to prove code coverage.[There must be reasons why testing tools vendors command big money.] 如果你先开发软件测试,你会得到所有代码覆盖率 你需要。 If you develop your software test first, you get all the code coverageyou need. 另外,如果我以非C ++兼容的方式使用C(例如暂定的定义), 我的来源甚至不会为CppUnit编译。 Also, if I use C in non-C++ compatible way (e.g. tentative definitions),my source won''t even compile for CppUnit. 如果你的意思是K& R风格的原型,不要使用它们。编写和编译 您在C ++中的测试和您在C中的代码。不要尝试使用C ++编译器编译您的C 。 If you mean K&R style prototypes, don''t use them. Write and compileyour tests in C++ and your code in C. Don''t attempt to compile your Cwith a C++ compiler. 最后还有一个端口问题(它是一个嵌入式的说话:))。我建议只需要编译器的东西。 And finally there is a port issue (it''s an embedded type talking :)). Iam proposing something that requires only the compiler. 单元测试,开发和测试托管系统无关紧要。 如果您需要目标环境的一些部分,请模拟(模拟)它们。 - Ian Collins。 Shouldn''t matter for unit testing, develop and test on a hosted system.If you require bits of the target environment, mock (simulate) them. --Ian Collins. 这篇关于要求批评C单元测试环境的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 09-26 04:07