从命令行使用 Boost::Test 测试 DLL
我正在用 C++ 开发一个 DLL,并希望使用 Boost 测试库。
我发现这里可以使用test_runner.exe
。
如何获取test_runner.exe
?
有没有不需要构建boost的方法或位置?
我从BoostPro下载页面安装了boost 1.47,但那里没有test_runner.exe。
谢谢。
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以根据来源自行构建一个。它没有额外的依赖项,只有 Boost.Test 本身。
您可以引导升压安装
下载boost源码,解压并运行
bootstrap.bat
。然后构建
bjam
并在libs/test/tools/test_runner
下运行构建命令。bjam.exe
应该存在于未打包的发行版中。将当前文件夹切换到
libs/test/tools/test_runner
并使用所需参数(平台、配置等)从中运行bjam.exe
。输出
console_test_runner.exe
将在bin.v2\libs\test\tools\console_test_runner
中可用,
You can build one yourself from sources. It has no extra dependencies, only Boost.Test itself.
You can bootstrap boost installation
Download source of boost, unzip and run
bootstrap.bat
.Then build
bjam
and run build command underlibs/test/tools/test_runner
.bjam.exe
should exist in unpacked distribution.Switch current folder to
libs/test/tools/test_runner
and runbjam.exe
from it with required parameters (platform, configuration, etc...).Output
console_test_runner.exe
will be available inbin.v2\libs\test\tools\console_test_runner