如何使BOOST_TEST_MESSAGE显示在屏幕上? [英] How do I get BOOST_TEST_MESSAGE to display on the screen?
本文介绍了如何使BOOST_TEST_MESSAGE显示在屏幕上?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在摸索通过Boost单元测试框架的方式,并且已经建立了基本的功能单元测试.我正在使用BOOST_TEST_MESSAGE
让用户知道正在运行哪些测试,但是消息没有显示在屏幕上.例如:
I'm fumbling my way through the Boost Unit Testing Framework and have set up a basic functioning unit test. I'm using BOOST_TEST_MESSAGE
to let the user know which tests are running, but the messages don't display on the screen. For example:
#define BOOST_TEST_MODULE MyTest
#include <boost/test/included/unit_test.hpp>
BOOST_FIXTURE_TEST_SUITE(MyTestSuite, MyTestFixture)
BOOST_AUTO_TEST_CASE(MessageTest)
{
BOOST_TEST_MESSAGE( "no one sees this!" );
}
BOOST_AUTO_TEST_SUITE_END();
我尝试将BOOST_TEST_LOG_LEVEL
定义为all
,但这没有效果.我是从 Boost日志级参数页面中得到这个想法的,但我认为 log 的概念可能与屏幕上实际显示的内容无关.有什么想法吗?
I have tried defining BOOST_TEST_LOG_LEVEL
to all
but this has no effect. I got that idea from the Boost log-level parameter page, but I think the concept of the log might not be related to what is actually displayed on the screen. Any ideas?
推荐答案
查看全文