boost.test 标头之间的差异
标头 boost/test/unit_test.hpp
和 boost/test/included/unit_test.hpp
之间有什么区别?两者似乎都适用于我的项目,但我不确定应该使用哪一个。
What is the difference between the headers boost/test/unit_test.hpp
and boost/test/included/unit_test.hpp
? Both appear to work in my project and I am unsure which I should be using.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
来自
boost/test/included/unit_test.hpp
:
因此,如果您希望避免独立库编译,则可以使用它。但是,从长远来看,此解决方案可能不是最佳选择,因为它需要为您使用的每个测试模块以及您正在处理的测试模块的每次更改重新编译单元测试框架源代码。因此,您的测试周期时间可能会增加。
另请参阅: http: //www.boost.org/doc/libs/1_48_0/libs/test/doc/html/utf/compilation/direct-include.html
From
boost/test/included/unit_test.hpp
:So you can use this if you prefer to avoid standalone library compilation. However, this solution may not be the best choice in a long run, since it requires the Unit Test Framework sources recompilation for every test module you use it with and for every change of a test module you are working on. As a result your testing cycle time may increase.
See also: http://www.boost.org/doc/libs/1_48_0/libs/test/doc/html/utf/compilation/direct-include.html