boost.test 标头之间的差异

发布于 2024-12-18 17:49:45 字数 131 浏览 2 评论 0原文

标头 boost/test/unit_test.hppboost/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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

时光瘦了 2024-12-25 17:49:45

来自 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:

included (vs. linked) version of Unit Test Framework

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文