c++ - boost.test header 之间的区别

标签 c++ boost boost-test

header boost/test/unit_test.hppboost/test/included/unit_test.hpp 有什么区别?两者似乎都适用于我的项目,但我不确定应该使用哪一个。

最佳答案

来自 boost/test/included/unit_test.hpp :

included (vs. linked) version of Unit Test Framework

因此,如果您希望避免独立的库编译,则可以使用它。但是,从长远来看,此解决方案可能不是最佳选择,因为它需要为您使用它的每个测试模块以及您正在处理的测试模块的每个更改重新编译单元测试框架源代码。因此,您的测试周期时间可能会增加。

另请参阅:http://www.boost.org/doc/libs/1_48_0/libs/test/doc/html/utf/compilation/direct-include.html

关于c++ - boost.test header 之间的区别,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8314280/

相关文章:

c++ - std::initializer_list 的底层结构是什么?

c++ - boost 图形库 : Check validity of vertex_descriptor in a performant way

multithreading - 避免在构建 Boost 1.63.0 期间失败 - 线程

c++ - 在 BOOST_CHECK_EQUAL 期间隐藏 cerr 输出

c++ - 是否可以在已经具有主要功能的 cpp 文件上运行测试?

c++ - Boost::python 使用和返回模板公开 C++ 函数

C++ Qt : QStyledItemDelegate's createEditor is never called, 尽管调用了 paint()

c++ - tr1::result_of 的一个好的用例是什么?

c++ - Boost.Test 错误消息不再显示在 VS2010 的错误列表中

c++ - boost 测试单元无法调用 mpi 函数