#include <boost/filesystem.hpp>
#include "gtest/gtest.h"
#include "file_io_utils.h"
#include "misc_log_ex.h"
Go to the source code of this file.
|
| | TEST (logging, no_logs) |
| |
| | TEST (logging, default) |
| |
| | TEST (logging, all) |
| |
| | TEST (logging, glob_suffix) |
| |
| | TEST (logging, glob_prefix) |
| |
| | TEST (logging, last_precedence) |
| |
◆ TEST() [1/6]
| TEST |
( |
logging |
, |
|
|
no_logs |
|
|
) |
| |
Definition at line 98 of file logging.cpp.
104 ASSERT_TRUE(load_log_to_string(log_filename, str));
void mlog_set_categories(const char *categories)
#define ASSERT_TRUE(condition)
◆ TEST() [2/6]
| TEST |
( |
logging |
, |
|
|
default |
|
|
) |
| |
Definition at line 109 of file logging.cpp.
114 ASSERT_TRUE(load_log_to_string(log_filename, str));
115 ASSERT_TRUE(str.find(
"global") != std::string::npos);
116 ASSERT_TRUE(str.find(
"fatal") != std::string::npos);
117 ASSERT_TRUE(str.find(
"error") != std::string::npos);
118 ASSERT_TRUE(str.find(
"debug") == std::string::npos);
119 ASSERT_TRUE(str.find(
"trace") == std::string::npos);
#define ASSERT_TRUE(condition)
◆ TEST() [3/6]
Definition at line 123 of file logging.cpp.
129 ASSERT_TRUE(load_log_to_string(log_filename, str));
130 ASSERT_TRUE(str.find(
"global") != std::string::npos);
131 ASSERT_TRUE(str.find(
"fatal") != std::string::npos);
132 ASSERT_TRUE(str.find(
"error") != std::string::npos);
133 ASSERT_TRUE(str.find(
"debug") != std::string::npos);
134 ASSERT_TRUE(str.find(
"trace") != std::string::npos);
void mlog_set_categories(const char *categories)
#define ASSERT_TRUE(condition)
◆ TEST() [4/6]
| TEST |
( |
logging |
, |
|
|
glob_suffix |
|
|
) |
| |
Definition at line 138 of file logging.cpp.
144 ASSERT_TRUE(load_log_to_string(log_filename, str));
145 ASSERT_TRUE(str.find(
"global") == std::string::npos);
146 ASSERT_TRUE(str.find(
"x.y.z") != std::string::npos);
147 ASSERT_TRUE(str.find(
"x.y.x") != std::string::npos);
148 ASSERT_TRUE(str.find(
"y.y.z") == std::string::npos);
void mlog_set_categories(const char *categories)
#define ASSERT_TRUE(condition)
◆ TEST() [5/6]
| TEST |
( |
logging |
, |
|
|
glob_prefix |
|
|
) |
| |
Definition at line 152 of file logging.cpp.
158 ASSERT_TRUE(load_log_to_string(log_filename, str));
159 ASSERT_TRUE(str.find(
"global") == std::string::npos);
160 ASSERT_TRUE(str.find(
"x.y.z") != std::string::npos);
161 ASSERT_TRUE(str.find(
"x.y.x") == std::string::npos);
162 ASSERT_TRUE(str.find(
"y.y.z") != std::string::npos);
void mlog_set_categories(const char *categories)
#define ASSERT_TRUE(condition)
◆ TEST() [6/6]
| TEST |
( |
logging |
, |
|
|
last_precedence |
|
|
) |
| |
Definition at line 166 of file logging.cpp.
172 ASSERT_TRUE(load_log_to_string(log_filename, str));
174 ASSERT_TRUE(str.find(
"global") != std::string::npos);
175 ASSERT_TRUE(str.find(
"x.y.z") == std::string::npos);
176 ASSERT_TRUE(str.find(
"x.y.x") == std::string::npos);
177 ASSERT_TRUE(str.find(
"y.y.z") == std::string::npos);
void mlog_set_categories(const char *categories)
#define ASSERT_TRUE(condition)