2015-10-17 15:49:54 +02:00
|
|
|
#include "testutils/LoggingTest.h"
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Contains test cases for the Logger class
|
|
|
|
*/
|
|
|
|
|
|
|
|
using namespace cpputils::logging;
|
|
|
|
using std::string;
|
|
|
|
|
|
|
|
class LoggerTest: public LoggingTest {};
|
|
|
|
|
|
|
|
TEST_F(LoggerTest, IsSingleton) {
|
|
|
|
ASSERT_EQ(&logger(), &logger());
|
|
|
|
}
|
|
|
|
|
|
|
|
TEST_F(LoggerTest, SetLogger) {
|
2015-10-17 16:49:58 +02:00
|
|
|
logger().setLogger(spdlog::stderr_logger_mt("MyTestLog1"));
|
2015-10-17 15:49:54 +02:00
|
|
|
EXPECT_EQ("MyTestLog1", logger()->name());
|
|
|
|
}
|