如何将Google Test测试用例标记为“预期失败"? [英] How to mark a Google Test test-case as "expected to fail"?
本文介绍了如何将Google Test测试用例标记为“预期失败"?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想为尚未实现的功能添加一个测试用例,并将该测试用例标记为"我可以通过".
I want to add a testcase for functionality not yet implemented and mark this test case as "it's ok that I fail".
有没有办法做到这一点?
Is there a way to do this?
我希望执行测试,并且只要测试用例处于预期失败"状态,框架就应该验证它是否失败.
I want the test to be executed and the framework should verify it is failing as long as the testcase is in the "expected fail" state.
我感兴趣的功能似乎在google-test中不存在,但在 LIT .
It seems that the feature I am interested in does not exist in google-test, but it does exist in the Boost Unit Test Framework, and in LIT.
推荐答案
您可以在测试名称前添加DISABLED_
.
这篇关于如何将Google Test测试用例标记为“预期失败"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文