From 13e3cd9e3373968ba86af3e77ddd6214265d7962 Mon Sep 17 00:00:00 2001 From: rjawor Date: Fri, 6 Dec 2013 22:59:29 +0100 Subject: [PATCH] logging test --- concordia/t/CMakeLists.txt | 1 + concordia/t/test_logging.cpp | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 concordia/t/test_logging.cpp diff --git a/concordia/t/CMakeLists.txt b/concordia/t/CMakeLists.txt index 7b1e92f..eda9038 100644 --- a/concordia/t/CMakeLists.txt +++ b/concordia/t/CMakeLists.txt @@ -1,4 +1,5 @@ add_library(concordia-tests + test_logging.cpp test_utils.cpp test_word_map.cpp test_hash_generator.cpp diff --git a/concordia/t/test_logging.cpp b/concordia/t/test_logging.cpp new file mode 100644 index 0000000..448866f --- /dev/null +++ b/concordia/t/test_logging.cpp @@ -0,0 +1,26 @@ +#include "tests/unit-tests/unit_tests_globals.hpp" +#include "concordia/word_map.hpp" + +#include +#include + +#define TMP_LOG_FILE "/tmp/concordia.log" + +using namespace std; + +BOOST_AUTO_TEST_SUITE(logging) + +BOOST_AUTO_TEST_CASE( LoggingTest ) +{ + WordMap wordMap = WordMap(); + + SET_LOGGER_FILE(TMP_LOG_FILE); + SET_LOGGING_LEVEL("ERROR"); + + int a = 12414; + WARN(a); + + boost::filesystem::remove(TMP_LOG_FILE); +} + +BOOST_AUTO_TEST_SUITE_END()