diff options
author | randomdan <randomdan@localhost> | 2014-11-08 18:10:32 +0000 |
---|---|---|
committer | randomdan <randomdan@localhost> | 2014-11-08 18:10:32 +0000 |
commit | 23621e44dece125baba725b897310b9ef2ce245d (patch) | |
tree | b0114fe3631800dfc195ed90ecee1718afe67bb3 | |
parent | Move tests into their own folder (diff) | |
download | project2-23621e44dece125baba725b897310b9ef2ce245d.tar.bz2 project2-23621e44dece125baba725b897310b9ef2ce245d.tar.xz project2-23621e44dece125baba725b897310b9ef2ce245d.zip |
Add a Boost UTF Project2 logger
-rw-r--r-- | project2/ut/Jamfile.jam | 1 | ||||
-rw-r--r-- | project2/ut/butf_logger.cpp | 21 |
2 files changed, 22 insertions, 0 deletions
diff --git a/project2/ut/Jamfile.jam b/project2/ut/Jamfile.jam index 0c7aa08..dc0d734 100644 --- a/project2/ut/Jamfile.jam +++ b/project2/ut/Jamfile.jam @@ -4,6 +4,7 @@ lib p2ut : [ glob *.cpp ] : <library>../common//p2common + <library>boost_utf : : <define>BOOST_TEST_DYN_LINK <library>boost_utf diff --git a/project2/ut/butf_logger.cpp b/project2/ut/butf_logger.cpp new file mode 100644 index 0000000..c5f45b4 --- /dev/null +++ b/project2/ut/butf_logger.cpp @@ -0,0 +1,21 @@ +#include <boost/test/unit_test_log.hpp> +#include "logger.h" +#include "options.h" + +/// Logger that writes Boost Unit Test Framework messages +class BoostUTFLogDriver : public LogDriverBase { + public: + BoostUTFLogDriver() + { + } + void message(int, const char * msg) const + { + BOOST_TEST_MESSAGE(msg); + } + static int level; +}; + +int BoostUTFLogDriver::level = LOG_DEBUG; + +DECLARE_LOGGER_LOADER("boostutf", BoostUTFLogDriver); + |