File: LoggerTest.cpp

package info (click to toggle)
cryfs 1.0.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 28,412 kB
  • sloc: cpp: 150,187; asm: 10,493; python: 1,455; javascript: 65; sh: 50; makefile: 17; xml: 7
file content (19 lines) | stat: -rw-r--r-- 404 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#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) {
    logger().setLogger(spdlog::stderr_logger_mt("MyTestLog1"));
    EXPECT_EQ("MyTestLog1", logger()->name());
}